Skip to content

Commit

Permalink
Downgrade errors about incompatible service config to warnings
Browse files Browse the repository at this point in the history
If service type is changed from socket to executable, some config
options are not applicable anymore. Do not fail execution but just log a
warning. This is also relevant for migration in the other direction - if
user has an executable service that is updated to a socket service, user
may want preserve the executable variant (which is also done by the
package manager if user has modified said service) - in which case, the
config for socket variant should not prevent this configuration from
working.

This has been reported to happen with qubes.UpdatesProxy service.

Fixes QubesOS/qubes-issues#9299
  • Loading branch information
marmarek committed Jun 12, 2024
1 parent c0f4d28 commit 52a732d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions libqrexec/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,21 +748,19 @@ int find_qrexec_service(
if (euidaccess(path_buffer.data, X_OK) == 0) {
/* Executable-based service. */
if (!cmd->send_service_descriptor) {
LOG(ERROR, "Refusing to execute executable service %s with skip-service-descriptor=true",
LOG(WARNING, "Warning: ignoring skip-service-descriptor=true "
"for execute executable service %s",
path_buffer.data);
return -2;
}
if (cmd->exit_on_stdout_eof) {
LOG(ERROR, "Refusing to execute executable service %s with "
"exit-on-service-eof=true",
LOG(WARNING, "Warning: ignoring exit-on-service-eof=true "
"for executable service %s",
path_buffer.data);
return -2;
}
if (cmd->exit_on_stdin_eof) {
LOG(ERROR, "Refusing to execute executable service %s with "
"exit-on-client-eof=true",
LOG(WARNING, "Warning: ignoring exit-on-client-eof=true "
"for executable service %s",
path_buffer.data);
return -2;
}
return 0;
}
Expand Down

0 comments on commit 52a732d

Please sign in to comment.