From 636928f889b4341d408d32b1df0f46fc75f5a0f0 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 12 Feb 2024 09:55:29 +0100 Subject: [PATCH] dispatcher: remove trailing dot from error messages The error messages are logged by the dispatcher and passed back to NetworkManager which also logs them. NetworkManager log messages usually don't end with a dot: remove it. (cherry picked from commit 7b769e9e49b3a51e3fa96008cb766f158c7222de) --- src/nm-dispatcher/nm-dispatcher.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nm-dispatcher/nm-dispatcher.c b/src/nm-dispatcher/nm-dispatcher.c index 97b85813dc..28ac51bf07 100644 --- a/src/nm-dispatcher/nm-dispatcher.c +++ b/src/nm-dispatcher/nm-dispatcher.c @@ -412,7 +412,7 @@ script_watch_cb(GPid pid, int status, gpointer user_data) script->result = DISPATCH_RESULT_SUCCESS; } else { status_desc = nm_utils_get_process_exit_status_desc(status); - script->error = g_strdup_printf("Script '%s' %s.", script->script, status_desc); + script->error = g_strdup_printf("Script '%s' %s", script->script, status_desc); } if (script->result == DISPATCH_RESULT_SUCCESS) { @@ -447,7 +447,7 @@ again: goto again; } - script->error = g_strdup_printf("Script '%s' timed out.", script->script); + script->error = g_strdup_printf("Script '%s' timed out", script->script); script->result = DISPATCH_RESULT_TIMEOUT; g_spawn_close_pid(script->pid); @@ -466,19 +466,19 @@ check_permissions(struct stat *s, const char **out_error_msg) /* Only accept files owned by root */ if (s->st_uid != 0) { - *out_error_msg = "not owned by root."; + *out_error_msg = "not owned by root"; return FALSE; } /* Only accept files not writable by group or other, and not SUID */ if (s->st_mode & (S_IWGRP | S_IWOTH | S_ISUID)) { - *out_error_msg = "writable by group or other, or set-UID."; + *out_error_msg = "writable by group or other, or set-UID"; return FALSE; } /* Only accept files executable by the owner */ if (!(s->st_mode & S_IXUSR)) { - *out_error_msg = "not executable by owner."; + *out_error_msg = "not executable by owner"; return FALSE; }