X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fnfsexport.c;h=782cc50806a9a5771c4d1084454c273f0e9ee3a4;hp=0e8b52b334ba3e69e8bd676c64c7f3d66827e51a;hb=18fc7a86a2a1213762cc4107565903127efadafc;hpb=9e07f5fc946f63e32028f860566c34432059c179 diff --git a/support/nfs/nfsexport.c b/support/nfs/nfsexport.c index 0e8b52b..782cc50 100644 --- a/support/nfs/nfsexport.c +++ b/support/nfs/nfsexport.c @@ -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); }