summaryrefslogtreecommitdiffstats
path: root/source/tests
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-05-02 07:58:40 +0000
committerAndrew Tridgell <tridge@samba.org>2001-05-02 07:58:40 +0000
commit4d3d7a0d673b80f1de411a5fb5a23ae06cf80f43 (patch)
tree67850525f8e3d13d7cf6a2a3dda738e2a45d2869 /source/tests
parented151605e57b7db3457cdf0c87f71c86e84c8f5b (diff)
downloadsamba-4d3d7a0d673b80f1de411a5fb5a23ae06cf80f43.tar.gz
samba-4d3d7a0d673b80f1de411a5fb5a23ae06cf80f43.tar.xz
samba-4d3d7a0d673b80f1de411a5fb5a23ae06cf80f43.zip
use O_EXCL for fcntl_lock.c test in case some fool runs on /tmp
Diffstat (limited to 'source/tests')
-rw-r--r--source/tests/fcntl_lock.c3
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",