[Samba] 3.2.4 CreateDirectory panic

Peter Rindfuss rindfuss at wzb.eu
Mon Oct 20 11:18:11 GMT 2008


Hi,

I have just set up a new 64bit server as PDC with opensuse 11 and samba 
3.2.4. The configuration was taken over from suse 10 with samba 3.0.24.

So far, everything on the new server works fine but this:

I have a C++ utility program running under win xp which creates users 
and home directories usind win32 api calls. It worked fine with samba 
3.0.24 and before, but causes a samba panic when it executes the 
CreateDirectory win32 api call for the home directory. A log file 
snippet is attached.

My own testing shows that the panic only happens when CreateDirectory is 
called with a SECURITY_ATTRIBUTES structure in order to set the correct 
acls for the new directory:

CreateDirectory(HomePath, &security_attributes); -> panic

whereas
CreateDirectory(HomePath, NULL); -> ok

I tried some variants like
CreateDirectory ( HomePath, NULL ) ; -> ok
SetFileSecurity(Homepath, ..., security_descriptor); -> panic

and finally came up with this solution
CreateDirectory(HomePath, NULL); -> ok
SetNamedSecurityInfo( .... ); -> ok

Strange thing is that in all variants I start out with the same 
SECURITY_DESCRIPTOR structure.


Peter Rindfuss
-------------- next part --------------
[2008/10/19 19:23:44,  0] lib/fault.c:fault_report(40)
  ===============================================================
[2008/10/19 19:23:44,  0] lib/fault.c:fault_report(41)
  INTERNAL ERROR: Signal 11 in pid 5515 (3.2.4-0.1.130-1906-SUSE-SL11.0)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2008/10/19 19:23:44,  0] lib/fault.c:fault_report(43)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2008/10/19 19:23:44,  0] lib/fault.c:fault_report(44)
  ===============================================================
[2008/10/19 19:23:44,  0] lib/util.c:smb_panic(1663)
  PANIC (pid 5515): internal error
[2008/10/19 19:23:44,  0] lib/util.c:log_stack_trace(1767)
  BACKTRACE: 18 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x1a) [0x7fb621ffffea]
   #1 /usr/sbin/smbd(smb_panic+0x1f) [0x7fb6220000bf]
   #2 /usr/sbin/smbd [0x7fb621feb000]
   #3 /lib64/libpthread.so.0 [0x7fb61fbb1b30]
   #4 /usr/sbin/smbd(sid_compare+0x28) [0x7fb621ff91d8]
   #5 /usr/sbin/smbd(add_sid_to_array_unique+0x4d) [0x7fb621ff98ad]
   #6 /usr/sbin/smbd(create_token_from_username+0x4a6) [0x7fb622045b56]
   #7 /usr/sbin/smbd(user_in_group_sid+0x5a) [0x7fb62204630a]
   #8 /usr/sbin/smbd [0x7fb621e7104e]
   #9 /usr/sbin/smbd(set_nt_acl+0xab5) [0x7fb621e76265]
   #10 /usr/sbin/smbd [0x7fb621e8ae01]
   #11 /usr/sbin/smbd [0x7fb621e31fbc]
   #12 /usr/sbin/smbd(reply_nttrans+0x75c) [0x7fb621e32f8c]
   #13 /usr/sbin/smbd [0x7fb621e788ce]
   #14 /usr/sbin/smbd(smbd_process+0x263) [0x7fb621e7ab93]
   #15 /usr/sbin/smbd(main+0x1fa2) [0x7fb6221f9ad2]
   #16 /lib64/libc.so.6(__libc_start_main+0xe6) [0x7fb61e173436]
   #17 /usr/sbin/smbd [0x7fb621e01aa9]
[2008/10/19 19:23:44,  0] lib/fault.c:dump_core(201)
  dumping core in /var/log/samba/cores/smbd


More information about the samba mailing list