*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: glob.c,v 1.2 1996/08/19 08:24:20 tholo Exp $";
+static char rcsid[] = "$OpenBSD: glob.c,v 1.3 1996/09/11 19:22:46 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
* handle a plain ~ or ~/ by expanding $HOME
* first and then trying the password file
*/
- if ((h = getenv("HOME")) == NULL) {
+ if (issetugid() != 0 || (h = getenv("HOME")) == NULL) {
if ((pwd = getpwuid(getuid())) == NULL)
return pattern;
else