diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/nttrans.c | 4 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index a7da776451..2b540187d9 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -2512,7 +2512,7 @@ static void call_nt_transact_get_user_quota(connection_struct *conn, ZERO_STRUCT(qt); /* access check */ - if (conn->session_info->utok.uid != 0) { + if (get_current_uid(conn) != 0) { DEBUG(1,("get_user_quota: access_denied service [%s] user " "[%s]\n", lp_servicename(SNUM(conn)), conn->session_info->unix_name)); @@ -2782,7 +2782,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn, ZERO_STRUCT(qt); /* access check */ - if (conn->session_info->utok.uid != 0) { + if (get_current_uid(conn) != 0) { DEBUG(1,("set_user_quota: access_denied service [%s] user " "[%s]\n", lp_servicename(SNUM(conn)), conn->session_info->unix_name)); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 4890de3a5c..fe06538246 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3203,7 +3203,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned fsp.fnum = -1; /* access check */ - if (conn->session_info->utok.uid != sec_initial_uid()) { + if (get_current_uid(conn) != 0) { DEBUG(0,("set_user_quota: access_denied " "service [%s] user [%s]\n", lp_servicename(SNUM(conn)), @@ -3698,8 +3698,7 @@ cap_low = 0x%x, cap_high = 0x%x\n", ZERO_STRUCT(quotas); /* access check */ - if ((conn->session_info->utok.uid != sec_initial_uid()) - ||!CAN_WRITE(conn)) { + if ((get_current_uid(conn) != 0) || !CAN_WRITE(conn)) { DEBUG(0,("set_user_quota: access_denied service [%s] user [%s]\n", lp_servicename(SNUM(conn)), conn->session_info->unix_name)); |