]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/nfs/nfsexport.c
Open channel files O_WRONLY, and improve mountlist support.
[nfs-utils.git] / support / nfs / nfsexport.c
index 0e8b52b334ba3e69e8bd676c64c7f3d66827e51a..782cc50806a9a5771c4d1084454c273f0e9ee3a4 100644 (file)
@@ -93,7 +93,7 @@ nfsexport(struct nfsctl_export *exp)
 {
        struct nfsctl_arg       arg;
        int fd;
-       if ((fd=open("/proc/net/rpc/nfsd.fh/channel", O_RDWR))>= 0) {
+       if ((fd=open("/proc/net/rpc/nfsd.fh/channel", O_WRONLY))>= 0) {
                close(fd);
                return exp_unexp(exp, 1);
        }
@@ -108,7 +108,7 @@ nfsunexport(struct nfsctl_export *exp)
        struct nfsctl_arg       arg;
 
        int fd;
-       if ((fd=open("/proc/net/rpc/nfsd.fh/channel", O_RDWR))>= 0) {
+       if ((fd=open("/proc/net/rpc/nfsd.fh/channel", O_WRONLY))>= 0) {
                close(fd);
                return exp_unexp(exp, 0);
        }