summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2008-12-14 19:27:48 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2008-12-14 19:27:48 +0000
commit049395db06f425f4526e9a1bff4d7dcd3c507c7e (patch)
tree987474f7a301cc348fec7617f7e361511af0f5fb
parente7f60ca40cd88b92c5c067be056fc82eb6bf0e8b (diff)
Files under /incoming don't need flock(2)ing anymore.
ok gilles@
-rw-r--r--usr.sbin/smtpd/queue.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c
index eb6f500be7c..f993eb3c01a 100644
--- a/usr.sbin/smtpd/queue.c
+++ b/usr.sbin/smtpd/queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.c,v 1.28 2008/12/14 19:24:42 jacekm Exp $ */
+/* $OpenBSD: queue.c,v 1.29 2008/12/14 19:27:47 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -868,16 +868,13 @@ queue_record_incoming_envelope(struct message *message)
return 0;
}
- if (flock(fd, LOCK_EX) == -1)
- fatal("queue_record_submission: flock");
-
fp = fdopen(fd, "w");
if (fp == NULL)
fatal("fdopen");
if (strlcpy(message->message_uid, message_uid, MAXPATHLEN)
>= MAXPATHLEN)
- fatal("queue_record_submission: strlcpy");
+ fatal("queue_record_incoming_envelope: strlcpy");
message->creation = time(NULL);
@@ -910,9 +907,6 @@ queue_update_incoming_envelope(struct message *messagep)
if ((fd = open(pathname, mode)) == -1)
fatal("queue_update_incoming_envelope: open");
- if (flock(fd, LOCK_EX) == -1)
- fatal("queue_update_incoming_envelope: flock");
-
fp = fdopen(fd, "w");
if (fp == NULL)
fatal("queue_update_incoming_envelope: fdopen");