diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 15:07:23 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 15:07:23 +0930 |
commit | fe72740e8221575921c22030d6d4fcb19201b03b (patch) | |
tree | 0b1bb254e23d6541eede8f2ff4494af477fd5566 /source3/rpc_server/winreg | |
parent | c809eec53fb1d2a36909e4934dff349f91e3359e (diff) | |
download | samba-fe72740e8221575921c22030d6d4fcb19201b03b.tar.gz samba-fe72740e8221575921c22030d6d4fcb19201b03b.tar.bz2 samba-fe72740e8221575921c22030d6d4fcb19201b03b.zip |
loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().
A simple patch, but hits a lot of files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/rpc_server/winreg')
-rw-r--r-- | source3/rpc_server/winreg/srv_winreg_nt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/rpc_server/winreg/srv_winreg_nt.c b/source3/rpc_server/winreg/srv_winreg_nt.c index 176848b0d6..38040d4e51 100644 --- a/source3/rpc_server/winreg/srv_winreg_nt.c +++ b/source3/rpc_server/winreg/srv_winreg_nt.c @@ -528,7 +528,7 @@ WERROR _winreg_InitiateSystemShutdownEx(struct pipes_struct *p, int ret = -1; bool can_shutdown = false; - shutdown_script = talloc_strdup(p->mem_ctx, lp_shutdown_script()); + shutdown_script = lp_shutdown_script(p->mem_ctx); if (!shutdown_script) { return WERR_NOMEM; } @@ -610,7 +610,7 @@ WERROR _winreg_InitiateSystemShutdownEx(struct pipes_struct *p, WERROR _winreg_AbortSystemShutdown(struct pipes_struct *p, struct winreg_AbortSystemShutdown *r) { - const char *abort_shutdown_script = lp_abort_shutdown_script(); + const char *abort_shutdown_script = lp_abort_shutdown_script(talloc_tos()); int ret = -1; bool can_shutdown = false; @@ -661,7 +661,7 @@ static int validate_reg_filename(TALLOC_CTX *ctx, char **pp_fname ) continue; } - share_path = lp_pathname(snum); + share_path = lp_pathname(talloc_tos(), snum); /* make sure we have a path (e.g. [homes] ) */ if (strlen(share_path) == 0) { @@ -712,7 +712,7 @@ WERROR _winreg_RestoreKey(struct pipes_struct *p, } DEBUG(2,("_winreg_RestoreKey: Restoring [%s] from %s in share %s\n", - regkey->key->name, fname, lp_servicename(snum) )); + regkey->key->name, fname, lp_servicename(talloc_tos(), snum) )); return reg_restorekey(regkey, fname); } @@ -746,7 +746,7 @@ WERROR _winreg_SaveKey(struct pipes_struct *p, return WERR_OBJECT_PATH_INVALID; DEBUG(2,("_winreg_SaveKey: Saving [%s] to %s in share %s\n", - regkey->key->name, fname, lp_servicename(snum) )); + regkey->key->name, fname, lp_servicename(talloc_tos(), snum) )); return reg_savekey(regkey, fname); } |