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/groupdb/mapping.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source3/groupdb') diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 2c0fea0cb9..c6fcc8aa71 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -213,11 +213,11 @@ int smb_create_group(const char *unix_group, gid_t *new_gid) /* defer to scripts */ - if ( *lp_addgroup_script() ) { + if ( *lp_addgroup_script(talloc_tos()) ) { TALLOC_CTX *ctx = talloc_tos(); add_script = talloc_strdup(ctx, - lp_addgroup_script()); + lp_addgroup_script(ctx)); if (!add_script) { return -1; } @@ -269,11 +269,11 @@ int smb_delete_group(const char *unix_group) /* defer to scripts */ - if ( *lp_delgroup_script() ) { + if ( *lp_delgroup_script(talloc_tos()) ) { TALLOC_CTX *ctx = talloc_tos(); del_script = talloc_strdup(ctx, - lp_delgroup_script()); + lp_delgroup_script(ctx)); if (!del_script) { return -1; } @@ -304,11 +304,11 @@ int smb_set_primary_group(const char *unix_group, const char* unix_user) /* defer to scripts */ - if ( *lp_setprimarygroup_script() ) { + if ( *lp_setprimarygroup_script(talloc_tos()) ) { TALLOC_CTX *ctx = talloc_tos(); add_script = talloc_strdup(ctx, - lp_setprimarygroup_script()); + lp_setprimarygroup_script(ctx)); if (!add_script) { return -1; } @@ -346,11 +346,11 @@ int smb_add_user_group(const char *unix_group, const char *unix_user) /* defer to scripts */ - if ( *lp_addusertogroup_script() ) { + if ( *lp_addusertogroup_script(talloc_tos()) ) { TALLOC_CTX *ctx = talloc_tos(); add_script = talloc_strdup(ctx, - lp_addusertogroup_script()); + lp_addusertogroup_script(ctx)); if (!add_script) { return -1; } @@ -386,11 +386,11 @@ int smb_delete_user_group(const char *unix_group, const char *unix_user) /* defer to scripts */ - if ( *lp_deluserfromgroup_script() ) { + if ( *lp_deluserfromgroup_script(talloc_tos()) ) { TALLOC_CTX *ctx = talloc_tos(); del_script = talloc_strdup(ctx, - lp_deluserfromgroup_script()); + lp_deluserfromgroup_script(ctx)); if (!del_script) { return -1; } -- cgit