pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45801: samba35 crashing when a member of many Domain Groups tries to connect



>Number:         45801
>Category:       pkg
>Synopsis:       samba35 crashing when a member of many Domain Groups tries to 
>connect
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 08 17:20:01 +0000 2012
>Originator:     Ingo Meyer
>Release:        NetBSD 5.1
>Organization:
meyer  datasystems
>Environment:
NetBSD vertrieb 5.1 NetBSD 5.1 (MY_XEN3_DOMU) #0: Fri Jun  3 17:41:36 CEST 2011 
 ingo@coxen2:/usr/src/sys/arch/amd64/compile/MY_XEN3_DOMU amd64
>Description:
samba as a Bomain member server crashes, if a user, who is member of many 
Domain groups tries to connect.

with a log level of 10 you get the following error message in the connecting 
computers logfile

[2012/01/08 16:41:23.582375,  0] lib/util.c:1468(smb_panic)
  PANIC (pid 5947): sys_setgroups failed

I found the reason in source3/lib system.c on line 1153 in the function
 sys_bsd_setgroups():

 /* setgroups(2) will fail with EINVAL if we pass too many groups. */
        max = groups_max();



>How-To-Repeat:
just add a user to 5 or more Groups on your W2K Domain controller and try to 
connect to the samba server as this user.

You will get an error message, concerning possibly missing access rights.
>Fix:
--- ./org/system.c      2011-11-01 19:53:03.000000000 +0100
+++ ./work/samba-3.5.12/source3/lib/system.c    2012-01-08 17:11:09.000000000 
+0100
@@ -1134,7 +1134,7 @@
 /* This is a list of systems that require the first GID passed to setgroups(2)
  * to be the effective GID. If your system is one of these, add it here.
  */
-#if defined (FREEBSD) || defined (DARWINOS)
+#if defined (FREEBSD) || defined (DARWINOS) || defined (__NetBSD__)
 #define USE_BSD_SETGROUPS
 #endif

You have to ensure, that in source3/lib/system.c 'USE_BSD_SETGROUPS' is defined 
as is for FreeBSD and DARWIN.
 



Home | Main Index | Thread Index | Old Index