]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/libndb/dnsquery.c
pc64: preserve reserved bits in CR0/CR4 for amd64 in mtrr setstate()
[plan9front.git] / sys / src / libndb / dnsquery.c
index 1bf1ff8b32c58545ef4a46ad18d6adc0d03dd5a8..da2312e4de671ed264a4c8e31844faab133a7c0f 100644 (file)
@@ -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;