summaryrefslogtreecommitdiff
path: root/source3/auth/auth_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth/auth_unix.c')
-rw-r--r--source3/auth/auth_unix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 1d29389716..efe5203b23 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -30,10 +30,12 @@
**/
static BOOL update_smbpassword_file(const char *user, const char *password)
{
- struct samu *sampass = NULL;
+ struct samu *sampass;
BOOL ret;
- pdb_init_sam(&sampass);
+ if ( !(sampass = samu_new( NULL )) ) {
+ return False;
+ }
become_root();
ret = pdb_getsampwnam(sampass, user);