diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2021-08-19 11:52:11 +0200 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2021-08-19 11:52:11 +0200 |
commit | 7a1aa2b266a3b4e48e6278297a3e771f8b3c949c (patch) | |
tree | 3c18041701f978d76f20d47da6fd2a6770d2dd95 /mail/sendmail/files/patch-mail.local.c | |
parent | cad/appcsxcad: New port: Minimal GUI Application using the QCSXCAD library (diff) |
mail/sendmail-devel: Update to 8.17.1
Diffstat (limited to 'mail/sendmail/files/patch-mail.local.c')
-rw-r--r-- | mail/sendmail/files/patch-mail.local.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/mail/sendmail/files/patch-mail.local.c b/mail/sendmail/files/patch-mail.local.c index dc0870d26581..3691f145e977 100644 --- a/mail/sendmail/files/patch-mail.local.c +++ b/mail/sendmail/files/patch-mail.local.c @@ -1,6 +1,6 @@ ---- mail.local/mail.local.c.orig 2020-04-30 11:52:48 UTC +--- mail.local/mail.local.c.orig 2021-06-22 08:24:43 UTC +++ mail.local/mail.local.c -@@ -153,6 +153,8 @@ int ExitVal = EX_OK; /* sysexits.h error value. */ +@@ -154,6 +154,8 @@ int ExitVal = EX_OK; /* sysexits.h error value. */ bool HoldErrs = false; /* Hold errors in ErrBuf */ bool LMTPMode = false; bool BounceQuota = false; /* permanent error when over quota */ @@ -9,23 +9,23 @@ bool CloseMBDB = false; char *HomeMailFile = NULL; /* store mail in homedir */ -@@ -234,12 +236,12 @@ main(argc, argv) - sm_exit(EX_CONFIG); - } +@@ -237,12 +239,12 @@ main(argc, argv) + + /* HACK: add U to all options - this should be only for USE_EAI */ #if HASHSPOOL -- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lH:p:n")) != -1) -+ while ((ch = getopt(argc, argv, "7bBdD:f:h:r:lsH:p:n")) != -1) +- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lH:p:nUV")) != -1) ++ while ((ch = getopt(argc, argv, "7bBdD:f:h:r:lH:p:nUV")) != -1) #else /* HASHSPOOL */ - # if _FFR_SPOOL_PATH -- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lp:")) != -1) -+ while ((ch = getopt(argc, argv, "7bBdD:f:h:r:lsp:")) != -1) - # else -- while ((ch = getopt(argc, argv, "7bdD:f:h:r:l")) != -1) -+ while ((ch = getopt(argc, argv, "7bBdD:f:h:r:ls")) != -1) - # endif + # if _FFR_SPOOL_PATH +- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lp:UV")) != -1) ++ while ((ch = getopt(argc, argv, "7bBdD:f:h:r:lp:UV")) != -1) + # else +- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lUV")) != -1) ++ while ((ch = getopt(argc, argv, "7bBdD:f:h:r:lUV")) != -1) + # endif #endif /* HASHSPOOL */ { -@@ -249,6 +251,10 @@ main(argc, argv) +@@ -252,6 +254,10 @@ main(argc, argv) EightBitMime = false; break; @@ -36,9 +36,9 @@ case 'b': /* bounce mail when over quota. */ BounceQuota = true; break; -@@ -342,6 +348,10 @@ main(argc, argv) +@@ -361,6 +367,10 @@ main(argc, argv) + #endif break; - #endif /* HASHSPOOL || _FFR_SPOOL_PATH */ + case 's': + NoFsync = true; @@ -47,7 +47,7 @@ case '?': default: usage(); -@@ -351,7 +361,8 @@ main(argc, argv) +@@ -370,7 +380,8 @@ main(argc, argv) argv += optind; /* initialize biff structures */ @@ -57,7 +57,7 @@ err = sm_mbdb_initialize(mbdbname); if (err != EX_OK) -@@ -1273,6 +1284,7 @@ tryagain: +@@ -1300,6 +1311,7 @@ tryagain: /* Get the starting offset of the new message */ curoff = lseek(mbfd, (off_t) 0, SEEK_END); @@ -65,16 +65,16 @@ (void) sm_snprintf(biffmsg, sizeof(biffmsg), "%s@%lld\n", name, (LONGLONG_T) curoff); -@@ -1335,7 +1347,7 @@ tryagain: +@@ -1362,7 +1374,7 @@ tryagain: } /* Flush to disk, don't wait for update. */ - if (fsync(mbfd) < 0) + if (!NoFsync && fsync(mbfd) < 0) { - mailerr("450 4.2.0", "%s: %s", path, sm_errstring(errno)); + mailerr("450 4.2.0", "Sync %s: %s", path, sm_errstring(errno)); err3: -@@ -1402,7 +1414,7 @@ err0: (void) setreuid(0, 0); +@@ -1433,7 +1445,7 @@ err0: /* Attempt to truncate back to pre-write size */ goto err3; } @@ -82,16 +82,16 @@ + else if (!NoBiff) notifybiff(biffmsg); - if (setreuid(0, 0) < 0) -@@ -1582,9 +1594,9 @@ usage() - { + if ( +@@ -1618,9 +1630,9 @@ usage() ExitVal = EX_USAGE; - # if _FFR_SPOOL_PATH + /* XXX add U to options for USE_EAI */ + #if _FFR_SPOOL_PATH - mailerr(NULL, "usage: mail.local [-7] [-b] [-d] [-l] [-f from|-r from] [-h filename] [-p path] user ..."); -+ mailerr(NULL, "usage: mail.local [-7] [-b] [-B] [-d] [-l] [-s] [-f from|-r from] [-h filename] [-p path] user ..."); - # else ++ mailerr(NULL, "usage: mail.local [-7] [-b] [-B] [-d] [-l] [-f from|-r from] [-h filename] [-p path] user ..."); + #else - mailerr(NULL, "usage: mail.local [-7] [-b] [-d] [-l] [-f from|-r from] [-h filename] user ..."); -+ mailerr(NULL, "usage: mail.local [-7] [-b] [-B] [-d] [-l] [-s] [-f from|-r from] [-h filename] user ..."); - # endif ++ mailerr(NULL, "usage: mail.local [-7] [-b] [-B] [-d] [-l] [-f from|-r from] [-h filename] user ..."); + #endif sm_exit(ExitVal); } |