svn commit: samba r3711 - branches/SAMBA_3_0/source/libads
trunk/source/libads
gd at samba.org
gd at samba.org
Fri Nov 12 23:13:03 GMT 2004
Author: gd
Date: 2004-11-12 23:13:03 +0000 (Fri, 12 Nov 2004)
New Revision: 3711
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3711
Log:
Fix KRB5_SETPW-defines, no change in behaviour.
A value of '2' is due to an expired internet draft, while 0xff80 comes
from RFC3244. See Bugzilla #1661 for details.
Thanks to Luke Mewburn <lukem at NetBSD.org> for his research.
Guenther
Modified:
branches/SAMBA_3_0/source/libads/krb5_setpw.c
trunk/source/libads/krb5_setpw.c
Changeset:
Modified: branches/SAMBA_3_0/source/libads/krb5_setpw.c
===================================================================
--- branches/SAMBA_3_0/source/libads/krb5_setpw.c 2004-11-12 22:15:55 UTC (rev 3710)
+++ branches/SAMBA_3_0/source/libads/krb5_setpw.c 2004-11-12 23:13:03 UTC (rev 3711)
@@ -25,10 +25,8 @@
#define DEFAULT_KPASSWD_PORT 464
#define KRB5_KPASSWD_VERS_CHANGEPW 1
-#ifndef KRB5_KPASSWD_VERS_SETPW
-#define KRB5_KPASSWD_VERS_SETPW 2
-#endif
-#define KRB5_KPASSWD_VERS_SETPW_MS 0xff80
+#define KRB5_KPASSWD_VERS_SETPW 0xff80
+#define KRB5_KPASSWD_VERS_SETPW_ALT 2
#define KRB5_KPASSWD_ACCESSDENIED 5
#define KRB5_KPASSWD_BAD_VERSION 6
#define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7
@@ -140,7 +138,7 @@
if (pversion == KRB5_KPASSWD_VERS_CHANGEPW)
setpw = data_blob(passwd, strlen(passwd));
else if (pversion == KRB5_KPASSWD_VERS_SETPW ||
- pversion == KRB5_KPASSWD_VERS_SETPW_MS)
+ pversion == KRB5_KPASSWD_VERS_SETPW_ALT)
setpw = encode_krb5_setpw(princ, passwd);
else
return EINVAL;
@@ -252,7 +250,7 @@
/* FIXME: According to standard there is only one type of reply */
if (vnum != KRB5_KPASSWD_VERS_SETPW &&
- vnum != KRB5_KPASSWD_VERS_SETPW_MS &&
+ vnum != KRB5_KPASSWD_VERS_SETPW_ALT &&
vnum != KRB5_KPASSWD_VERS_CHANGEPW) {
DEBUG(1,("Bad vnum (%d) from kpasswd server\n", vnum));
return KRB5KDC_ERR_BAD_PVNO;
@@ -557,7 +555,7 @@
/* we might have to call krb5_free_creds(...) from now on ... */
aret = do_krb5_kpasswd_request(context, kdc_host,
- KRB5_KPASSWD_VERS_SETPW_MS,
+ KRB5_KPASSWD_VERS_SETPW,
credsp, princ, newpw);
krb5_free_creds(context, credsp);
Modified: trunk/source/libads/krb5_setpw.c
===================================================================
--- trunk/source/libads/krb5_setpw.c 2004-11-12 22:15:55 UTC (rev 3710)
+++ trunk/source/libads/krb5_setpw.c 2004-11-12 23:13:03 UTC (rev 3711)
@@ -25,10 +25,8 @@
#define DEFAULT_KPASSWD_PORT 464
#define KRB5_KPASSWD_VERS_CHANGEPW 1
-#ifndef KRB5_KPASSWD_VERS_SETPW
-#define KRB5_KPASSWD_VERS_SETPW 2
-#endif
-#define KRB5_KPASSWD_VERS_SETPW_MS 0xff80
+#define KRB5_KPASSWD_VERS_SETPW 0xff80
+#define KRB5_KPASSWD_VERS_SETPW_ALT 2
#define KRB5_KPASSWD_ACCESSDENIED 5
#define KRB5_KPASSWD_BAD_VERSION 6
#define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7
@@ -140,7 +138,7 @@
if (pversion == KRB5_KPASSWD_VERS_CHANGEPW)
setpw = data_blob(passwd, strlen(passwd));
else if (pversion == KRB5_KPASSWD_VERS_SETPW ||
- pversion == KRB5_KPASSWD_VERS_SETPW_MS)
+ pversion == KRB5_KPASSWD_VERS_SETPW_ALT)
setpw = encode_krb5_setpw(princ, passwd);
else
return EINVAL;
@@ -252,7 +250,7 @@
/* FIXME: According to standard there is only one type of reply */
if (vnum != KRB5_KPASSWD_VERS_SETPW &&
- vnum != KRB5_KPASSWD_VERS_SETPW_MS &&
+ vnum != KRB5_KPASSWD_VERS_SETPW_ALT &&
vnum != KRB5_KPASSWD_VERS_CHANGEPW) {
DEBUG(1,("Bad vnum (%d) from kpasswd server\n", vnum));
return KRB5KDC_ERR_BAD_PVNO;
@@ -557,7 +555,7 @@
/* we might have to call krb5_free_creds(...) from now on ... */
aret = do_krb5_kpasswd_request(context, kdc_host,
- KRB5_KPASSWD_VERS_SETPW_MS,
+ KRB5_KPASSWD_VERS_SETPW,
credsp, princ, newpw);
krb5_free_creds(context, credsp);
More information about the samba-cvs
mailing list