diff options
author | Jeremy Allison <jra@samba.org> | 2010-03-15 10:33:09 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-03-15 14:48:54 -0700 |
commit | 4b85a0ea7fe036347b9fe5c725e55b043f75ccb4 (patch) | |
tree | 33c588f05e060adaf709cdbd42ee1bae86d59d32 /source3/smbd/dir.c | |
parent | 83b9e12513984af8b372f5558043ed0f65d832fd (diff) | |
download | samba-4b85a0ea7fe036347b9fe5c725e55b043f75ccb4.tar.gz |
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/smbd/dir.c')
-rw-r--r-- | source3/smbd/dir.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 69ebc57473d..b1e9734681e 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -1129,11 +1129,9 @@ static bool user_can_read_file(connection_struct *conn, /* * If user is a member of the Admin group * we never hide files from them. - * Use (uid_t)0 here not sec_initial_uid() - * because of the RAW-SAMBA3HIDE test. */ - if (get_current_uid(conn) == (uid_t)0) { + if (conn->admin_user) { return True; } @@ -1153,11 +1151,9 @@ static bool user_can_write_file(connection_struct *conn, /* * If user is a member of the Admin group * we never hide files from them. - * Use (uid_t)0 here not sec_initial_uid() - * because of the RAW-SAMBA3HIDE test. */ - if (get_current_uid(conn) == (uid_t)0) { + if (conn->admin_user) { return True; } @@ -1182,13 +1178,10 @@ static bool file_is_special(connection_struct *conn, /* * If user is a member of the Admin group * we never hide files from them. - * Use (uid_t)0 here not sec_initial_uid() - * because of the RAW-SAMBA3HIDE test. */ - if (get_current_uid(conn) == (uid_t)0) { + if (conn->admin_user) return False; - } SMB_ASSERT(VALID_STAT(smb_fname->st)); |