Fix bug #137: krb5_set_password is already defined in MIT 1.3 libs, so
authorJim McDonough <jmcd@samba.org>
Fri, 30 May 2003 19:51:09 +0000 (19:51 +0000)
committerJim McDonough <jmcd@samba.org>
Fri, 30 May 2003 19:51:09 +0000 (19:51 +0000)
we wouldn't build.
(This used to be commit 0e9836c4e9e71494b10d71a5f3d5f7da2888c5ef)

source3/libads/krb5_setpw.c
source3/utils/net_ads.c

index 856809deccaa06c3b9ba51f9db10d25b105e2a0d..ece305f7e8f9e57d078b434a19fe246dacc77d6e 100644 (file)
@@ -457,8 +457,8 @@ static ADS_STATUS do_krb5_kpasswd_request(krb5_context context,
        return ADS_SUCCESS;
 }
 
-ADS_STATUS krb5_set_password(const char *kdc_host, const char *princ, const char *newpw
-                            int time_offset)
+ADS_STATUS ads_krb5_set_password(const char *kdc_host, const char *princ
+                                const char *newpw, int time_offset)
 {
 
        ADS_STATUS aret;
@@ -651,8 +651,8 @@ ADS_STATUS kerberos_set_password(const char *kpasswd_server,
        return krb5_chg_password(kpasswd_server, target_principal,
                                    auth_password, new_password, time_offset);
     else
-       return krb5_set_password(kpasswd_server, target_principal,
-                                new_password, time_offset);
+       return ads_krb5_set_password(kpasswd_server, target_principal,
+                                    new_password, time_offset);
 }
 
 
@@ -679,7 +679,8 @@ ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
         */
        asprintf(&principal, "%s$@%s", host, ads->config.realm);
        
-       status = krb5_set_password(ads->auth.kdc_server, principal, password, ads->auth.time_offset);
+       status = ads_krb5_set_password(ads->auth.kdc_server, principal, 
+                                      password, ads->auth.time_offset);
        
        free(host);
        free(principal);
index 626db96994e00cf5749346fdd152c6b0c62f0f7a..5051f1818810ec998d2a92b1e07e9b8a3166f350 100644 (file)
@@ -300,7 +300,8 @@ static int ads_user_add(int argc, const char **argv)
 
        /* try setting the password */
        asprintf(&upn, "%s@%s", argv[0], ads->config.realm);
-       status = krb5_set_password(ads->auth.kdc_server, upn, argv[1], ads->auth.time_offset);
+       status = ads_krb5_set_password(ads->auth.kdc_server, upn, argv[1], 
+                                      ads->auth.time_offset);
        safe_free(upn);
        if (ADS_ERR_OK(status)) {
                d_printf("User %s added\n", argv[0]);