diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2009-01-15 13:14:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2009-01-15 13:14:31 +0000 |
commit | f8a1265731dfe5bcd317055b7bd072a3b8a60531 (patch) | |
tree | 5af407d75c8df5909b663b0fe1b81f2c9604dcd1 /lib/libc/gen/auth_subr.c | |
parent | 4adf2de03b1dd5aceee662537cb5cfd3326c44dd (diff) |
Remove support for kerb4 '.' instance separator, kerb4 is dead. OK jacekm@
Diffstat (limited to 'lib/libc/gen/auth_subr.c')
-rw-r--r-- | lib/libc/gen/auth_subr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c index 73d5bff7581..e2612078e03 100644 --- a/lib/libc/gen/auth_subr.c +++ b/lib/libc/gen/auth_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth_subr.c,v 1.35 2008/03/24 16:10:59 deraadt Exp $ */ +/* $OpenBSD: auth_subr.c,v 1.36 2009/01/15 13:14:30 millert Exp $ */ /* * Copyright (c) 2000-2002,2004 Todd C. Miller <Todd.Miller@courtesan.com> @@ -628,11 +628,11 @@ auth_setpwd(auth_session_t *as, struct passwd *pwd) if (as->name == NULL) return (0); if ((pwd = getpwnam(as->name)) == NULL) { - instance = strpbrk(as->name, "./"); - if (instance++ == NULL) + instance = strchr(as->name, '/'); + if (instance == NULL) return (as->pwd ? 0 : 1); - if (strcmp(instance, "root") == 0) - pwd = getpwnam(instance); + if (strcmp(instance, "/root") == 0) + pwd = getpwnam(instance + 1); if (pwd == NULL) return (as->pwd ? 0 : 1); } |