diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2008-11-04 01:50:02 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2008-11-04 01:50:02 +0000 |
| commit | 5a73a3b9774075842e605ec5690fa52c358fa0a5 (patch) | |
| tree | e2821f908bbd335b3343808d2c07882908230247 /src/lib | |
| parent | 2bba411f44a2a5384fb67043edb7892621876eb0 (diff) | |
| download | krb5-5a73a3b9774075842e605ec5690fa52c358fa0a5.tar.gz krb5-5a73a3b9774075842e605ec5690fa52c358fa0a5.tar.xz krb5-5a73a3b9774075842e605ec5690fa52c358fa0a5.zip | |
Check in Nalin's patch, and a test case for changing passwords via kinit
when +needchange is set. Update dependencies.
ticket: 5867
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20966 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/os/Makefile.in | 3 | ||||
| -rw-r--r-- | src/lib/krb5/os/changepw.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/krb5/os/Makefile.in b/src/lib/krb5/os/Makefile.in index 01f60836f..dc7aeaead 100644 --- a/src/lib/krb5/os/Makefile.in +++ b/src/lib/krb5/os/Makefile.in @@ -306,7 +306,8 @@ changepw.so changepw.po $(OUTPRE)changepw.$(OBJEXT): \ $(SRCTOP)/include/k5-plugin.h $(SRCTOP)/include/k5-thread.h \ $(SRCTOP)/include/krb5.h $(SRCTOP)/include/krb5/locate_plugin.h \ $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \ - $(SRCTOP)/include/socket-utils.h changepw.c os-proto.h + $(SRCTOP)/include/socket-utils.h $(srcdir)/../krb/auth_con.h \ + changepw.c os-proto.h dnsglue.so dnsglue.po $(OUTPRE)dnsglue.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \ $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \ diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c index d0a8dce75..5bd5b8678 100644 --- a/src/lib/krb5/os/changepw.c +++ b/src/lib/krb5/os/changepw.c @@ -34,6 +34,7 @@ #include "k5-int.h" #include "os-proto.h" #include "cm.h" +#include "../krb/auth_con.h" #include <stdio.h> #include <errno.h> @@ -48,6 +49,7 @@ struct sendto_callback_context { krb5_principal set_password_for; char *newpw; krb5_data ap_req; + krb5_ui_4 remote_seq_num, local_seq_num; }; /* @@ -159,6 +161,9 @@ static int kpasswd_sendto_msg_callback(struct conn_state *conn, void *callback_c &local_kaddr, NULL))) goto cleanup; + ctx->auth_context->remote_seq_number = ctx->remote_seq_num; + ctx->auth_context->local_seq_number = ctx->local_seq_num; + if (ctx->set_password_for) code = krb5int_mk_setpw_req(ctx->context, ctx->auth_context, @@ -226,6 +231,9 @@ krb5_change_set_password(krb5_context context, krb5_creds *creds, char *newpw, &callback_ctx.ap_req))) goto cleanup; + callback_ctx.remote_seq_num = callback_ctx.auth_context->remote_seq_number; + callback_ctx.local_seq_num = callback_ctx.auth_context->local_seq_number; + do { if ((code = krb5_locate_kpasswd(callback_ctx.context, krb5_princ_realm(callback_ctx.context, |
