summaryrefslogtreecommitdiff
path: root/source3/rpc_server/samr/srv_samr_nt.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_nt.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_nt.c')
-rw-r--r--source3/rpc_server/samr/srv_samr_nt.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index d7cebb4535..1065f2ac6a 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -545,7 +545,8 @@ NTSTATUS _samr_GetUserPwInfo(struct pipes_struct *p,
&password_properties);
unbecome_root();
- if (lp_check_password_script() && *lp_check_password_script()) {
+ if (lp_check_password_script(talloc_tos())
+ && *lp_check_password_script(talloc_tos())) {
password_properties |= DOMAIN_PASSWORD_COMPLEX;
}
@@ -2050,7 +2051,8 @@ NTSTATUS _samr_ChangePasswordUser3(struct pipes_struct *p,
unix_to_nt_time_abs((NTTIME *)&dominfo->max_password_age, u_expire);
unix_to_nt_time_abs((NTTIME *)&dominfo->min_password_age, u_min_age);
- if (lp_check_password_script() && *lp_check_password_script()) {
+ if (lp_check_password_script(talloc_tos())
+ && *lp_check_password_script(talloc_tos())) {
dominfo->password_properties |= DOMAIN_PASSWORD_COMPLEX;
}
@@ -3313,7 +3315,7 @@ static NTSTATUS query_dom_info_1(TALLOC_CTX *mem_ctx,
unix_to_nt_time_abs((NTTIME *)&r->max_password_age, u_expire);
unix_to_nt_time_abs((NTTIME *)&r->min_password_age, u_min_age);
- if (lp_check_password_script() && *lp_check_password_script()) {
+ if (lp_check_password_script(talloc_tos()) && *lp_check_password_script(talloc_tos())) {
r->password_properties |= DOMAIN_PASSWORD_COMPLEX;
}
@@ -3350,7 +3352,7 @@ static NTSTATUS query_dom_info_2(TALLOC_CTX *mem_ctx,
unbecome_root();
- r->oem_information.string = lp_serverstring();
+ r->oem_information.string = lp_serverstring(r);
r->domain_name.string = lp_workgroup();
r->primary.string = lp_netbios_name();
r->sequence_num = seq_num;
@@ -3394,7 +3396,7 @@ static NTSTATUS query_dom_info_3(TALLOC_CTX *mem_ctx,
static NTSTATUS query_dom_info_4(TALLOC_CTX *mem_ctx,
struct samr_DomOEMInformation *r)
{
- r->oem_information.string = lp_serverstring();
+ r->oem_information.string = lp_serverstring(r);
return NT_STATUS_OK;
}
@@ -6266,7 +6268,7 @@ NTSTATUS _samr_GetDomPwInfo(struct pipes_struct *p,
&password_properties);
unbecome_root();
- if (lp_check_password_script() && *lp_check_password_script()) {
+ if (lp_check_password_script(talloc_tos()) && *lp_check_password_script(talloc_tos())) {
password_properties |= DOMAIN_PASSWORD_COMPLEX;
}