diff options
Diffstat (limited to 'master/nfsv4')
-rw-r--r-- | master/nfsv4 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/master/nfsv4 b/master/nfsv4 new file mode 100644 index 0000000..0600a56 --- /dev/null +++ b/master/nfsv4 @@ -0,0 +1,18 @@ +diff --git a/tools/flock/src/flock.c b/tools/flock/src/flock.c +index 13baec4..02f7f60 100644 +--- a/tools/flock/src/flock.c ++++ b/tools/flock/src/flock.c +@@ -205,11 +205,11 @@ int main(int argc, char *argv[]) + } + + filename = argv[optind]; +- fd = open(filename, O_RDONLY|O_NOCTTY|O_CREAT, 0666); ++ fd = open(filename, O_RDWR|O_NOCTTY|O_CREAT, 0666); + /* Linux doesn't like O_CREAT on a directory, even though it should be a + no-op */ + if (fd < 0 && errno == EISDIR) +- fd = open(filename, O_RDONLY|O_NOCTTY); ++ fd = open(filename, O_RDWR|O_NOCTTY); + + if ( fd < 0 ) { + err = errno; |