summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-12-18 15:24:02 +0100
committerLennart Poettering <lennart@poettering.net>2009-01-12 20:28:44 +0100
commit6c2c7a5d4205be10ff1b033c47647b73287a9022 (patch)
tree4376b319efad677c165754d4e981b9f0ef4f0499
parent5fc8444a4b6e6ce140e1ff75cca5757e6e296d57 (diff)
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
-rw-r--r--src/utils/padsp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index 2e6e5575..046bae45 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -2382,15 +2382,15 @@ int access(const char *pathname, int mode) {
debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname?pathname:"NULL");
if (!pathname ||
- ( strcmp(pathname, "/dev/dsp") != 0 &&
- strcmp(pathname, "/dev/adsp") != 0 &&
- strcmp(pathname, "/dev/sndstat") != 0 &&
- strcmp(pathname, "/dev/mixer") != 0 )) {
+ (strcmp(pathname, "/dev/dsp") != 0 &&
+ strcmp(pathname, "/dev/adsp") != 0 &&
+ strcmp(pathname, "/dev/sndstat") != 0 &&
+ strcmp(pathname, "/dev/mixer") != 0 )) {
LOAD_ACCESS_FUNC();
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;