diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-05-02 07:58:40 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-05-02 07:58:40 +0000 |
commit | 4d3d7a0d673b80f1de411a5fb5a23ae06cf80f43 (patch) | |
tree | 67850525f8e3d13d7cf6a2a3dda738e2a45d2869 /source/tests/fcntl_lock.c | |
parent | ed151605e57b7db3457cdf0c87f71c86e84c8f5b (diff) | |
download | samba-4d3d7a0d673b80f1de411a5fb5a23ae06cf80f43.tar.gz |
use O_EXCL for fcntl_lock.c test in case some fool runs on /tmp
Diffstat (limited to 'source/tests/fcntl_lock.c')
-rw-r--r-- | source/tests/fcntl_lock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/tests/fcntl_lock.c b/source/tests/fcntl_lock.c index 3cd0e5ff5ed..1b790b0a97a 100644 --- a/source/tests/fcntl_lock.c +++ b/source/tests/fcntl_lock.c @@ -74,7 +74,8 @@ int main(int argc, char *argv[]) } } - fd = open(DATA, O_RDWR|O_CREAT|O_TRUNC, 0600); + unlink(DATA); + fd = open(DATA, O_RDWR|O_CREAT|O_EXCL, 0600); if (fd == -1) { fprintf(stderr,"ERROR: failed to open %s (errno=%d)\n", |