* kerberos.c (kerberos4_status): Always copy in username if
present. Patch from Nathan Neulinger to make "-a user" work.
* kerberos5.c (kerberos5_status): Always copy in username if
present. Patch from Nathan Neulinger to make "-a user" work.
ticket: 1362
tags: pullup
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15338
dc483132-0cff-0310-8789-
dd5450dbe970
+2003-04-09 Tom Yu <tlyu@mit.edu>
+
+ * kerberos.c (kerberos4_status): Always copy in username if
+ present. Patch from Nathan Neulinger to make "-a user" work.
+
+ * kerberos5.c (kerberos5_status): Always copy in username if
+ present. Patch from Nathan Neulinger to make "-a user" work.
+
2003-04-01 Nalin Dahyabhai <nalin@redhat.com>
* kerberos5.c (kerberos5_is): Check principal name length before
if (level < AUTH_USER)
return(level);
- if (UserNameRequested && !kuserok(&adat, UserNameRequested)) {
+ /*
+ * Always copy in UserNameRequested if the authentication
+ * is valid, because the higher level routines need it.
+ */
+ if (UserNameRequested) {
/* the name buffer comes from telnetd/telnetd{-ktd}.c */
strncpy(kname, UserNameRequested, 255);
name[255] = '\0';
+ }
+
+ if (UserNameRequested && !kuserok(&adat, UserNameRequested)) {
return(AUTH_VALID);
} else
return(AUTH_USER);
if (level < AUTH_USER)
return(level);
+ /*
+ * Always copy in UserNameRequested if the authentication
+ * is valid, because the higher level routines need it.
+ * the name buffer comes from telnetd/telnetd{-ktd}.c
+ */
+ if (UserNameRequested) {
+ strncpy(name, UserNameRequested, 255);
+ name[255] = '\0';
+ }
+
if (UserNameRequested &&
krb5_kuserok(telnet_context, ticket->enc_part2->client,
UserNameRequested))
{
- /* the name buffer comes from telnetd/telnetd{-ktd}.c */
- strncpy(name, UserNameRequested, 255);
- name[255] = '\0';
return(AUTH_VALID);
} else
return(AUTH_USER);