diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-06-04 13:20:31 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-06-04 13:20:31 -0400 |
| commit | 4a6b526a09af6d16ce6f0e5a8b6c64548fb7ea1b (patch) | |
| tree | beaa39bfbc749fc28da08f35d43bb307c0f9f579 /src | |
| parent | c2a6ce52e1789289df87e37adbfa172d4d590579 (diff) | |
| download | stasis-4a6b526a09af6d16ce6f0e5a8b6c64548fb7ea1b.tar.gz | |
shell: throw warning if temporary script's permissions cannot be modified
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/core/system.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |
