mirror of
https://github.com/sheumann/hush.git
synced 2024-09-29 04:55:01 +00:00
Fix test to account for GNO stat() giving only "owner" permission bits.
This commit is contained in:
parent
2d16296748
commit
a549af27ca
@ -590,10 +590,15 @@ static int test_eaccess(char *path, int mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef __GNO__
|
||||
if (st.st_uid == euid) /* owner */
|
||||
mode <<= 6;
|
||||
else if (is_a_group_member(st.st_gid))
|
||||
mode <<= 3;
|
||||
#else
|
||||
/* GNO stat() only gives "owner" permissions (really applicable to anyone) */
|
||||
mode <<= 6;
|
||||
#endif
|
||||
|
||||
if (st.st_mode & mode)
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user