X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=support%2Fnfs%2Fnfsexport.c;h=aa0e49b8cfbff688c42fcd76f5faa77318bb8a52;hb=aa2d7a1e352a6c2190452ebc3c638b66a2cf6f9b;hp=0e8b52b334ba3e69e8bd676c64c7f3d66827e51a;hpb=182d7d59b5a9fdd43e74053ba779306eb7606b34;p=nfs-utils.git diff --git a/support/nfs/nfsexport.c b/support/nfs/nfsexport.c index 0e8b52b..aa0e49b 100644 --- a/support/nfs/nfsexport.c +++ b/support/nfs/nfsexport.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -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); }