diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-14 07:01:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-14 07:01:43 +0000 |
commit | 23c4be36cb4e10120b700c4ce52d2c5a39c27c69 (patch) | |
tree | 463eabee00ea38c6e9de6b7920cbc8490610dbde /usr.sbin/rwhod | |
parent | 8fcc183b874c4a30d9443a0f22d903bb4365b5ac (diff) |
i was not the brightest here either
Diffstat (limited to 'usr.sbin/rwhod')
-rw-r--r-- | usr.sbin/rwhod/rwhod.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index 09ed5401b52..fab0144e5aa 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: rwhod.c,v 1.8 1997/04/13 01:53:49 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rwhod.c,v 1.9 1997/04/14 07:01:42 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -257,13 +257,15 @@ verify(p) if (*p == '.' || *p == '-') return 0; while ((c = *p++)) { - if (('a' <= c && c >= 'z') || - ('A' <= c && c >= 'Z') || - ('0' <= c && c >= '9')) + if (('a' <= c && c <= 'z') || + ('A' <= c && c <= 'Z') || + ('0' <= c && c <= '9')) continue; - if (strchr("-_/[]\\", c) || - (c == '.' && *p == '.')) + if (c == '.' && *p == '.') return 0; + if (c == '.' || c == '-') + continue; + return 0; } return 1; } |