[MacPorts] #34572: samba3 @3.6.5 fails to initialize on startup (was: SAMBA 3.6.5 Fails on 10.7)
MacPorts
noreply at macports.org
Tue May 22 15:03:36 PDT 2012
#34572: samba3 @3.6.5 fails to initialize on startup
-------------------------+--------------------------------------------------
Reporter: jim@… | Owner: mww@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.1
Keywords: | Port: samba3
-------------------------+--------------------------------------------------
Changes (by ryandesign@…):
* keywords: SAMBA =>
* owner: macports-tickets@… => mww@…
* port: 3.6.5 => samba3
Old 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.
New 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.
--
Comment:
Please remember to use WikiFormatting, to fill in the Port field, and to
Cc the maintainer of the port.
--
Ticket URL: <https://trac.macports.org/ticket/34572#comment:1>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list