summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-15 10:33:09 -0700
committerJeremy Allison <jra@samba.org>2010-03-15 14:48:54 -0700
commit4b85a0ea7fe036347b9fe5c725e55b043f75ccb4 (patch)
tree33c588f05e060adaf709cdbd42ee1bae86d59d32 /source3/locking
parent83b9e12513984af8b372f5558043ed0f65d832fd (diff)
downloadsamba-4b85a0ea7fe036347b9fe5c725e55b043f75ccb4.tar.gz
samba-4b85a0ea7fe036347b9fe5c725e55b043f75ccb4.tar.bz2
samba-4b85a0ea7fe036347b9fe5c725e55b043f75ccb4.zip
Rever e80ceb1d7355c8c46a2ed90d5721cf367640f4e8 "Remove more uses of "extern struct current_user current_user;"."
As requested by Volker, split this into smaller commits. Jeremy.
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index e9826ba5bd..6f1bc8cf8a 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -1441,6 +1441,16 @@ bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const UNIX_USE
return False;
}
+ if (fsp->conn->admin_user) {
+ tok_copy = copy_unix_token(lck, tok);
+ if (tok_copy == NULL) {
+ TALLOC_FREE(lck);
+ return false;
+ }
+ tok_copy->uid = (uid_t)0;
+ tok = tok_copy;
+ }
+
set_delete_on_close_lck(lck, delete_on_close, tok);
if (fsp->is_directory) {