Don't open the tz file if we're running setuid or setgid to prevent infomration
leakage. Submitted by: Julian Assange
This commit is contained in:
parent
4ea8eab386
commit
52677342d6
@ -305,7 +305,9 @@ register struct state * const sp;
|
||||
doaccess = TRUE;
|
||||
name = fullname;
|
||||
}
|
||||
if (doaccess && access(name, R_OK) != 0)
|
||||
/* XXX Should really be issetguid(), but we don't have that */
|
||||
if (doaccess &&
|
||||
(getuid() != geteuid() || getgid() != getegid()) )
|
||||
return -1;
|
||||
if ((fid = open(name, OPEN_MODE)) == -1)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user