diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-20 12:44:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-20 12:44:30 +0000 |
commit | c61013152e2fb3d6a85732eedd79e77f37ff9403 (patch) | |
tree | 4be231041d9d2947053b19046afc6c753b85f605 | |
parent | ba32684a1bccbb5f8abcb225270f46464dd09487 (diff) |
check for : before . ; wosch@cs.tu-berlin.de
-rw-r--r-- | usr.sbin/chown/chown.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c index 742375645e2..9ac5fa35053 100644 --- a/usr.sbin/chown/chown.c +++ b/usr.sbin/chown/chown.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chown.c,v 1.9 1997/06/30 06:21:31 millert Exp $ */ +/* $OpenBSD: chown.c,v 1.10 1997/09/20 12:44:29 deraadt Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94"; */ -static char *rcsid = "$Id: chown.c,v 1.9 1997/06/30 06:21:31 millert Exp $"; +static char *rcsid = "$Id: chown.c,v 1.10 1997/09/20 12:44:29 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -132,16 +132,16 @@ main(argc, argv) uid = gid = -1; if (ischown) { -#ifdef SUPPORT_DOT - if ((cp = strchr(*argv, '.')) != NULL) { - *cp++ = '\0'; - a_gid(cp); - } else -#endif if ((cp = strchr(*argv, ':')) != NULL) { *cp++ = '\0'; a_gid(cp); } +#ifdef SUPPORT_DOT + else if ((cp = strchr(*argv, '.')) != NULL) { + *cp++ = '\0'; + a_gid(cp); + } +#endif a_uid(*argv); } else a_gid(*argv); |