summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2002-06-03 22:13:41 +0000
committerJim McDonough <jmcd@samba.org>2002-06-03 22:13:41 +0000
commit1ecee79d05bbac201977813c5eab6de63d116885 (patch)
treec21b7038529728c7ac7d1f962f3cf62fdd19671d /source3/rpc_parse
parentd4fa62868e3737c46c6cad628831aab4c9608c46 (diff)
downloadsamba-1ecee79d05bbac201977813c5eab6de63d116885.tar.gz
samba-1ecee79d05bbac201977813c5eab6de63d116885.tar.bz2
samba-1ecee79d05bbac201977813c5eab6de63d116885.zip
Add user name to netsessenum RPC to stop 1783 messages. Also fix where username was sent as machine name.
(This used to be commit 2b4a5b56664cf3c99682b64c0fc5e2ebebb749b7)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_srv.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index 36afc7c962..107661b49b 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -1193,7 +1193,7 @@ void init_srv_sess_info1_str(SESS_INFO_1_STR *ss1, char *name, char *user)
DEBUG(5,("init_srv_sess_info1_str\n"));
init_unistr2(&ss1->uni_name, name, strlen(name)+1);
- init_unistr2(&ss1->uni_user, name, strlen(user)+1);
+ init_unistr2(&ss1->uni_user, user, strlen(user)+1);
}
/*******************************************************************
@@ -1374,10 +1374,10 @@ static BOOL srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_stru
********************************************************************/
void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n,
- char *srv_name, char *qual_name,
- uint32 sess_level, SRV_SESS_INFO_CTR *ctr,
- uint32 preferred_len,
- ENUM_HND *hnd)
+ char *srv_name, char *qual_name,
+ char *user_name, uint32 sess_level,
+ SRV_SESS_INFO_CTR *ctr, uint32 preferred_len,
+ ENUM_HND *hnd)
{
q_n->ctr = ctr;
@@ -1385,6 +1385,7 @@ void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n,
init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name);
init_buf_unistr2(&q_n->uni_qual_name, &q_n->ptr_qual_name, qual_name);
+ init_buf_unistr2(&q_n->uni_user_name, &q_n->ptr_user_name, user_name);
q_n->sess_level = sess_level;
q_n->preferred_len = preferred_len;
@@ -1422,6 +1423,13 @@ BOOL srv_io_q_net_sess_enum(char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps
if(!prs_align(ps))
return False;
+ if(!prs_uint32("ptr_user_name", ps, depth, &q_n->ptr_user_name))
+ return False;
+ if(!smb_io_unistr2("", &q_n->uni_user_name, q_n->ptr_user_name, ps, depth))
+ return False;
+
+ if(!prs_align(ps))
+ return False;
if(!prs_uint32("sess_level", ps, depth, &q_n->sess_level))
return False;