diff options
author | 2015-11-11 01:12:09 +0000 | |
---|---|---|
committer | 2015-11-11 01:12:09 +0000 | |
commit | f24baa2d4873123677fed51a2a9394a68863de40 (patch) | |
tree | 2f090abc16569cd9e97f83d95ee2809ea2a42ba6 /lib/libutil/uucplock.c | |
parent | update NAME section to include all documented functions, (diff) | |
download | wireguard-openbsd-f24baa2d4873123677fed51a2a9394a68863de40.tar.xz wireguard-openbsd-f24baa2d4873123677fed51a2a9394a68863de40.zip |
creat() -> open equiv; from Frederic Nowak
Diffstat (limited to 'lib/libutil/uucplock.c')
-rw-r--r-- | lib/libutil/uucplock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libutil/uucplock.c b/lib/libutil/uucplock.c index 0c10f8cced0..f62273c8f9f 100644 --- a/lib/libutil/uucplock.c +++ b/lib/libutil/uucplock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uucplock.c,v 1.16 2009/10/27 23:59:30 deraadt Exp $ */ +/* $OpenBSD: uucplock.c,v 1.17 2015/11/11 01:12:09 deraadt Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -70,7 +70,7 @@ uu_lock(const char *ttyname) (long)pid); (void)snprintf(lckname, sizeof(lckname), _PATH_UUCPLOCK LOCKFMT, ttyname); - if ((tmpfd = creat(lcktmpname, 0664)) < 0) + if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY, 0664)) < 0) GORET(0, UU_LOCK_CREAT_ERR); for (i = 0; i < MAXTRIES; i++) { |