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/getwd.c | |
parent | 544bca0290df1dc512641a1ab23e184ccc2406b3 (diff) |
libc: open internal file-descriptor with OCEXEC flag
Diffstat (limited to 'sys/src/libc/9sys/getwd.c')
-rw-r--r-- | sys/src/libc/9sys/getwd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/src/libc/9sys/getwd.c b/sys/src/libc/9sys/getwd.c index ed73cb775..cef4b4796 100644 --- a/sys/src/libc/9sys/getwd.c +++ b/sys/src/libc/9sys/getwd.c @@ -1,14 +1,12 @@ #include <u.h> #include <libc.h> -static char *nsgetwd(char*, int); - char* getwd(char *buf, int nbuf) { int n, fd; - fd = open(".", OREAD); + fd = open(".", OREAD|OCEXEC); if(fd < 0) return nil; n = fd2path(fd, buf, nbuf); |