diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-07 14:24:51 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-07 14:24:51 +0100 |
commit | f1e15da8f550b12196d57e245437251f6eb289b5 (patch) | |
tree | 056e930a518b6e4a5e993fcad133ba4bc9855a01 /sys/src/libc/9sys/postnote.c | |
parent | 544bca0290df1dc512641a1ab23e184ccc2406b3 (diff) |
libc: open internal file-descriptor with OCEXEC flag
Diffstat (limited to 'sys/src/libc/9sys/postnote.c')
-rw-r--r-- | sys/src/libc/9sys/postnote.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/libc/9sys/postnote.c b/sys/src/libc/9sys/postnote.c index 46564e9ea..12dc7a951 100644 --- a/sys/src/libc/9sys/postnote.c +++ b/sys/src/libc/9sys/postnote.c @@ -4,21 +4,21 @@ int postnote(int group, int pid, char *note) { - char file[128]; + char file[32]; int f, r; switch(group) { case PNPROC: - sprint(file, "/proc/%d/note", pid); + snprint(file, sizeof(file), "/proc/%lud/note", (ulong)pid); break; case PNGROUP: - sprint(file, "/proc/%d/notepg", pid); + snprint(file, sizeof(file), "/proc/%lud/notepg", (ulong)pid); break; default: return -1; } - f = open(file, OWRITE); + f = open(file, OWRITE|OCEXEC); if(f < 0) return -1; |