From 984eee7e290cd0dd20baf8a531ed9afc142796ff Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 15 Mar 2010 12:13:30 -0700 Subject: Switch over to using get_currect_XXX() accessor functions. Jeremy. --- source3/smbd/open.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/smbd/open.c') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index e366c5fadf..0834e6d3d3 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -58,7 +58,7 @@ NTSTATUS smb1_file_se_access_check(struct connection_struct *conn, { *access_granted = 0; - if (conn->server_info->utok.uid == 0 || conn->admin_user) { + if (get_current_uid(conn) == (uid_t)0) { /* I'm sorry sir, I didn't know you were root... */ *access_granted = access_desired; if (access_desired & SEC_FLAG_MAXIMUM_ALLOWED) { @@ -2176,7 +2176,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, new_file_created = True; } - set_share_mode(lck, fsp, conn->server_info->utok.uid, 0, + set_share_mode(lck, fsp, get_current_uid(conn), 0, fsp->oplock_type); /* Handle strange delete on close create semantics. */ @@ -2641,7 +2641,7 @@ static NTSTATUS open_directory(connection_struct *conn, return status; } - set_share_mode(lck, fsp, conn->server_info->utok.uid, 0, NO_OPLOCK); + set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK); /* For directories the delete on close bit at open time seems always to be honored on close... See test 19 in Samba4 BASE-DELETE. */ -- cgit