prt-auf: do not fall back on su -c, only allow sudo or doas

This commit is contained in:
John McQuah 2022-06-12 18:20:40 -04:00
parent a1c0407bab
commit 6abc947745

View File

@ -651,7 +651,6 @@ sub up_inst { # returns scalar references to five arrays;
my $SUDO="/usr/bin/doas"; my $FAKEROOT="/usr/bin/fakeroot";
$SUDO = (-x $SUDO) ? $SUDO : "/usr/bin/sudo";
$SUDO = (-x $SUDO) ? $SUDO : "/usr/bin/su -c";
$FAKEROOT = (-x $FAKEROOT) ? $FAKEROOT : $SUDO;
# prepend commands with sudo/doas/fakeroot if the effective user id is not root
@ -749,8 +748,9 @@ sub find_built_pkg {
} close (CF);
if ($COMPRESSION) {
$COMPRESSION =~ s/"//g;
$COMPRESSION =~ s/'//g;
$COMPRESSION =~ s/#(.*)$//; # remove same-line comments like this one
$COMPRESSION =~ s/"//g; # remove double-quotes (thanks jaeger!)
$COMPRESSION =~ s/'//g; # and single-quotes? who writes conf files like that?
} else { $COMPRESSION = "gz"; }
if ($PKG_DIR) {