diff options
| author | Warner Losh <imp@FreeBSD.org> | 1997-03-25 05:34:31 +0000 | 
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 1997-03-25 05:34:31 +0000 | 
| commit | 99a0772b8d2bafcf7afa8922673e82d832dc8866 (patch) | |
| tree | 5e81292543be8fdd38d51586039148417942e585 /lib/libc/stdtime/localtime.c | |
| parent | 4a028a883dbeea75d79c68dd968faca60d76fefc (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdtime/localtime.c')
| -rw-r--r-- | lib/libc/stdtime/localtime.c | 6 | 
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c index 031e6651878f..3438cc673e72 100644 --- a/lib/libc/stdtime/localtime.c +++ b/lib/libc/stdtime/localtime.c @@ -305,10 +305,8 @@ register struct state * const	sp;  				doaccess = TRUE;  			name = fullname;  		} -		/* XXX Should really be issetguid(), but we don't have that */ -		if (doaccess &&  -			(getuid() != geteuid() || getgid() != getegid()) ) -		     	return -1; +		if (doaccess && access(name, R_OK) != 0) +			return -1;  		if ((fid = open(name, OPEN_MODE)) == -1)  			return -1;  		if ((fstat(fid, &stab) < 0) || !S_ISREG(stab.st_mode))  | 
