diff options
author | Simo Sorce <idra@samba.org> | 2001-08-24 07:51:59 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-08-24 07:51:59 +0000 |
commit | 0174ccc0d6f34e84b201031a4c3eb58763a19770 (patch) | |
tree | e25f7a41bc8cc4dcb08b55c4f9e7c11056617e24 /source3/rpc_server/srv_reg.c | |
parent | 659774bffdf926f461dfe497160c1aabc8773c4d (diff) | |
download | samba-0174ccc0d6f34e84b201031a4c3eb58763a19770.tar.gz samba-0174ccc0d6f34e84b201031a4c3eb58763a19770.tar.bz2 samba-0174ccc0d6f34e84b201031a4c3eb58763a19770.zip |
let admins also abort a shutdown
(This used to be commit 3b40ec4f149a8813c1d68f184858e2ddd605d8fd)
Diffstat (limited to 'source3/rpc_server/srv_reg.c')
-rw-r--r-- | source3/rpc_server/srv_reg.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c index 105230a22f..8aa5c4bddf 100644 --- a/source3/rpc_server/srv_reg.c +++ b/source3/rpc_server/srv_reg.c @@ -160,6 +160,32 @@ static BOOL api_reg_shutdown(pipes_struct *p) return True; } +/******************************************************************* + api_reg_abort_shutdown + ********************************************************************/ + +static BOOL api_reg_abort_shutdown(pipes_struct *p) +{ + REG_Q_ABORT_SHUTDOWN q_u; + REG_R_ABORT_SHUTDOWN r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + /* grab the reg shutdown */ + if(!reg_io_q_abort_shutdown("", &q_u, data, 0)) + return False; + + r_u.status = _reg_abort_shutdown(p, &q_u, &r_u); + + if(!reg_io_r_abort_shutdown("", &r_u, rdata, 0)) + return False; + + return True; +} + /******************************************************************* array of \PIPE\reg operations @@ -171,7 +197,7 @@ static struct api_struct api_reg_cmds[] = { "REG_OPEN" , REG_OPEN_HKLM , api_reg_open }, { "REG_INFO" , REG_INFO , api_reg_info }, { "REG_SHUTDOWN" , REG_SHUTDOWN , api_reg_shutdown }, -/* { "REG_ABORT_SHUTDOWN", REG_ABORT_SHUTDOWN, api_reg_abrot_shutdown }, */ + { "REG_ABORT_SHUTDOWN", REG_ABORT_SHUTDOWN, api_reg_abort_shutdown }, { NULL, 0 , NULL } }; |