diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-07 15:15:02 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-07 15:15:02 +0100 |
commit | 1a900513fb137143e1c1f8177975952bc404f5a9 (patch) | |
tree | fd305c969cb2dbea6ead1cd713df0b885beb8f9a /sys/src/libndb/dnsquery.c | |
parent | 5e59c57bb110403f83a41ad88415e108c6cb1f6a (diff) |
libndb: open internal file-descriptors with OCEXEC flag
Diffstat (limited to 'sys/src/libndb/dnsquery.c')
-rw-r--r-- | sys/src/libndb/dnsquery.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/src/libndb/dnsquery.c b/sys/src/libndb/dnsquery.c index 1bf1ff8b3..da2312e4d 100644 --- a/sys/src/libndb/dnsquery.c +++ b/sys/src/libndb/dnsquery.c @@ -29,7 +29,7 @@ dnsquery(char *net, char *val, char *type) net = "/net"; snprint(buf, sizeof(buf), "%s/dns", net); - if((fd = open(buf, ORDWR)) < 0) + if((fd = open(buf, ORDWR|OCEXEC)) < 0) return nil; /* zero out the error string */ @@ -84,7 +84,6 @@ doquery(int fd, char *dn, char *type) int n; Ndbtuple *t, *first, *last; - seek(fd, 0, 0); snprint(buf, sizeof(buf), "!%s %s", dn, type); if(write(fd, buf, strlen(buf)) < 0) return nil; |