← Commit list

1c7a270e26

Viktor Szakats
Viktor Szakats
2026-03-19
SUCCESS Duration: 277s

Subject

sshserver.pl: harden more `system()` calls

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/sshserver.pl+4 -4
@@ -424,14 +424,14 @@ if((! -e pp($hstprvkeyf)) || (! -s pp($hstprvkeyf)) ||
chmod 0600, pp($cliprvkeyf);
if(($^O eq 'cygwin' || $^O eq 'msys') && -e "/bin/setfacl") {
# https://cygwin.com/cygwin-ug-net/setfacl.html
- system "/bin/setfacl --remove-all " . pp($hstprvkeyf);
+ system('/bin/setfacl', ('--remove-all', pp($hstprvkeyf)));
}
elsif(pathhelp::os_is_win()) {
# https://ss64.com/nt/icacls.html
$ENV{'MSYS2_ARG_CONV_EXCL'} = '/reset';
- system "icacls \"" . pathhelp::sys_native_abs_path(pp($hstprvkeyf)) . "\" /reset";
- system "icacls \"" . pathhelp::sys_native_abs_path(pp($hstprvkeyf)) . "\" /grant:r \"$username:(R)\"";
- system "icacls \"" . pathhelp::sys_native_abs_path(pp($hstprvkeyf)) . "\" /inheritance:r";
+ system('icacls', (pathhelp::sys_native_abs_path(pp($hstprvkeyf)), '/reset'));
+ system('icacls', (pathhelp::sys_native_abs_path(pp($hstprvkeyf)), '/grant:r', "$username:(R)"));
+ system('icacls', (pathhelp::sys_native_abs_path(pp($hstprvkeyf)), '/inheritance:r'));
}
# Save md5 and sha256 hashes of public host key
open(my $rsakeyfile, "<", pp($hstpubkeyf));