[Samba] Compile 3.5.4 on Opensolaris snv_134

Marcis Lielturks marcis.lielturks at gmail.com
Fri Jul 23 05:25:48 MDT 2010


I recompiled samba with modified /usr/include/limits.h, but it didn't 
help. User cannot connect to share if he is member of more than 35 
groups although share has permissions for one of users group. User can 
access share only if there is permissions for user or users primary group.

I think "smbd -b" output says that sysconfig values for NGROUPS_MAX was used

# smbd -b | grep NGROUP
    SYSCONF_SC_NGROUPS_MAX

But my test program in C suggests, that _SC_NGROUPS_MAX limit is 1024

$ cat sysconf.c ; ./sysconf
#include <unistd.h>
#include <stdio.h>

int main()
{
     long ret;
     ret=sysconf(_SC_NGROUPS_MAX);
     printf("_SC_NGROUPS_MAX is '%d'\n",ret);
}
_SC_NGROUPS_MAX is '1024'


If user is member of more than 35 groups, logs say

   smbd/service.c:163(set_conn_connectpath)
    set_conn_connectpath: service SAMBA, connectpath = /SAMBA
- smbd/service.c:1031(make_connection_snum)
-  '/SAMBA' does not exist or permission denied when connecting to  
Error was Permission denied

If use is member of 35 groups or less, then they say
   smbd/service.c:163(set_conn_connectpath)
    set_conn_connectpath: service SAMBA, connectpath = /SAMBA
+ modules/vfs_default.c:152(vfswrap_fs_capabilities)
+  vfswrap_fs_capabilities: timestamp resolution of sec available on 
share SAMBA, directory /SAMBA
+ smbd/service.c:1070(make_connection_snum)
+  w2k3r2target (192.168.0.120) connect to service SAMBA initially as 
user PROSERVE+proact (uid=12459, gid=10513) (pid
  18905)

Attached 2 compressed logs for machine user was connecting from - on 
when user can connect and another when he cannot.

MMM

by the way, did you know, that mouse initially was invented
just for simplifying text selection in xterm?


On 07/23/10 12:57 PM, Marcis Lielturks wrote:
> Hi!
>
> I still have problems, now user can't access share if he's member of 
> more than 35 groups! I think I forgot to do one thing - modify 
> /usr/include/limits.h to reflect new NGROUPS_MAX value in kernel.
>
> Can I check what NGROUPS_MAX value was used when compiling binaries? 
> Will /usr/include/limits.h modifications be enough?
>
> MMM
>
> by the way, did you know, that mouse initially was invented
> just for simplifying text selection in xterm?
>
>
> On 07/23/10 10:49 AM, Marcis Lielturks wrote:
>> Hi!
>>
>> Thanks, yes I was using "-i". Now everything seems to work OK. My 
>> main reason, why I compiled samba - 16 group limitation, is solved too!
>>
>> Hopefully I'll later gather up few lines of instructions on how to 
>> get 3.5.4 compiling on OpenSolaris (snv_134).
>>
>> Thanks everybody for help!
>>
>> MMM
>>
>> by the way, did you know, that mouse initially was invented
>> just for simplifying text selection in xterm?
>>
>>
>> On 07/22/10 10:27 PM, Volker Lendecke wrote:
>>> On Thu, Jul 22, 2010 at 09:51:40PM +0300, Mārcis Lielturks wrote:
>>>> Here's 6 files in compressed tar archive.
>>> That looks all perfectly fine. The client just disconnects
>>> again after it has done some querying.
>>>
>>> How are you starting smbd? It a bit looks like you're
>>> starting it with -i, which for normal server operations is
>>> unfortunately wrong. You should start it with -D and let it
>>> become a daemon.
>>>
>>> Volker


More information about the samba mailing list