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 | 88ad00b82acc4636ab57dfe710af08ea85b82ff1 (patch) | |
tree | cd7a154b1e7e814870840c3a7c1255bb88ad0c72 /source/utils | |
parent | 1d3bd3c486bf9f6b6c9d5f6207f591f465517e1e (diff) | |
download | samba-88ad00b82acc4636ab57dfe710af08ea85b82ff1.tar.gz samba-88ad00b82acc4636ab57dfe710af08ea85b82ff1.tar.xz samba-88ad00b82acc4636ab57dfe710af08ea85b82ff1.zip |
added secrets.tdb and changed storage of trust account password to use
it
Diffstat (limited to 'source/utils')
-rw-r--r-- | source/utils/smbpasswd.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 7a0d0eeea9c..047a69419c5 100644 --- a/source/utils/smbpasswd.c +++ b/source/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)) { |