mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-25 07:22:07 +00:00
run_init: fix open_init_pty avaibility check
If /usr/sbin/open_init_pty is not found or is not executable, access("/usr/sbin/open_init_pty", X_OK) returns -1, not zero. Use "!= 0" like in other places in SELinux userland libraries and tools.
This commit is contained in:
parent
78a472da14
commit
4be2fd4576
@ -406,7 +406,7 @@ int main(int argc, char *argv[])
|
|||||||
new_context);
|
new_context);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
if (! access("/usr/sbin/open_init_pty", X_OK)) {
|
if (access("/usr/sbin/open_init_pty", X_OK) != 0) {
|
||||||
if (execvp(argv[1], argv + 1)) {
|
if (execvp(argv[1], argv + 1)) {
|
||||||
perror("execvp");
|
perror("execvp");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user