Re: run_init change in latest policycoreutils

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 30, 2012 at 7:48 PM, Sven Vermeulen
<sven.vermeulen@xxxxxxxxx> wrote:
> --- policycoreutils-2.1.10/run_init/run_init.c  2011-12-21
> 18:46:04.000000000 +0100
> +++ policycoreutils-2.1.13.pristine/run_init/run_init.c 2012-09-29
> 11:08:41.267304041 +0200
> @@ -406,6 +406,13 @@
>                         new_context);
>                 exit(-1);
>         }
> +       if (! access("/usr/sbin/open_init_pty", X_OK)) {
> +               if (execvp(argv[1], argv + 1)) {
> +                       perror("execvp");
> +                       exit(-1);
> +               }
> +               return 0;
> +       }

Shouldn't this be "if(access(...))" instead of "if(! access(...))"?

After all, if the access is ok (returns 0), then with the current
patch the embraced code is executed, which doesn't use open_init_pty.
And if access isn't ok, then it uses open_init_pty (which will fail,
since the access is not ok)...

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux