aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-06-04 13:20:31 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-06-22 11:56:42 -0400
commita7c5906c203d1a1356aef7bf628499ad2345f43a (patch)
treeb164590336d5d9fa83dbb9b06ee34a757a295bb9 /src
parentbdcf35cfa3d73645cf0658b318787a80a3004257 (diff)
downloadstasis-a7c5906c203d1a1356aef7bf628499ad2345f43a.tar.gz
shell: throw warning if temporary script's permissions cannot be modified
Diffstat (limited to 'src')
-rw-r--r--src/lib/core/system.c4
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) {