[exim] After upgrade to Exim 4.95 or 4.96: "setgroups: Inval…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Martin D Kealey
Ημερομηνία:  
Προς: exim-users
Καινούρια Θέματα: [exim] MacOS development was Re: After upgrade to Exim 4.95 or 4.96: "setgroups: Invalid argument"
Αντικείμενο: [exim] After upgrade to Exim 4.95 or 4.96: "setgroups: Invalid argument"
Lasse Törngren <lasse.torngren@???> wrote:

I am using a couple of Macs as servers, and has one server running MacOS
> Mojave and Exim 4.94 without any issue.
>
> I have tried to upgrade to Exim 4.95 on this machine, and to Exim 4.96 on
> a new server that I am setting up with MacOS Big Sur. On both servers I get
> Exim Panic with “setgroups: Invalid argument” at local (virtual) delivery.
>


Disclaimers:
1. There's currently no support for MacOS because there are no active
developers with access to that platform.
2. I don't have access to anything running MacOS, so I can only offer
general guidance.

If you know your way around C code and would like to help, I'd encourage
you to join the exim-dev list, and discuss a possible fix, with a view to
incorporating it in the next Exim release, and reinstating support for
MacOS.

The message “*setgroups: Invalid argument*” originates from one of the
functions `priv_drop_temp` and `priv_restore` in the source file `
src/src/priv.c`, which was a new addition for the 4.95 release. (I would
start by patching the messages so you can see which of those two functions
is failing.)

It might also be informative to explore the versions of those functions
implemented in sshd, and see if they've been patched to cope with setgroups
behaviour on MacOS.

In the meantime, if you write a wrapper that starts Exim with an empty
supplementary group set, that might alleviate some of the problems.

I note that in the source file `src/src/exim.c` circa line 3943 it has `
setgroups` gated thus:
```

> #ifndef OS_SETGROUPS_ZERO_DROPS_ALL
>    && setgroups(0, NULL) != 0
> #endif
>    && setgroups(1, group_list) != 0


```
which suggests that the same conditional logic should be applied in `
src/src/priv.c`.