aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/glob.c')
-rw-r--r--lib/libc/gen/glob.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c
index b014c8b716fa..7a988196549a 100644
--- a/lib/libc/gen/glob.c
+++ b/lib/libc/gen/glob.c
@@ -8,7 +8,7 @@
* Guido van Rossum.
*
* Copyright (c) 2011 The FreeBSD Foundation
- * All rights reserved.
+ *
* Portions of this software were developed by David Chisnall
* under sponsorship from the FreeBSD Foundation.
*
@@ -37,10 +37,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__SCCSID("@(#)glob.c 8.3 (Berkeley) 10/13/93");
-__FBSDID("$FreeBSD$");
-
/*
* glob(3) -- a superset of the one defined in POSIX 1003.2.
*
@@ -453,8 +449,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
* we're not running setuid or setgid) and then trying
* the password file
*/
- if (issetugid() != 0 ||
- (h = getenv("HOME")) == NULL) {
+ if ((h = secure_getenv("HOME")) == NULL) {
if (((h = getlogin()) != NULL &&
(pwd = getpwnam(h)) != NULL) ||
(pwd = getpwuid(getuid())) != NULL)