summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-12-18 15:24:02 +0100
committerLennart Poettering <lennart@poettering.net>2008-12-18 15:24:02 +0100
commit63fc26ed034846a8d2189e5cc2fe890ce3b4c7b3 (patch)
tree6b4d5390e508d2044373c9211c5aedb9da097115 /src/utils
parent1d2e5cba52ce439dc755d354bccda2709679e9eb (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
Diffstat (limited to 'src/utils')
-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;