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/lib/util.c | |
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/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index fa46448296..9c380c5a02 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -669,7 +669,7 @@ char *automount_lookup(TALLOC_CTX *ctx, const char *user_name) char *nis_result; /* yp_match inits this */ int nis_result_len; /* and set this */ char *nis_domain; /* yp_get_default_domain inits this */ - char *nis_map = (char *)lp_nis_home_map_name(); + char *nis_map = lp_nis_home_map_name(talloc_tos()); if ((nis_error = yp_get_default_domain(&nis_domain)) != 0) { DEBUG(3, ("YP Error: %s\n", yperr_string(nis_error))); @@ -899,7 +899,7 @@ void smb_panic_s3(const char *why) prctl(PR_SET_PTRACER, getpid(), 0, 0, 0); #endif - cmd = lp_panic_action(); + cmd = lp_panic_action(talloc_tos()); if (cmd && *cmd) { DEBUG(0, ("smb_panic(): calling panic action [%s]\n", cmd)); result = system(cmd); |