summaryrefslogtreecommitdiffstats
path: root/source/rpc_parse
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-03-23 20:57:03 +0000
committerSimo Sorce <idra@samba.org>2005-03-23 20:57:03 +0000
commit7ef044716aee14a499f139e3368aeb31c23db24c (patch)
tree2b542756c8ddac226a11e476ed116d08d7f36b4e /source/rpc_parse
parent0fb58afd8b2a6aa2488a998f4d275a6333f51df1 (diff)
downloadsamba-7ef044716aee14a499f139e3368aeb31c23db24c.tar.gz
samba-7ef044716aee14a499f139e3368aeb31c23db24c.tar.xz
samba-7ef044716aee14a499f139e3368aeb31c23db24c.zip
r6004: Let's make server manager able to kill a user session.
This will send a shutdown command to the right process by pid read from the sessions list.
Diffstat (limited to 'source/rpc_parse')
-rw-r--r--source/rpc_parse/parse_srv.c73
1 files changed, 73 insertions, 0 deletions
diff --git a/source/rpc_parse/parse_srv.c b/source/rpc_parse/parse_srv.c
index 84c45b59014..7d15eda630f 100644
--- a/source/rpc_parse/parse_srv.c
+++ b/source/rpc_parse/parse_srv.c
@@ -1996,6 +1996,79 @@ BOOL srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_stru
}
/*******************************************************************
+ Inits a SRV_Q_NET_SESS_DEL structure.
+********************************************************************/
+
+void init_srv_q_net_sess_del(SRV_Q_NET_SESS_DEL *q_n, const char *srv_name,
+ const char *cli_name, const char *user_name)
+{
+ DEBUG(5,("init_q_net_sess_enum\n"));
+
+ init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name);
+ init_buf_unistr2(&q_n->uni_cli_name, &q_n->ptr_cli_name, cli_name);
+ init_buf_unistr2(&q_n->uni_user_name, &q_n->ptr_user_name, user_name);
+}
+
+/*******************************************************************
+ Reads or writes a structure.
+********************************************************************/
+
+BOOL srv_io_q_net_sess_del(const char *desc, SRV_Q_NET_SESS_DEL *q_n, prs_struct *ps, int depth)
+{
+ if (q_n == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "srv_io_q_net_sess_del");
+ 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("ptr_cli_name", ps, depth, &q_n->ptr_cli_name))
+ return False;
+ if(!smb_io_unistr2("", &q_n->uni_cli_name, q_n->ptr_cli_name, ps, depth))
+ return False;
+
+ 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;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes a structure.
+********************************************************************/
+
+BOOL srv_io_r_net_sess_del(const char *desc, SRV_R_NET_SESS_DEL *r_n, prs_struct *ps, int depth)
+{
+ if (r_n == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "srv_io_r_net_sess_del");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_werror("status", ps, depth, &r_n->status))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
Inits a CONN_INFO_0 structure
********************************************************************/