Re: [PATCH v3 1/4] support Dash as default shell

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

 



On Tue, Jun 28, 2022 at 5:20 PM Christian Göttsche
<cgzones@xxxxxxxxxxxxxx> wrote:
>
> Debian uses Dash as default shell and switching via
>
>     dpkg-reconfigure dash
>
> has become deprecated.
>
> * Use POSIX compliant `> target 2>&1` instead of `>& target`.
> * Call runcon via exec to avoid a fork within the Debian version of
>   Dash, which breaks tests requiring to not change the PID of executing
>   commands
> * Use bash explicitly for non POSIX read option -t

I came up with this alternative Perl-native implementation of the
`read -t` idiom:
https://github.com/WOnder93/selinux-testsuite/commit/36c072871f82960f51035a3fcd60db2c7adaf339

It is more code, but OTOH it gets rid of the dependence on bash
completely. What do you think about that approach?

In case you have no objections, feel free to pick that commit and
rebase the rest on top. I'd say you can skip emailing the patches and
just update the GitHub PR, since it's really just the two of us
discussing this anyway :) I'm fine with the rest of the changes in
their current form, so if you do this, I'm ready to merge the PR.

>
> Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
> ---
> v3:
>    perpend runcon by exec instead of splitting arguments
> v2:
>    use system("bash -c ...") instead of `bash -c ...`
> ---
>  README.md                      |  7 -------
>  tests/Makefile                 |  2 +-
>  tests/binder/test              |  2 +-
>  tests/bpf/test                 |  4 ++--
>  tests/fdreceive/test           |  2 +-
>  tests/filesystem/Filesystem.pm | 14 +++++++-------
>  tests/inet_socket/test         |  2 +-
>  tests/ptrace/test              |  4 ++--
>  tests/sctp/test                |  2 +-
>  tests/sigkill/test             |  2 +-
>  tests/task_getpgid/test        |  4 ++--
>  tests/task_getscheduler/test   |  4 ++--
>  tests/task_getsid/test         |  4 ++--
>  tests/task_setnice/test        |  4 ++--
>  tests/task_setscheduler/test   |  4 ++--
>  tests/unix_socket/test         |  2 +-
>  tests/vsock_socket/test        |  2 +-
>  17 files changed, 29 insertions(+), 36 deletions(-)
[...]

-- 
Ondrej Mosnacek
Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.





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

  Powered by Linux