diff options
author | Ralph Boehme <slow@samba.org> | 2020-01-01 12:15:29 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-01-13 19:41:35 +0000 |
commit | c3f890fb1e982603c7f24033fc1e5d73535fbbb8 (patch) | |
tree | 0a160e38c3f345fe5d08b103fac660e4293b5d45 /source3/smbd/lanman.c | |
parent | 46f51912aea157433537af27097a0127c7626085 (diff) | |
download | samba-c3f890fb1e982603c7f24033fc1e5d73535fbbb8.tar.gz |
smbd: use smbXsrv_session_info_lookup() in api_WWkstaUserLogon()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/lanman.c')
-rw-r--r-- | source3/smbd/lanman.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index c56a5bd65bf..c62258fda65 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -4415,15 +4415,23 @@ static bool api_WWkstaUserLogon(struct smbd_server_connection *sconn, int uLevel; struct pack_desc desc; char* name; - struct user_struct *vuser = get_valid_user_struct(sconn, vuid); + struct auth_session_info *si = NULL; + NTSTATUS status; + + status = smbXsrv_session_info_lookup(conn->sconn->client, + vuid, + &si); + if (!NT_STATUS_IS_OK(status)) { + return false; + } if (!str1 || !str2 || !p) { return False; } DBG_INFO("Username of UID %ju is %s\n", - (uintmax_t)vuser->session_info->unix_token->uid, - vuser->session_info->unix_info->unix_name); + (uintmax_t)si->unix_token->uid, + si->unix_info->unix_name); uLevel = get_safe_SVAL(param,tpscnt,p,0,-1); name = get_safe_str_ptr(param,tpscnt,p,2); @@ -4483,8 +4491,7 @@ static bool api_WWkstaUserLogon(struct smbd_server_connection *sconn, } PACKS(&desc,"z",lp_workgroup());/* domain */ - PACKS(&desc,"z", - vuser->session_info->info->logon_script); /* script path */ + PACKS(&desc,"z", si->info->logon_script); /* script path */ PACKI(&desc,"D",0x00000000); /* reserved */ } |