summaryrefslogtreecommitdiff
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
commit71ac074517a528c2f08ff5adc842403ca8d3c1cb (patch)
tree461d1466e0bc19b7c58b9a3a0eacfaf4d3f03bc6
parent1107dc4c4f99936129f1459625857976e1b1ddd4 (diff)
downloadsamba-71ac074517a528c2f08ff5adc842403ca8d3c1cb.tar.gz
samba-71ac074517a528c2f08ff5adc842403ca8d3c1cb.tar.bz2
samba-71ac074517a528c2f08ff5adc842403ca8d3c1cb.zip
use O_EXCL for fcntl_lock.c test in case some fool runs on /tmp
(This used to be commit 4d3d7a0d673b80f1de411a5fb5a23ae06cf80f43)
-rw-r--r--source3/tests/fcntl_lock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/tests/fcntl_lock.c b/source3/tests/fcntl_lock.c
index 3cd0e5ff5e..1b790b0a97 100644
--- a/source3/tests/fcntl_lock.c
+++ b/source3/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",