diff options
author | Ondřej Surý <ondrej@debian.org> | 2012-05-09 10:30:18 +0200 |
---|---|---|
committer | Andreas Beckmann <debian@abeckmann.de> | 2012-10-01 20:07:51 +0200 |
commit | c2da5a20f267d7d7d482839eb8ad6eb0153ecb37 (patch) | |
tree | 13bddc2c58177afbd0ddb06a6eead4cbf088c92d /debian/patches | |
parent | cb1b9d89c5278ac97b3fee2d39f9219bbda5180f (diff) | |
download | sendmail-c2da5a20f267d7d7d482839eb8ad6eb0153ecb37.tar.gz |
Imported Debian patch 8.14.4-2.1debian/8.14.4-2.1
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/8.14/8.14.4/hard-code-lockf.patch | 54 | ||||
-rw-r--r-- | debian/patches/8.14/8.14.4/series | 1 |
2 files changed, 55 insertions, 0 deletions
diff --git a/debian/patches/8.14/8.14.4/hard-code-lockf.patch b/debian/patches/8.14/8.14.4/hard-code-lockf.patch new file mode 100644 index 0000000..e0cf213 --- /dev/null +++ b/debian/patches/8.14/8.14.4/hard-code-lockf.patch @@ -0,0 +1,54 @@ +diff -urNap sendmail-8.14.4.orig/mail.local/mail.local.c sendmail-8.14.4/mail.local/mail.local.c +--- sendmail-8.14.4.orig/mail.local/mail.local.c 2008-02-19 08:13:30.000000000 +0100 ++++ sendmail-8.14.4/mail.local/mail.local.c 2012-05-09 10:27:45.201528350 +0200 +@@ -100,22 +100,6 @@ SM_IDSTR(id, "@(#)$Id: mail.local.c,v 8. + #define REALLOC(ptr, size) (((ptr) == NULL) ? malloc(size) : realloc(ptr, size)) + + /* +-** If you don't have flock, you could try using lockf instead. +-*/ +- +-#ifdef LDA_USE_LOCKF +-# define flock(a, b) lockf(a, b, 0) +-# ifdef LOCK_EX +-# undef LOCK_EX +-# endif /* LOCK_EX */ +-# define LOCK_EX F_LOCK +-#endif /* LDA_USE_LOCKF */ +- +-#ifndef LOCK_EX +-# include <sys/file.h> +-#endif /* ! LOCK_EX */ +- +-/* + ** If you don't have setreuid, and you have saved uids, and you have + ** a seteuid() call that doesn't try to emulate using setuid(), then + ** you can try defining LDA_USE_SETEUID. +@@ -1095,9 +1079,6 @@ deliver(fd, name) + ** can't unlink it. Historically, binmail set the owner/group at + ** each mail delivery. We no longer do this, assuming that if the + ** ownership or permissions were changed there was a reason. +- ** +- ** XXX +- ** open(2) should support flock'ing the file. + */ + + tryagain: +@@ -1265,7 +1246,7 @@ tryagain: + #endif /* 0 */ + + /* Wait until we can get a lock on the file. */ +- if (flock(mbfd, LOCK_EX) < 0) ++ if (lockf(mbfd, F_LOCK, 0) < 0) + { + mailerr("450 4.2.0", "%s: %s", path, sm_errstring(errno)); + goto err1; +@@ -1378,7 +1359,7 @@ err0: (void) setreuid(0, 0); + mbfd = open(path, O_WRONLY, 0); + if (mbfd < 0 || + cursize == 0 +- || flock(mbfd, LOCK_EX) < 0 || ++ || lockf(mbfd, F_LOCK, 0) < 0 || + fstat(mbfd, &sb) < 0 || + sb.st_size != cursize || + sb.st_nlink != 1 || diff --git a/debian/patches/8.14/8.14.4/series b/debian/patches/8.14/8.14.4/series index 6dd2ac5..4f20b74 100644 --- a/debian/patches/8.14/8.14.4/series +++ b/debian/patches/8.14/8.14.4/series @@ -8,3 +8,4 @@ mailer_cyrus mailer_fax maxseq rmail.odi +hard-code-lockf.patch |