diff options
author | Tim Potter <tpot@samba.org> | 2001-06-25 06:13:27 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-06-25 06:13:27 +0000 |
commit | 6e0605c3ab266749a411fe50301020fac52eea98 (patch) | |
tree | adee5587718e0ee4897ab96f8a0df829da0a1308 /source3/rpc_parse | |
parent | dae746c639d03afea2d126d73f8bb6f0d794a50a (diff) | |
download | samba-6e0605c3ab266749a411fe50301020fac52eea98.tar.gz samba-6e0605c3ab266749a411fe50301020fac52eea98.tar.bz2 samba-6e0605c3ab266749a411fe50301020fac52eea98.zip |
Cosmetic fixups found while playing with the server manager. Added support
for NET_SRV_SET_INFO rpc call which is made when double-clicking on a
computer in the server manager and changing the description. We always
return NT_STATUS_NOPROBLEMO as NT doesn't seem to decode any error messages
passed back.
Maybe the changed comment string could be stored in a tdb and regurgitated
instead of the "server string" smb.conf parameter?
(This used to be commit d936ffedd90fe442f990c9ac2e172877f28d7230)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_srv.c | 73 |
1 files changed, 72 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index 9661b4edf1..6d24617f36 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -1,4 +1,3 @@ - /* * Unix SMB/Netbios implementation. * Version 1.9. @@ -2259,6 +2258,57 @@ void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv, } /******************************************************************* + Inits a SRV_R_NET_SRV_SET_INFO structure. + ********************************************************************/ + +void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv, + uint32 switch_value, uint32 status) +{ + DEBUG(5,("init_srv_r_net_srv_set_info\n")); + + srv->switch_value = switch_value; + srv->status = status; +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +BOOL srv_io_q_net_srv_set_info(char *desc, SRV_Q_NET_SRV_SET_INFO *q_n, + prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "srv_io_q_net_srv_set_info"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("ptr_srv_name ", ps, depth, &q_n->ptr_srv_name)) + return False; + if(!smb_io_unistr2("", &q_n->uni_srv_name, True, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value)) + return False; + + if (UNMARSHALLING(ps)) { + q_n->ctr = (SRV_INFO_CTR *) + prs_alloc_mem(ps, sizeof(SRV_INFO_CTR)); + + if (!q_n->ctr) + return False; + } + + if(!srv_io_info_ctr("ctr", q_n->ctr, ps, depth)) + return False; + + return True; +} + +/******************************************************************* Reads or writes a structure. ********************************************************************/ @@ -2282,6 +2332,27 @@ BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_stru return True; } +/******************************************************************* + Reads or writes a structure. + ********************************************************************/ + +BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n, + prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "srv_io_r_net_srv_set_info"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("switch_value ", ps, depth, &r_n->switch_value)) + return False; + + if(!prs_uint32("status ", ps, depth, &r_n->status)) + return False; + + return True; +} /******************************************************************* Reads or writes a structure. |