summaryrefslogtreecommitdiff
path: root/source3/smbd/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/ipc.c')
-rw-r--r--source3/smbd/ipc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 7b82894c7f..132fdb30ef 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -1677,6 +1677,7 @@ static BOOL api_SamOEMChangePassword(int cnum,uint16 vuid, char *param,char *dat
fstring new_passwd;
struct smb_passwd *sampw = NULL;
char *p = param + 2;
+ int ret = True;
*rparam_len = 2;
*rparam = REALLOC(*rparam,*rparam_len);
@@ -1718,9 +1719,9 @@ static BOOL api_SamOEMChangePassword(int cnum,uint16 vuid, char *param,char *dat
*/
if(lp_unix_password_sync())
- chgpasswd(user,"", new_passwd, True);
+ ret = chgpasswd(user,"", new_passwd, True);
- if(change_oem_password( sampw, new_passwd, False)) {
+ if(ret && change_oem_password( sampw, new_passwd, False)) {
SSVAL(*rparam,0,NERR_Success);
}