From e80ceb1d7355c8c46a2ed90d5721cf367640f4e8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Mar 2010 13:56:51 -0800 Subject: Remove more uses of "extern struct current_user current_user;". Use accessor functions to get to this value. Tidies up much of the user context code. Volker, please look at the changes in smbd/uid.c to familiarize yourself with these changes as I think they make the logic in there cleaner. Cause smbd/posix_acls.c code to look at current user context, not stored context on the conn struct - allows correct use of these function calls under a become_root()/unbecome_root() pair. Jeremy. --- source3/locking/locking.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source3/locking') diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 6f1bc8cf8a..e9826ba5bd 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -1441,16 +1441,6 @@ 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) { -- cgit