Opened 7 years ago

Last modified 15 months ago

#34572 closed defect

samba3 @3.6.5 fails to initialize on startup — at Version 1

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

Description (last modified by ryandesign (Ryan Schmidt))

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:

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(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;

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

Change History (1)

comment:1 Changed 7 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Keywords: SAMBA removed
Owner: changed from macports-tickets@… to mww@…
Port: samba3 added; 3.6.5 removed
Summary: SAMBA 3.6.5 Fails on 10.7samba3 @3.6.5 fails to initialize on startup

Please remember to use WikiFormatting, to fill in the Port field, and to Cc the maintainer of the port.

Note: See TracTickets for help on using tickets.