summaryrefslogtreecommitdiff
path: root/source3/libads/krb5_setpw.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-08-19 22:47:10 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-08-19 22:47:10 +0000
commitf1be3a5c5defc2df94550b90b7dd2ed4ab0cb1f2 (patch)
treee79dfbfedf8fbdaed7873463939fbe28c2b07070 /source3/libads/krb5_setpw.c
parentec8b32df568260446b815619815e94a7e1b3fd4e (diff)
downloadsamba-f1be3a5c5defc2df94550b90b7dd2ed4ab0cb1f2.tar.gz
samba-f1be3a5c5defc2df94550b90b7dd2ed4ab0cb1f2.tar.bz2
samba-f1be3a5c5defc2df94550b90b7dd2ed4ab0cb1f2.zip
- Make 'net' use a single funciton for setting the 'use machine account' code.
- Make winbindd try to use kerberos for connections to DCs, so that it can access RA=2 servers, particularly for netlogon. - Make rpcclient follow the new flags for the NETLOGON pipe - Make all the code that uses schannel use the centralised functions for doing so. Andrew Bartlett (This used to be commit 96b4187963cedcfe158ff02868929b8cf81c6ebf)
Diffstat (limited to 'source3/libads/krb5_setpw.c')
-rw-r--r--source3/libads/krb5_setpw.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c
index d1da118bb8..9cf15221a8 100644
--- a/source3/libads/krb5_setpw.c
+++ b/source3/libads/krb5_setpw.c
@@ -664,25 +664,22 @@ ADS_STATUS kerberos_set_password(const char *kpasswd_server,
* @return status of password change
**/
ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
- const char *hostname,
+ const char *machine_account,
const char *password)
{
ADS_STATUS status;
- char *host = strdup(hostname);
- char *principal;
-
- strlower_m(host);
+ char *principal = NULL;
/*
- we need to use the '$' form of the name here, as otherwise the
- server might end up setting the password for a user instead
+ we need to use the '$' form of the name here (the machine account name),
+ as otherwise the server might end up setting the password for a user
+ instead
*/
- asprintf(&principal, "%s$@%s", host, ads->config.realm);
+ asprintf(&principal, "%s@%s", machine_account, ads->config.realm);
status = ads_krb5_set_password(ads->auth.kdc_server, principal,
password, ads->auth.time_offset);
- free(host);
free(principal);
return status;