mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
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:
parent
1d2e5cba52
commit
63fc26ed03
1 changed files with 5 additions and 5 deletions
|
|
@ -2382,15 +2382,15 @@ int access(const char *pathname, int mode) {
|
||||||
debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname?pathname:"NULL");
|
debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname?pathname:"NULL");
|
||||||
|
|
||||||
if (!pathname ||
|
if (!pathname ||
|
||||||
( strcmp(pathname, "/dev/dsp") != 0 &&
|
(strcmp(pathname, "/dev/dsp") != 0 &&
|
||||||
strcmp(pathname, "/dev/adsp") != 0 &&
|
strcmp(pathname, "/dev/adsp") != 0 &&
|
||||||
strcmp(pathname, "/dev/sndstat") != 0 &&
|
strcmp(pathname, "/dev/sndstat") != 0 &&
|
||||||
strcmp(pathname, "/dev/mixer") != 0 )) {
|
strcmp(pathname, "/dev/mixer") != 0 )) {
|
||||||
LOAD_ACCESS_FUNC();
|
LOAD_ACCESS_FUNC();
|
||||||
return _access(pathname, 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);
|
debug(DEBUG_LEVEL_NORMAL, __FILE__": access(%s, %x) = EACCESS\n", pathname, mode);
|
||||||
errno = EACCES;
|
errno = EACCES;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue