diff options
author | nectar <nectar@FreeBSD.org> | 2002-09-16 21:04:40 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-09-16 21:04:40 +0000 |
commit | 8707f886593c300d83c76654e92ec76bcea9b858 (patch) | |
tree | 291ed09be4bd7c999ad1617a832aa3caae1cb274 /crypto/heimdal/lib/krb5/kuserok.c | |
parent | a77dba08ca7d8ad2f2dcd653974ac66df78cfa49 (diff) | |
download | FreeBSD-src-8707f886593c300d83c76654e92ec76bcea9b858.zip FreeBSD-src-8707f886593c300d83c76654e92ec76bcea9b858.tar.gz |
Import of Heimdal Kerberos from KTH repository circa 2002/09/16.
Diffstat (limited to 'crypto/heimdal/lib/krb5/kuserok.c')
-rw-r--r-- | crypto/heimdal/lib/krb5/kuserok.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/heimdal/lib/krb5/kuserok.c b/crypto/heimdal/lib/krb5/kuserok.c index ae8ddec..17770c1 100644 --- a/crypto/heimdal/lib/krb5/kuserok.c +++ b/crypto/heimdal/lib/krb5/kuserok.c @@ -33,7 +33,7 @@ #include "krb5_locl.h" -RCSID("$Id: kuserok.c,v 1.5 1999/12/02 17:05:11 joda Exp $"); +RCSID("$Id: kuserok.c,v 1.6 2002/09/16 17:32:11 nectar Exp $"); /* * Return TRUE iff `principal' is allowed to login as `luser'. @@ -88,9 +88,7 @@ krb5_kuserok (krb5_context context, while (fgets (buf, sizeof(buf), f) != NULL) { krb5_principal tmp; - if(buf[strlen(buf) - 1] == '\n') - buf[strlen(buf) - 1] = '\0'; - + buf[strcspn(buf, "\n")] = '\0'; ret = krb5_parse_name (context, buf, &tmp); if (ret) { fclose (f); |