Return EACESS when lacking required executable bit (#1617)

This makes the check consistent with read and write.  Found via
pjdfstests.  References #1551.  References #1589.
This commit is contained in:
Andrew Gaul 2021-04-11 22:39:27 +09:00 committed by GitHub
parent 3663082a01
commit ed2e877bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -579,7 +579,7 @@ static int check_object_access(const char* path, int mask, struct stat* pstbuf)
if(X_OK == (mask & X_OK)){
if(0 == (mode & (S_IXUSR | S_IXGRP | S_IXOTH))){
return -EPERM;
return -EACCES;
}
}
if(W_OK == (mask & W_OK)){