1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Replace uids comparison by issetugid() call

This commit is contained in:
Andrey A. Chernov 1997-08-22 11:14:53 +00:00
parent 463695c856
commit 7b759a7f68
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28579

View File

@ -115,9 +115,9 @@ tgetent(char *bp, const char *name)
strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */
pathbuf[PBUFSIZ - 1] = '\0';
/* XXX Should really be issetguid(), but we don't have that */
if (getuid() != geteuid() || getgid() != getegid())
if (issetugid())
strcpy(pathbuf, _PATH_DEF_SEC);
*fname++ = pathbuf; /* tokenize path into vector of names */
while (*++p)
if (*p == ' ' || *p == ':') {