summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/chgpasswd.c4
-rw-r--r--source3/smbd/lanman.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index f8ae7233c6..8df824a323 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -768,7 +768,9 @@ static NTSTATUS check_oem_password(const char *user,
*hnd = NULL;
- pdb_init_sam(&sampass);
+ if ( !(sampass = samu_new( NULL )) ) {
+ return NT_STATUS_NO_MEMORY;
+ }
become_root();
ret = pdb_getsampwnam(sampass, user);
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 03f7f8e5c8..ca6cc57cc3 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1981,8 +1981,8 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid, char *para
goto done;
}
- if (!NT_STATUS_IS_OK(pdb_init_sam_talloc(mem_ctx, &sampw))) {
- DEBUG(10, ("pdb_init_sam_talloc failed\n"));
+ if ( !(sampw = samu_new(mem_ctx)) ) {
+ DEBUG(0, ("samu_new() failed!\n"));
goto done;
}