From fe72740e8221575921c22030d6d4fcb19201b03b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Jul 2012 15:07:23 +0930 Subject: 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 --- source3/smbd/close.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/smbd/close.c') diff --git a/source3/smbd/close.c b/source3/smbd/close.c index a3eedbfa6b..8633f82c0a 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -46,7 +46,7 @@ static NTSTATUS check_magic(struct files_struct *fsp) char *fname = NULL; NTSTATUS status; - if (!*lp_magicscript(SNUM(conn))) { + if (!*lp_magicscript(talloc_tos(), SNUM(conn))) { return NT_STATUS_OK; } @@ -62,13 +62,13 @@ static NTSTATUS check_magic(struct files_struct *fsp) p++; } - if (!strequal(lp_magicscript(SNUM(conn)),p)) { + if (!strequal(lp_magicscript(talloc_tos(), SNUM(conn)),p)) { status = NT_STATUS_OK; goto out; } - if (*lp_magicoutput(SNUM(conn))) { - magic_output = lp_magicoutput(SNUM(conn)); + if (*lp_magicoutput(talloc_tos(), SNUM(conn))) { + magic_output = lp_magicoutput(talloc_tos(), SNUM(conn)); } else { magic_output = talloc_asprintf(ctx, "%s.out", @@ -906,7 +906,7 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, files_struct *fsp) return NT_STATUS_OK; } - if(((errno == ENOTEMPTY)||(errno == EEXIST)) && *lp_veto_files(SNUM(conn))) { + if(((errno == ENOTEMPTY)||(errno == EEXIST)) && *lp_veto_files(talloc_tos(), SNUM(conn))) { /* * Check to see if the only thing in this directory are * vetoed files/directories. If so then delete them and -- cgit