1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

use O_EXCL for fcntl_lock.c test in case some fool runs on /tmp

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent ed151605e5
commit 4d3d7a0d67

View File

@ -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",