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:
parent
463695c856
commit
7b759a7f68
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28579
@ -115,9 +115,9 @@ tgetent(char *bp, const char *name)
|
|||||||
strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */
|
strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */
|
||||||
pathbuf[PBUFSIZ - 1] = '\0';
|
pathbuf[PBUFSIZ - 1] = '\0';
|
||||||
|
|
||||||
/* XXX Should really be issetguid(), but we don't have that */
|
if (issetugid())
|
||||||
if (getuid() != geteuid() || getgid() != getegid())
|
|
||||||
strcpy(pathbuf, _PATH_DEF_SEC);
|
strcpy(pathbuf, _PATH_DEF_SEC);
|
||||||
|
|
||||||
*fname++ = pathbuf; /* tokenize path into vector of names */
|
*fname++ = pathbuf; /* tokenize path into vector of names */
|
||||||
while (*++p)
|
while (*++p)
|
||||||
if (*p == ' ' || *p == ':') {
|
if (*p == ' ' || *p == ':') {
|
||||||
|
Loading…
Reference in New Issue
Block a user