In the krb5_kuserok implementation, fix an unintentional type change
authorGreg Hudson <ghudson@mit.edu>
Sat, 2 Oct 2010 11:48:06 +0000 (11:48 +0000)
committerGreg Hudson <ghudson@mit.edu>
Sat, 2 Oct 2010 11:48:06 +0000 (11:48 +0000)
to "gobble" (was an int, was accidentally changed to a char) which
could result in an infinite loop.

ticket: 6792

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24413 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/kuserok.c

index 985bb141212687b03a36e5cd5a46550be567944f..e1619f3946beec7c0ec343064055b55fac0dfcab 100644 (file)
@@ -93,10 +93,10 @@ get_k5login_filename(krb5_context context, const char *luser,
 static enum result
 k5login_ok(krb5_context context, krb5_principal principal, const char *luser)
 {
-    int authoritative = TRUE;
+    int authoritative = TRUE, gobble;
     enum result result = REJECT;
     char *filename = NULL, *princname = NULL;
-    char gobble, *newline, linebuf[BUFSIZ], pwbuf[BUFSIZ];
+    char *newline, linebuf[BUFSIZ], pwbuf[BUFSIZ];
     struct stat sbuf;
     struct passwd pwx, *pwd;
     FILE *fp = NULL;