Skip to content

connect: interactive mode: also accept /usr/bin/perl as parent#617

Open
frwbr wants to merge 1 commit intoovh:masterfrom
frwbr:dev/accept-user-bin-perl
Open

connect: interactive mode: also accept /usr/bin/perl as parent#617
frwbr wants to merge 1 commit intoovh:masterfrom
frwbr:dev/accept-user-bin-perl

Conversation

@frwbr
Copy link
Copy Markdown

@frwbr frwbr commented Mar 30, 2026

When building a the-bastion Debian package with dh_perl, dh_perl may change the shebang of bin/shell/osh.pl from

#! /usr/bin/env perl

to

#! /usr/bin/perl

This changes cmdline[0] from 'perl' to '/usr/bin/perl'. When trying to connect to a host in interactive mode, this then fails the security check for the parent process cmdline[0] in bin/shell/connect.pl, which only accepts 'perl' (not '/usr/bin/perl'). Thus, opening a connection in interactive mode fails with a security violation.

To avoid this, accept both 'perl' and '/usr/bin/perl' in bin/shell/connect.sh.

When building a the-bastion Debian package with dh_perl, dh_perl
may change the shebang of bin/shell/osh.pl from

    #! /usr/bin/env perl

to

    #! /usr/bin/perl

This changes cmdline[0] from 'perl' to '/usr/bin/perl'. When trying to
connect to a host in interactive mode, this then fails the security
check for the parent process cmdline[0] in bin/shell/connect.pl, which
only accepts 'perl' (not '/usr/bin/perl'). Thus, opening a connection
in interactive mode fails with a security violation.

To avoid this, accept both 'perl' and '/usr/bin/perl' in
bin/shell/connect.sh.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
@speed47 speed47 added the tests:long Launch tests (multi-distros, w/o cc) label Mar 30, 2026
@speed47 speed47 added tests:long Launch tests (multi-distros, w/o cc) tests:freebsd Launch FreeBSD tests only and removed tests:long Launch tests (multi-distros, w/o cc) labels Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests:freebsd Launch FreeBSD tests only tests:long Launch tests (multi-distros, w/o cc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants