Fix bug #9329 - Directory listing with SeBackup can crash smbd.
authorJeremy Allison <jra@samba.org>
Fri, 26 Oct 2012 00:07:29 +0000 (17:07 -0700)
committerMichael Adam <obnox@samba.org>
Mon, 29 Oct 2012 15:26:20 +0000 (16:26 +0100)
commit3a4b755ce5b4be1981d12d5b6f3eb563ef079707
tree16cafa6bf2f067b44373ec8ee342f6ad522a3e62
parent334044f6fa11b5a9ac66afdc95add5e1522e6baa
Fix bug #9329 - Directory listing with SeBackup can crash smbd.

When we do a become_root()/unbecome_root() pair to temporarily
raise privilege, this NULLs out the NT token. If we're within
a become_root()/unbecome_root() pair then return the previous
token on the stack as our NT token. This is what we should be
using to check against NT ACLs in the file server. This copes
with security context changing when removing a file on close
under the context of another user (when 2 users have a file
open, one sets delete on close and then the other user has
to actually do the delete).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Oct 29 16:26:20 CET 2012 on sn-devel-104
source3/smbd/proto.h
source3/smbd/sec_ctx.c
source3/smbd/uid.c