diff options
author | neilbrown <neilbrown> | 2000-08-23 01:17:52 +0000 |
---|---|---|
committer | neilbrown <neilbrown> | 2000-08-23 01:17:52 +0000 |
commit | 82d42dffa84fb884684f75769ca13668c5188a5e (patch) | |
tree | 66d5ee003f36756f622dfdb8677f35a2de9e3852 /support/nfs/xio.c | |
parent | da25e1aa006bafb4dd08e2ffedbd42d7c1f4036b (diff) | |
download | nfs-utils-82d42dffa84fb884684f75769ca13668c5188a5e.tar.gz nfs-utils-82d42dffa84fb884684f75769ca13668c5188a5e.tar.xz nfs-utils-82d42dffa84fb884684f75769ca13668c5188a5e.zip |
1/ be less trusting of information in /var/lib/nfs/xtab. Add things to
kernel even if they are in here.
2/ O_CREAT [ex]log when locking for write incase they don't exist
3/ added etc/debian diretory with some files
Diffstat (limited to 'support/nfs/xio.c')
-rw-r--r-- | support/nfs/xio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/support/nfs/xio.c b/support/nfs/xio.c index 49ee6bc..0a250fc 100644 --- a/support/nfs/xio.c +++ b/support/nfs/xio.c @@ -55,7 +55,7 @@ xflock(char *fname, char *type) struct flock fl = { readonly? F_RDLCK : F_WRLCK, SEEK_SET, 0, 0, 0 }; int fd; - if ((fd = open(fname, readonly? O_RDONLY : O_RDWR)) < 0) { + if ((fd = open(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT))) < 0) { xlog(L_WARNING, "could not open %s for locking", fname); return -1; } |