We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5db382c commit 9ebf7eaCopy full SHA for 9ebf7ea
1 file changed
utils/oscap-ssh
@@ -306,8 +306,7 @@ echo "Starting the evaluation..."
306
if [ -z "$OSCAP_SUDO" ]; then
307
ssh_execute_with_command_and_options "cd $REMOTE_TEMP_DIR; oscap $(command_array_to_string "${oscap_args[@]}")" "$SSH_TTY_ALLOCATION_OPTION"
308
else
309
- OSCAP_CMD="oscap $(command_array_to_string "${oscap_args[@]}"); rc=\$?; chown \$SUDO_USER $REMOTE_TEMP_DIR/*; exit \$rc"
310
- ssh_execute_with_command_and_options "cd $REMOTE_TEMP_DIR; $OSCAP_SUDO sh -c '$OSCAP_CMD'" "$SSH_TTY_ALLOCATION_OPTION"
+ ssh_execute_with_command_and_options "cd $REMOTE_TEMP_DIR; umask 022; $OSCAP_SUDO scap $(command_array_to_string "${oscap_args[@]}")" "$SSH_TTY_ALLOCATION_OPTION"
311
fi
312
OSCAP_EXIT_CODE=$?
313
echo "oscap exit code: $OSCAP_EXIT_CODE"
0 commit comments