]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/nfs/nfsexport.c
Autogen update
[nfs-utils.git] / support / nfs / nfsexport.c
index 0e8b52b334ba3e69e8bd676c64c7f3d66827e51a..aa0e49b8cfbff688c42fcd76f5faa77318bb8a52 100644 (file)
@@ -6,7 +6,9 @@
  * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <string.h>
 #include <sys/types.h>
@@ -93,7 +95,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 +110,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);
        }