Opened 12 years ago

Last modified 6 years ago

#34572 closed defect

SAMBA 3.6.5 Fails on 10.7 — at Initial Version

Reported by: jim@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc:
Port: samba3

Description

The latest SAMBA fails to initialize on startup. This seems to be related to the low value of NAX_NGROUPS in the Darwin Kernel.

Here is the link that I found describing the problem:

http://www.sand4.info/index.php?q=aHR0cHM6Ly9naXN0LmdpdGh1Yi5jb20vMTg4ODc3OA%3D%3D

In it they show the hack: --- system.c.orig 2012-02-22 22:46:14.000000000 -0200 +++ system.c 2012-02-22 22:47:51.000000000 -0200 @@ -1161,7 +1161,14 @@

int groups_max(void) {

-#if defined(SYSCONF_SC_NGROUPS_MAX) +#if defined(DARWINOS) + /* On OS X, sysconf(_SC_NGROUPS_MAX) returns 16 + * due to OS X's group nesting and getgrouplist + * will return a flat list; users can exceed the + * maximum of 16 groups. And easily will. + */ + return 32; NGROUPS_MAX is defined, hence the define above is void. +#elif defined(SYSCONF_SC_NGROUPS_MAX)

int ret = sysconf(_SC_NGROUPS_MAX); return (ret == -1) ? NGROUPS_MAX : ret;

#else

I haven't looked into this in any detail. Maybe someone else is more familiar with the code.

Change History (0)

Note: See TracTickets for help on using tickets.