diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-03-13 16:13:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:36 -0500 |
commit | f94e5af72e282f70ca5454cdf3aed510b747eb93 (patch) | |
tree | 2d8d5abd3e800d4dfe2f37dbf06c687bd02e81d9 /source/utils | |
parent | 34ae610bd5b9fd1210f16beac07a1c5984144ca7 (diff) | |
download | samba-f94e5af72e282f70ca5454cdf3aed510b747eb93.tar.gz samba-f94e5af72e282f70ca5454cdf3aed510b747eb93.tar.xz samba-f94e5af72e282f70ca5454cdf3aed510b747eb93.zip |
r21823: Let secrets_store_machine_password() also store the account name. Not used
yet, the next step will be a secrets_fetch_machine_account() function that
also pulls the account name to be used in the appropriate places.
Volker
Diffstat (limited to 'source/utils')
-rw-r--r-- | source/utils/net.c | 4 | ||||
-rw-r--r-- | source/utils/net_domain.c | 3 | ||||
-rw-r--r-- | source/utils/net_rpc_join.c | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/source/utils/net.c b/source/utils/net.c index 5a9b7d31ec5..acd7bfb797f 100644 --- a/source/utils/net.c +++ b/source/utils/net.c @@ -555,7 +555,9 @@ static int net_changesecretpw(int argc, const char **argv) trust_pw = get_pass("Enter machine password: ", opt_stdin); - if (!secrets_store_machine_password(trust_pw, lp_workgroup(), sec_channel_type)) { + if (!secrets_store_machine_password(trust_pw, global_myname(), + lp_workgroup(), + sec_channel_type)) { d_fprintf(stderr, "Unable to write the machine account password in the secrets database"); return 1; } diff --git a/source/utils/net_domain.c b/source/utils/net_domain.c index 4f7bc8ddecd..186cb9e8c00 100644 --- a/source/utils/net_domain.c +++ b/source/utils/net_domain.c @@ -146,7 +146,8 @@ int netdom_store_machine_account( const char *domain, DOM_SID *sid, const char * return -1; } - if (!secrets_store_machine_password(pw, domain, SEC_CHAN_WKSTA)) { + if (!secrets_store_machine_password(pw, global_myname(), domain, + SEC_CHAN_WKSTA)) { DEBUG(1,("Failed to save machine password\n")); return -1; } diff --git a/source/utils/net_rpc_join.c b/source/utils/net_rpc_join.c index ba3c6190126..01973d2635b 100644 --- a/source/utils/net_rpc_join.c +++ b/source/utils/net_rpc_join.c @@ -400,7 +400,9 @@ int net_rpc_join_newstyle(int argc, const char **argv) goto done; } - if (!secrets_store_machine_password(clear_trust_password, domain, sec_channel_type)) { + if (!secrets_store_machine_password(clear_trust_password, + global_myname(), domain, + sec_channel_type)) { DEBUG(0, ("error storing plaintext domain secrets for %s\n", domain)); } |