From 4a6b526a09af6d16ce6f0e5a8b6c64548fb7ea1b Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 4 Jun 2026 13:20:31 -0400 Subject: shell: throw warning if temporary script's permissions cannot be modified --- src/lib/core/system.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/core/system.c b/src/lib/core/system.c index 4f1ece6..542f9fd 100644 --- a/src/lib/core/system.c +++ b/src/lib/core/system.c @@ -37,7 +37,9 @@ int shell(struct Process *proc, char *args) { // Set the script's permissions so that only the calling user can use it // This should help prevent eavesdropping if keys are applied in plain-text // somewhere. - chmod(t_name, 0700); + if (chmod(t_name, 0700)) { + SYSWARN("unable to change script permissions: %s, %s", t_name, strerror(errno)); + } pid_t pid = fork(); if (pid == -1) { -- cgit