summaryrefslogtreecommitdiff
path: root/source3/smbd/lanman.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-15 12:13:30 -0700
committerJeremy Allison <jra@samba.org>2010-03-15 14:49:15 -0700
commit984eee7e290cd0dd20baf8a531ed9afc142796ff (patch)
tree81a1d7c4ca3a5317b1427c20b72b1f8da66445f2 /source3/smbd/lanman.c
parent6b2358e15eadf2b137b62669a813eded21aebbc7 (diff)
downloadsamba-984eee7e290cd0dd20baf8a531ed9afc142796ff.tar.gz
samba-984eee7e290cd0dd20baf8a531ed9afc142796ff.tar.bz2
samba-984eee7e290cd0dd20baf8a531ed9afc142796ff.zip
Switch over to using get_currect_XXX() accessor functions.
Jeremy.
Diffstat (limited to 'source3/smbd/lanman.c')
-rw-r--r--source3/smbd/lanman.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index dab26d0abe..c97228fab7 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -3767,7 +3767,9 @@ static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
vuser->server_info->sam_account);
}
/* modelled after NTAS 3.51 reply */
- SSVAL(p,usri11_priv,conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
+ SSVAL(p,usri11_priv,
+ (get_current_uid(conn) == sec_initial_uid())?
+ USER_PRIV_ADMIN:USER_PRIV_USER);
SIVAL(p,usri11_auth_flags,AF_OP_PRINT); /* auth flags */
SIVALS(p,usri11_password_age,-1); /* password age */
SIVAL(p,usri11_homedir,PTR_DIFF(p2,p)); /* home dir */
@@ -3820,7 +3822,8 @@ static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
memset(p+22,' ',16); /* password */
SIVALS(p,38,-1); /* password age */
SSVAL(p,42,
- conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
+ (get_current_uid(conn) == sec_initial_uid())?
+ USER_PRIV_ADMIN:USER_PRIV_USER);
SIVAL(p,44,PTR_DIFF(p2,*rdata)); /* home dir */
strlcpy(p2, vuser ? pdb_get_homedir(
vuser->server_info->sam_account) : "",
@@ -3971,7 +3974,9 @@ static bool api_WWkstaUserLogon(connection_struct *conn,uint16 vuid,
PACKI(&desc,"W",0); /* code */
PACKS(&desc,"B21",name); /* eff. name */
PACKS(&desc,"B",""); /* pad */
- PACKI(&desc,"W", conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
+ PACKI(&desc,"W",
+ (get_current_uid(conn) == sec_initial_uid())?
+ USER_PRIV_ADMIN:USER_PRIV_USER);
PACKI(&desc,"D",0); /* auth flags XXX */
PACKI(&desc,"W",0); /* num logons */
PACKI(&desc,"W",0); /* bad pw count */