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/groupdb | |
parent | c809eec53fb1d2a36909e4934dff349f91e3359e (diff) | |
download | samba-fe72740e8221575921c22030d6d4fcb19201b03b.tar.gz |
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/groupdb')
-rw-r--r-- | source3/groupdb/mapping.c | 20 |
1 files changed, 10 insertions, 10 deletions
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; } |