summaryrefslogtreecommitdiffstats
path: root/support/nfs
diff options
context:
space:
mode:
authorneilbrown <neilbrown>2003-08-04 03:14:23 +0000
committerneilbrown <neilbrown>2003-08-04 03:14:23 +0000
commit18fc7a86a2a1213762cc4107565903127efadafc (patch)
tree936419df6ee1563d17f0d9a6a57006c754fb49b9 /support/nfs
parent9e07f5fc946f63e32028f860566c34432059c179 (diff)
downloadnfs-utils-18fc7a86a2a1213762cc4107565903127efadafc.tar.gz
nfs-utils-18fc7a86a2a1213762cc4107565903127efadafc.tar.xz
nfs-utils-18fc7a86a2a1213762cc4107565903127efadafc.zip
Open channel files O_WRONLY, and improve mountlist support.
Diffstat (limited to 'support/nfs')
-rw-r--r--support/nfs/nfsexport.c4
1 files changed, 2 insertions, 2 deletions
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);
}