From 646b3c4b920f4ae4d1289eeb10018cd9d069382a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 9 Aug 2017 18:14:23 +0200 Subject: [PATCH 1/2] s3:libads: Fix changing passwords with Kerberos BUG: https://bugzilla.samba.org/show_bug.cgi?id=12956 Signed-off-by: Andreas Schneider Reviewed-by: Richard Sharpe (cherry picked from commit b81ca4f9dcbb378a95fb3ac31bfd9a1cbe505d7d) --- source3/libads/krb5_setpw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c index 630c2e46631..bc96ac603b1 100644 --- a/source3/libads/krb5_setpw.c +++ b/source3/libads/krb5_setpw.c @@ -251,7 +251,7 @@ static ADS_STATUS ads_krb5_chg_password(const char *kdc_host, ret = krb5_set_password(context, &creds, discard_const_p(char, newpw), - princ, + NULL, &result_code, &result_code_string, &result_string); -- 2.14.0 From be45f32ffb1504f36b860195b480b661699de049 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 9 Aug 2017 12:14:34 +0200 Subject: [PATCH 2/2] blackbox: Add test for 'net ads changetrustpw' BUG: BUG: https://bugzilla.samba.org/show_bug.cgi?id=12956 Signed-off-by: Andreas Schneider Reviewed-by: Richard Sharpe Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Aug 11 22:09:27 CEST 2017 on sn-devel-144 (cherry picked from commit e2c0fd36ba54d984b554248aecffd3e4e7f43e1f) --- testprogs/blackbox/test_net_ads.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testprogs/blackbox/test_net_ads.sh b/testprogs/blackbox/test_net_ads.sh index 99b886f53eb..bbd99b676bd 100755 --- a/testprogs/blackbox/test_net_ads.sh +++ b/testprogs/blackbox/test_net_ads.sh @@ -33,6 +33,8 @@ testit "join" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD || failed testit "testjoin" $VALGRIND $net_tool ads testjoin -kP || failed=`expr $failed + 1` +testit "changetrustpw" $VALGRIND $net_tool ads changetrustpw || failed=`expr $failed + 1` + testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=`expr $failed + 1` # Test with kerberos method = secrets and keytab @@ -41,6 +43,8 @@ testit "join (decicated keytab)" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC testit "testjoin (dedicated keytab)" $VALGRIND $net_tool ads testjoin -kP || failed=`expr $failed + 1` +testit "changetrustpw (dedicated keytab)" $VALGRIND $net_tool ads changetrustpw || failed=`expr $failed + 1` + testit "leave (dedicated keytab)" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || failed=`expr $failed + 1` rm -f $dedicated_keytab_file -- 2.14.0