Displaying 5 results from an estimated 5 matches for "fix_groups_list".
2018 Oct 11
3
macOS Mojave: setgroups(501) failed: Too many extra groups
...user with << 16 groups can log in fine. Unfortunately it is not
(easily) doable to reduce
the number of groups, as macOS seems to set them internally.
Is there a config option that I am missing to work around this?
Looking at the source, I see this is handled in
src/lib/restrict-access.c::fix_groups_list(),
where above the call to setgroups() a gid_list2 is constructed. I wonder
if one could
have a config option to prevent adding all those extra groups, which
then make the
call to setgroups() fail
Any help appreciated
Heiko
--
hwr at pilhuhn.de m:0179/207 4919 b:http://pilhuhn.blogspot.c...
2018 Oct 11
2
macOS Mojave: setgroups(501) failed: Too many extra groups
On Thu, Oct 11, 2018 at 09:51:34AM +0300, Aki Tuomi wrote:
> > Looking at the source, I see this is handled in
> > src/lib/restrict-access.c::fix_groups_list(),
> > where above the call to setgroups() a gid_list2 is constructed. I
> > wonder if one could
> > have a config option to prevent adding all those extra groups, which
> > then make the
> > call to setgroups() fail
> Not trivially. We would need to know which gr...
2018 Aug 10
1
dying on osx
...vecot with the
above program to limit the # of groups. I suspect that dovecot is adding
a number of groups when it starts up.
I've hacked a work around to get it working for me on my laptop:
diff --git a/src/lib/restrict-access.c b/src/lib/restrict-access.c
@@ -224,7 +224,12 @@ static void fix_groups_list(const struct
restrict_access_settings *set,
-??? if (setgroups(gid_count, gid_list) < 0) {
+??? if (setgroups(gid_count > NGROUPS_MAX ? 16 : gid_count, gid_list) <
0) {
???? ??? if (errno == EINVAL) {
???? ??? ??? i_fatal("setgroups(%s) failed: Too many extra groups",
????...
2018 Oct 11
0
macOS Mojave: setgroups(501) failed: Too many extra groups
...n log in fine. Unfortunately it is
> not (easily) doable to reduce
> the number of groups, as macOS seems to set them internally.
>
> Is there a config option that I am missing to work around this?
>
> Looking at the source, I see this is handled in
> src/lib/restrict-access.c::fix_groups_list(),
> where above the call to setgroups() a gid_list2 is constructed. I
> wonder if one could
> have a config option to prevent adding all those extra groups, which
> then make the
> call to setgroups() fail
>
> Any help appreciated
> ?? Heiko
>
Not trivially. We would ne...
2018 Oct 11
0
macOS Mojave: setgroups(501) failed: Too many extra groups
On 11.10.2018 10:08, Heiko W. Rupp wrote:
> On Thu, Oct 11, 2018 at 09:51:34AM +0300, Aki Tuomi wrote:
>>> Looking at the source, I see this is handled in
>>> src/lib/restrict-access.c::fix_groups_list(),
>>> where above the call to setgroups() a gid_list2 is constructed. I
>>> wonder if one could
>>> have a config option to prevent adding all those extra groups, which
>>> then make the
>>> call to setgroups() fail
>
>> Not trivially. We wou...