Allow access("/dev/dsp", W_OK) succeed

Some stupid apps (such as X-lite Softphone) check for W_OK on /dev/dsp.
This is of course crazy but easy for us to support.

Closes rhbz #474313
This commit is contained in:
Lennart Poettering 2008-12-18 15:24:02 +01:00
parent 1d2e5cba52
commit 63fc26ed03

View file

@ -2390,7 +2390,7 @@ int access(const char *pathname, int mode) {
return _access(pathname, mode);
}
if (mode & (W_OK | X_OK)) {
if (mode & X_OK) {
debug(DEBUG_LEVEL_NORMAL, __FILE__": access(%s, %x) = EACCESS\n", pathname, mode);
errno = EACCES;
return -1;