diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-28 22:49:43 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-28 22:49:43 +0000 |
commit | 2ad6b244be36d276457eb5cc9c904f6ae67d20f8 (patch) | |
tree | 707a12c22806f1015e50dcfc5bbbc179961a73ec /usr.bin | |
parent | 70e1e7de79f4ab065c56f7aab13d18b8473f0ed1 (diff) |
'/' can also be an instance separator (e.g. kerb5)
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/login/login.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 97d6b9e7254..85fd5575371 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login.c,v 1.39 2001/06/25 16:18:37 millert Exp $ */ +/* $OpenBSD: login.c,v 1.40 2001/06/28 22:49:42 millert Exp $ */ /* $NetBSD: login.c,v 1.13 1996/05/15 23:50:16 jtc Exp $ */ /*- @@ -77,7 +77,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; #endif -static char rcsid[] = "$OpenBSD: login.c,v 1.39 2001/06/25 16:18:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: login.c,v 1.40 2001/06/28 22:49:42 millert Exp $"; #endif /* not lint */ /* @@ -414,8 +414,8 @@ main(argc, argv) quickexit(1); } rootlogin = 0; - if ((instance = strchr(username, '.')) != NULL) { - if (strncmp(instance, ".root", 5) == 0) + if ((instance = strpbrk(username, "./")) != NULL) { + if (strncmp(instance + 1, "root", 4) == 0) rootlogin = 1; *instance++ = '\0'; } else |