From 51f88b4f7c0b87dd4a8932168c512b29a4915045 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 May 1998 02:06:53 +0000 Subject: Fixed changed calls to machine password locking code. Jeremy. (This used to be commit dfdc9b0b1e47717b83e54f1cf726e40122cf9baf) --- source3/utils/smbpasswd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/utils/smbpasswd.c') diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 050be7e9b8..cc883ff51b 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/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. -- cgit