Pārlūkot izejas kodu

qrexec: exit with code 126 when service request was refused

Exit code 1 is very common in all kind of programs, including qrexec
services, so it is hard to distinguish remote failure from service call
refusal. Use something from top of the range here (but not 127, as it is
commonly used to report "Command not found")

QubesOS/qubes-issues#2861
Marek Marczykowski-Górecki 7 gadi atpakaļ
vecāks
revīzija
d2aa21625c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      qrexec/qrexec-client-vm.c

+ 1 - 1
qrexec/qrexec-client-vm.c

@@ -109,7 +109,7 @@ int main(int argc, char **argv)
     ret = read(trigger_fd, &exec_params, sizeof(exec_params));
     if (ret == 0) {
         fprintf(stderr, "Request refused\n");
-        exit(1);
+        exit(126);
     }
     if (ret < 0 || ret != sizeof(exec_params)) {
         perror("read");