summaryrefslogtreecommitdiff
path: root/source3/rpc_server/samr/srv_samr_chgpasswd.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-07-18 15:07:23 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-07-18 15:07:23 +0930
commitfe72740e8221575921c22030d6d4fcb19201b03b (patch)
tree0b1bb254e23d6541eede8f2ff4494af477fd5566 /source3/rpc_server/samr/srv_samr_chgpasswd.c
parentc809eec53fb1d2a36909e4934dff349f91e3359e (diff)
downloadsamba-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/samr/srv_samr_chgpasswd.c')
-rw-r--r--source3/rpc_server/samr/srv_samr_chgpasswd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/rpc_server/samr/srv_samr_chgpasswd.c b/source3/rpc_server/samr/srv_samr_chgpasswd.c
index 94d7021349..51c0d0f96a 100644
--- a/source3/rpc_server/samr/srv_samr_chgpasswd.c
+++ b/source3/rpc_server/samr/srv_samr_chgpasswd.c
@@ -582,12 +582,12 @@ bool chgpasswd(const char *name, const char *rhost, const struct passwd *pass,
return false;
}
- passwordprogram = talloc_strdup(ctx, lp_passwd_program());
+ passwordprogram = lp_passwd_program(ctx);
if (!passwordprogram || !*passwordprogram) {
DEBUG(2, ("chgpasswd: Null password program - no password changing\n"));
return false;
}
- chatsequence = talloc_strdup(ctx, lp_passwd_chat());
+ chatsequence = lp_passwd_chat(ctx);
if (!chatsequence || !*chatsequence) {
DEBUG(2, ("chgpasswd: Null chat sequence - no password changing\n"));
return false;
@@ -938,12 +938,12 @@ NTSTATUS check_password_complexity(const char *username,
char *cmd;
/* Use external script to check password complexity */
- if ((lp_check_password_script() == NULL)
- || (*(lp_check_password_script()) == '\0')) {
+ if ((lp_check_password_script(tosctx) == NULL)
+ || (*(lp_check_password_script(tosctx)) == '\0')) {
return NT_STATUS_OK;
}
- cmd = talloc_string_sub(tosctx, lp_check_password_script(), "%u",
+ cmd = talloc_string_sub(tosctx, lp_check_password_script(tosctx), "%u",
username);
if (!cmd) {
return NT_STATUS_PASSWORD_RESTRICTION;