Samba4, symlink and Domain Admins

le dahut le.dahut at laposte.net
Tue Sep 29 15:15:02 UTC 2015


Hi.

I've a strange behaviour on my samba4 PDC.

With :
         unix extensions = no
         wide links = yes
         follow symlinks = yes

in smb.conf, a Domain User can access symlinks outside the share path, 
for example :
  ln -s /home/test /home/myuser/test

As soon as I add "myuser" to Domain Admins group, I cannot enter the 
"test" directory anymore. In samba logs I read :

switch message SMBtrans2 (pid 6176) conn 0x7f7397c7ddd0
Skipping user change - already user
call_trans2findfirst: dirtype = 16, maxentries = 1366, 
close_after_first=0, close_if_end = 1 requires_resume_key = 1 
backup_priv = 1 level = 0x104, max_data_bytes = 16384
push_sec_ctx(10025, 10001) : sec_ctx_stack_ndx = 1
push_conn_ctx(8344) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
Security token: (NULL)
UNIX token of user 0
Primary group is 0 and contains 0 supplementary groups
unix_convert called on file "test/*"
stat_cache_lookup: lookup failed for name [TEST/*]
stat_cache_lookup: lookup succeeded for name [TEST] -> [test]
unix_convert begin: name = test/*, dirpath = test, start = *
check_parent_exists: name = test/*, dirpath = test, start = *
is_mangled * ?
is_mangled_component * (len 1) ?
Wildcard *
check_reduced_name_with_privilege [test/*] [/home/myuser]
vfs_ChDir to test
vfs_ChDir got /home/test
check_reduced_name_with_privilege: realpath [test] -> [/home/test]
check_reduced_name_with_privilege: Bad access attempt: test is a symlink 
outside the share path
conn_rootdir =/home/myuser
resolved_name=/home/test
vfs_ChDir to /home/myuser
vfs_ChDir got /home/myuser
filename_convert_internal: check_name failed for name test/* with 
NT_STATUS_ACCESS_DENIED
NT error packet at ../source3/smbd/trans2.c(2453) cmd=50 (SMBtrans2) 
NT_STATUS_ACCESS_DENIED

Any idea ?




More information about the samba-technical mailing list