Author: gd
Date: 2006-06-15 16:09:31 +0000 (Thu, 15 Jun 2006)
New Revision: 16261

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16261

Log:
Smaller fixes for net ads password.

Guenther

Modified:
   branches/SAMBA_3_0/source/utils/net_ads.c
   trunk/source/utils/net_ads.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_ads.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_ads.c   2006-06-15 15:24:20 UTC (rev 
16260)
+++ branches/SAMBA_3_0/source/utils/net_ads.c   2006-06-15 16:09:31 UTC (rev 
16261)
@@ -1472,7 +1472,7 @@
 
        /* use the realm so we can eventually change passwords for users 
        in realms other than default */
-       if (!(ads = ads_init(realm, NULL, NULL))) {
+       if (!(ads = ads_init(realm, opt_workgroup, NULL))) {
                return -1;
        }
 
@@ -1496,7 +1496,7 @@
        ret = kerberos_set_password(ads->auth.kdc_server, auth_principal, 
                                auth_password, user, new_password, 
ads->auth.time_offset);
        if (!ADS_ERR_OK(ret)) {
-               d_fprintf(stderr, "Password change failed :-( ...\n");
+               d_fprintf(stderr, "Password change failed: %s\n", 
ads_errstr(ret));
                ads_destroy(&ads);
                return -1;
        }

Modified: trunk/source/utils/net_ads.c
===================================================================
--- trunk/source/utils/net_ads.c        2006-06-15 15:24:20 UTC (rev 16260)
+++ trunk/source/utils/net_ads.c        2006-06-15 16:09:31 UTC (rev 16261)
@@ -1472,7 +1472,7 @@
 
        /* use the realm so we can eventually change passwords for users 
        in realms other than default */
-       if (!(ads = ads_init(realm, NULL, NULL))) {
+       if (!(ads = ads_init(realm, opt_workgroup, NULL))) {
                return -1;
        }
 
@@ -1496,7 +1496,7 @@
        ret = kerberos_set_password(ads->auth.kdc_server, auth_principal, 
                                auth_password, user, new_password, 
ads->auth.time_offset);
        if (!ADS_ERR_OK(ret)) {
-               d_fprintf(stderr, "Password change failed :-( ...\n");
+               d_fprintf(stderr, "Password change failed: %s\n", 
ads_errstr(ret));
                ads_destroy(&ads);
                return -1;
        }

Reply via email to