diff options
author | Jeremy Allison <jra@samba.org> | 1998-05-07 02:06:53 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-05-07 02:06:53 +0000 |
commit | dfdc9b0b1e47717b83e54f1cf726e40122cf9baf (patch) | |
tree | c6236c0413fe36417b17f52c8d5e66d567606560 | |
parent | 95f7b03285c42e8f5573690939b79afc7e686908 (diff) | |
download | samba-dfdc9b0b1e47717b83e54f1cf726e40122cf9baf.tar.gz samba-dfdc9b0b1e47717b83e54f1cf726e40122cf9baf.tar.xz samba-dfdc9b0b1e47717b83e54f1cf726e40122cf9baf.zip |
Fixed changed calls to machine password locking code.
Jeremy.
-rw-r--r-- | source/utils/smbpasswd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 050be7e9b84..cc883ff51b7 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -169,7 +169,6 @@ static int join_domain( char *domain, char *remote) fstring machine_passwd; unsigned char machine_passwd_hash[16]; unsigned char new_machine_passwd_hash[16]; - void *vp; int ret = 1; fstrcpy(remote_machine, remote ? remote : ""); @@ -196,20 +195,20 @@ for that domain.\n", prog_name, domain); /* * Get the machine account password. */ - if((vp = machine_password_lock( domain, global_myname, True)) == NULL) { + if(!machine_password_lock( domain, global_myname, True)) { fprintf(stderr, "%s: unable to open the machine account password file for \ machine %s in domain %s.\n", prog_name, global_myname, domain); return 1; } - if(!set_machine_account_password( vp, new_machine_passwd_hash)) { + if(!set_machine_account_password( new_machine_passwd_hash)) { fprintf(stderr, "%s: unable to read the machine account password for \ machine %s in domain %s.\n", prog_name, global_myname, domain); - machine_password_unlock(vp); + machine_password_unlock(); return 1; } - machine_password_unlock(vp); + machine_password_unlock(); /* * If we are given a remote machine assume this is the PDC. |