diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-05-08 10:42:21 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-05-08 10:42:21 +0000 |
commit | 2958dfcdf87d5169fe1152806be6ad03acb04d88 (patch) | |
tree | 3eb5efae1375bb736cd7b73655ea7a1cb5503ad8 /source3/utils | |
parent | 722a4bfa9feed9f58d9b032d951ee62c81611086 (diff) | |
download | samba-2958dfcdf87d5169fe1152806be6ad03acb04d88.tar.gz samba-2958dfcdf87d5169fe1152806be6ad03acb04d88.tar.bz2 samba-2958dfcdf87d5169fe1152806be6ad03acb04d88.zip |
added secrets.tdb and changed storage of trust account password to use
it
(This used to be commit 88ad00b82acc4636ab57dfe710af08ea85b82ff1)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbpasswd.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 7a0d0eeea9..047a69419c 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -97,22 +97,12 @@ static int join_domain(char *domain, char *remote) } /* - * Create the machine account password file. - */ - if(!trust_password_lock( domain, global_myname, True)) { - fprintf(stderr, "Unable to open the machine account password file for \ -machine %s in domain %s.\n", global_myname, domain); - return 1; - } - - /* * Write the old machine account password. */ - if(!set_trust_account_password( orig_trust_passwd_hash)) { + if(!set_trust_account_password(domain, orig_trust_passwd_hash)) { fprintf(stderr, "Unable to write the machine account password for \ machine %s in domain %s.\n", global_myname, domain); - trust_password_unlock(); return 1; } @@ -127,15 +117,13 @@ machine %s in domain %s.\n", global_myname, domain); if(!*remote_machine) { fprintf(stderr, "No password server list given in smb.conf - \ unable to join domain.\n"); - trust_password_unlock(); return 1; } ret = change_trust_account_password( domain, remote_machine); - trust_password_unlock(); if(!ret) { - trust_password_delete( domain, global_myname); + trust_password_delete(domain); fprintf(stderr,"Unable to join domain %s.\n",domain); } else { printf("Joined domain %s.\n",domain); @@ -579,6 +567,7 @@ int main(int argc, char **argv) codepage_initialise(lp_client_code_page()); load_interfaces(); + secrets_init(); /* Check the effective uid - make sure we are not setuid */ if ((geteuid() == (uid_t)0) && (getuid() != (uid_t)0)) { |