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:
parent
ed151605e5
commit
4d3d7a0d67
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user