Skip to content

Commit 9dd44c5

Browse files
committed
alsa: fix that r/w permissions on /dev/snd/seq were not being checked
1 parent d778326 commit 9dd44c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/libremidi/backends/alsa_seq.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct backend
4242
if (!snd.available || !snd.seq.available)
4343
return false;
4444

45-
return ::access("/dev/snd/seq", F_OK) == 0;
45+
return ::access("/dev/snd/seq", F_OK | R_OK | W_OK) == 0;
4646
}
4747
};
4848

include/libremidi/backends/alsa_seq_ump.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct backend
6363
if (!snd.available || !snd.seq.available || !snd.seq.ump.available || !snd.ump.available)
6464
return false;
6565

66-
return ::access("/dev/snd/seq", F_OK) == 0;
66+
return ::access("/dev/snd/seq", F_OK | R_OK | W_OK) == 0;
6767
}
6868
};
6969
}

0 commit comments

Comments
 (0)