Compare commits

..
499 Commits
Author SHA1 Message Date
Devin Teske 0b14be7ca1 MFH r144419 (scottl): Add a manual page for the arcmsr driver. 2014-04-30 06:27:23 +00:00
Devin Teske 509fdeb47c Merge r144423 with r144497 in-mind. Glue the arcmsr driver into the
stable/4 branch -- but don't build arcmsr on pc98. This is a direct
commit to stable/4 as arcmsr is already hooked into stable/5 and up.
2014-04-30 06:03:01 +00:00
Devin Teske 59052e0215 Add tested known good version of Areca SATA RAID driver (arcmsr) working
in stable/4. An MFC of slightly later code than that of r144411 (scottl).
This is a direct commit to stable/4.

Obtained from:  Erich Chen <erich at areca com tw>
2014-04-30 05:59:31 +00:00
Devin Teske f46caf19b7 As-per r161293 (jhb), only recognize mfi(4) on i386.
This is a direct commit to stable/4 as all future branches contain
r105818 which made this code obsolete.
2014-04-30 05:26:31 +00:00
Devin Teske bb437b814f Fix lnc0 detection in VMware when PXE booting.
This is a direct commit to stable/4 since lnc(4) was deprecated
and does not exist beyond this branch.

Submitted by:	Paul Meng <[email protected]>
PR:		kern/77982
2014-04-30 05:00:52 +00:00
Devin Teske 1b671f52a1 MF6 r157468: Teach sysinstall about MFI (scottl)
NB: Merged from stable/6/usr.sbin/sysinstall to
stable/4/release/sysinstall (location changed in
between releases 4 and 6).
2014-04-30 04:44:51 +00:00
Devin Teske b571f5ab2f Teach libdisk about mfid devices. This is a direct commit to stable/4
since stable/5 and newer have r105681 which made this code obsolete.
2014-04-30 04:24:21 +00:00
Peter Wemm b870694b60 Revert MFC of r258821 2014-01-08 03:22:42 +00:00
Peter Wemm efa596224a MFC r258821 - fix tcp simultaneous close
PR:             kern/99188
2014-01-07 23:04:06 +00:00
John Baldwin 74886bb640 MF7: If the running kernel has support for shm_open() and shm_unlink() as
system calls (i.e. 8.0+), then invoke the system calls instead of using
open/fcntl/unlink.
2009-06-23 17:44:55 +00:00
John Baldwin f5e048d1f5 MFC: Add a feature_present(3) function which checks to see if a named kernel
feature is present by checking the kern.features sysctl MIB.
2009-06-11 13:07:42 +00:00
John Baldwin 9dcbeb11c2 MFC: Use a clean slate of register state when executing hardware interrupt
handlers to avoid leaking values into the upper 16-bits of general purpose
registers when executing these routines.
2009-03-03 17:16:26 +00:00
John Baldwin ffbe475239 MFC: tzdata2008i 2008-10-29 15:52:22 +00:00
John Baldwin 4d317604cb MFC: tzdata2008h. 2008-10-14 15:22:36 +00:00
John Baldwin dc48addf78 MFC: tzdata2008f. 2008-09-16 15:45:10 +00:00
John Baldwin 46e58ef6d1 MFC: Fix some of the hangs reported with the real mode BTX by disabling
interrupts for software interrupts.
2008-08-15 19:59:18 +00:00
John Baldwin 226a681031 MFC: Initialize the vm86 structure to a known-good state, specifically
eflags.
2008-08-15 19:34:02 +00:00
John Baldwin 2ca6835125 MFC: tzdata2008[cde]. 2008-08-15 16:21:32 +00:00
Paul Saab 0a4886a6a8 MFC: r179705
Add support for the P212, P410, P410i, P411, and P812 HP Smart Array
controllers.
2008-06-10 18:51:05 +00:00
Paul Saab 74be0aa080 Add the missing support for the P800 2008-06-10 18:50:14 +00:00
John Baldwin 78bcf0b937 MFC: rev 1.88
Remove a check that didn't allow > 12 byte CDB's to be issued to
ciss.  This should allow volumes > 2TB to work.
2008-05-19 19:21:14 +00:00
Bruce A. Mah 7908e0a091 MFC: BTX real mode, tzdata2008b. 2008-04-05 18:19:06 +00:00
John Baldwin 59f9eeeaa4 MFC of tzdata2008b 2008-03-25 18:09:20 +00:00
John Baldwin 1e7cd763ac MFC: Use real moder to invoke BIOS routines rather than virtual 86 mode. 2008-03-18 18:28:09 +00:00
John Baldwin 84cc038799 MFC: Fail attempts to use file descriptors larger than SHRT_MAX. 2008-03-17 17:42:26 +00:00
John Baldwin 8a5255bd87 MFC: tzdata2008a 2008-03-10 16:49:43 +00:00
John Baldwin 49a124a1f8 Bah, extra hunk slipped in. 2008-03-05 20:19:00 +00:00
John Baldwin 187acbcf67 MFC: Fix a problem with XID re-use when a server returns NFSERR_JUKEBOX. 2008-03-05 20:17:12 +00:00
Gregory Neil Shapiro 30ec02ece6 MFC: Fix quoting for the dnsbl example -- m4 misparses quoted strings with
commas due to our deconstruction of the line in cf/feature/dnsbl.m4.

     PR:             120038
     Submitted by:   mattijs vreeling

     Revision  Changes    Path
     1.36      +1 -1      src/etc/sendmail/freebsd.mc
2008-02-24 01:03:33 +00:00
Gregory Neil Shapiro be3124b49d MFC: Use better examples (and comment them out for safety).
PR:             118837
     Submitted by:   Matthew Seaman

     Revision  Changes    Path
     1.4       +13 -6     src/etc/mail/access.sample
2008-02-24 01:00:07 +00:00
John Baldwin e7f0a0d747 MFC 1.6: Allow MAXDEP dependants, not MAXDEP-1.
PR:		kern/46368
2008-01-30 16:24:24 +00:00
John Baldwin b4071ca476 MFC of tzdata2007k. 2008-01-07 15:49:35 +00:00
Peter Wemm 35a4f42e05 MFC: rev 1.4: forward compatability with cvs-1.12 repository 2008-01-07 09:11:23 +00:00
John Baldwin 8f915a7e4e MFC: Relax the probe for type #1 PCI config transactions on i386. 2007-12-06 08:28:17 +00:00
John Baldwin d8112c1194 MFC: Change pci_cfgdisable() into a nop for type #1 similar to what other
OSs do.
2007-12-06 08:21:23 +00:00
Bruce A. Mah 8d50548a06 MFC: Fix for tar directory traversal in FreeBSD-SA-07:10.tar. 2007-11-30 05:45:36 +00:00
John Baldwin 7d396c5f9c MFC: Correct a gtar directory traversal vulnerability. 2007-11-29 18:36:09 +00:00
David E. O'Brien 62fec1f9ee Add style.Makefile (refereed to from style.9). 2007-11-26 19:08:42 +00:00
David E. O'Brien ccdbd7e0d3 Sync with HEAD. 2007-11-26 19:05:49 +00:00
Gregory Neil Shapiro 8a5adbca8d Forced commit to .mc files to force creation of new .cf files for mergemaster.
Approved by:    re (kensmith)
2007-11-22 16:20:31 +00:00
Gregory Neil Shapiro 7aa157d6c2 MFC: sendmail 8.14.2 2007-11-11 17:09:13 +00:00
Maxim Konovalov 87801b0733 MFC revs. 1.12, 1.13: kill EOL w/spaces; update to the 1 November 2007
version of this file.
2007-11-05 07:53:06 +00:00
Bruce A. Mah 04a174a048 MFC: tzdata2007h. 2007-10-28 17:04:50 +00:00
John Baldwin 2f788d0a83 MFC of src/share/zoneinfo
MFV: tzdata2007h
2007-10-18 16:47:24 +00:00
John Baldwin 32872008e8 MFC: Use sysctlbyname(3) and some other minor cleanups. 2007-10-18 15:36:41 +00:00
John Baldwin ec89fced40 MFC: Sync whitespace. 2007-10-10 15:05:04 +00:00
John Baldwin 527e04fc0f MFC: Describe the process of importing new zoneinfo data and updating it
in CVS.

PR:		conf/116901
2007-10-09 15:05:26 +00:00
John Baldwin 30e3f23a51 MFC of src/share/zoneinfo
MFV: tzdata2007g
2007-09-18 20:35:40 +00:00
Gregory Neil Shapiro 269dc9dc0a Sort the SENDMAIL_* entries so I can...
MFC: You can never have enough documentation.

     Document the SENDMAIL_ALIASES, SENDMAIL_MAP_SRC, SENDMAIL_MAP_TYPE, and
     SENDMAIL_START_SCRIPT
     .Xr make.conf 5
     variables.
     These are used in
     .Pa /etc/mail/Makefile .

     PR:       conf/40548

     Revision  Changes    Path
     1.140     +40 -0     src/share/man/man5/make.conf.5
2007-06-18 04:36:31 +00:00
David Malone a3ff700424 MFC 1.209: Don't verify UDP IPv4 checksum in-place. 2007-06-10 07:34:28 +00:00
Matt Jacob b37842b29d Fix pointy-hat problem with BUS_DMA_ROOTARG macro that caused problems for sparc64. 2007-05-11 06:29:23 +00:00
Scott Long 0184436feb MFC rev 1.5: Add PCI Ids 2007-05-09 17:33:00 +00:00
Matt Jacob 24c2342e6b MFC to synchronize with -current. The bugs fixed are relatively few and
hopefully the bugs introduved are even fewer.
2007-05-08 17:47:08 +00:00
Peter Pentchev fcc1ae4eef MFC rev. 1.35 - remove MSG_PEEK from the description of the send(2)
syscall; it is only relevant for incoming data.
2007-05-04 09:06:59 +00:00
John Baldwin 8934eeaeb8 MFC: Only treat logical CPUs as hyperthreads if they share the L1 cache. 2007-04-30 16:34:10 +00:00
David Malone 34f02dc702 MFC: Man page improvements and don't put unix domain sockets into the
per-ip limits code.
2007-04-29 19:31:14 +00:00
Gregory Neil Shapiro 5b018e5026 MFC: Bring in sendmail.org code from the future 8.14.2 release which restores
ABI compatibility to users of the libmilter.so shared library.
2007-04-27 03:33:51 +00:00
Gregory Neil Shapiro 4b90ac0954 Forced commit to .mc files to force creation of new .cf files for mergemaster. 2007-04-23 22:30:23 +00:00
Gregory Neil Shapiro 7c1b834640 Include a note in the sendmail 8.14.1 release note regarding the libmilter
update.  Unfortunately, this problem (the need to recompile filters) was
found after the MFC.  The release engineering team has asked for this
instead of doing a full backout of sendmail 8.14 in the RELENG_[456]
branches.

Requested by:	re (bmah)
2007-04-20 05:12:48 +00:00
Gregory Neil Shapiro 3838fb6c0e MFC: Include a note about recompiling ports which use the base libmilter.
Submitted by:	Matthew Seaman
2007-04-14 16:27:16 +00:00
Gregory Neil Shapiro f85da9bc39 MFC: sendmail 8.14.1 2007-04-12 03:13:04 +00:00
cvs2svn d9005664af This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2007-04-09 01:38:53 +00:00
Matt Jacob 25b1ce325a EOL of RELENG_4 support.
MFC of constification, cleanups of pre-7.X compiles, additions of
SYNC_REG memory barriers and so on.
2007-04-01 17:22:03 +00:00
Matt Jacob cbc11e8e84 MFC xpt_print function. 2007-03-11 20:49:21 +00:00
cvs2svn 62656db132 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2007-03-10 02:39:55 +00:00
Bruce A. Mah 54405ba92b Add mention of the EOL status of RELENG_4. 2007-03-07 20:00:32 +00:00
Bruce Evans 4ccc7617da MFC (if_bge.c 1.108, etc., less some style bugs: eliminate one PCI
read per call to bge_start()).

In packet blasting tests using ttcp with tiny udp packets on an A64-3200
with a 64-bit 5701 on a 32-bit 33MHz PCI bus, this gives a speedup
from 347 kpps to 623 kpps.  sendto() has a lot of software overheads,
but even with these the single PCI write per call to bge_start() almost
doubled the per-packet time.  This is partly because the software
overheads are so large that the CPU can't keep up with a Gbps NIC that
can actually get anywhere near Gbps speed for tiny packets (347 kppps
for tiny packets is only about 21% of wire speed).  When the CPU can't
keep up, it gets further behind because it ends up calling bge_start()
at least once for every packet, so any overheads in bge_start() are
not amortized across multiple packets.  Thus the PCI read had an
especially high overhead.

For larger packets, the speedup is closer to the 1.8% claimed in rev.
1.108.

Rev.1.108 claims to eliminate a PCI write but actually eliminates a
PCI read.  The write of the tx product index is not so costly as its
read, and cannot be eliminated completely.  It could be coalesced in
some cases.
2007-02-15 10:33:49 +00:00
John Baldwin 7f041c7963 MF6: Sync with RELENG_6:
- Fix probe for 5708S adapters.
- Use LIST_FOREACH() in bce_ifmedia_upd().
- Compile fixes for BCE_DEBUG.
- Don't reset the chip in bce_watchdog() if we are in the routine because
  of pause frames.
- Fix multicast hash.
2007-02-08 17:22:03 +00:00
John Baldwin 25b9a27111 MFC: Don't read more than the given 'len' bytes from the 'big' string. 2007-02-01 19:11:25 +00:00
John Baldwin 85d7ae7691 MFC: Use malloc() rather than alloca() to allocate storage for old values
to avoid a segfault on boxes with lots of active TCP connections where
net.inet.tcp.pcblist can return a size bigger than alloca() can satisfy.
2007-01-22 20:37:37 +00:00
Markus Brueffer a2f5e3465f MFC rev. 1.83:
Fix a buffer overflow iff USB_DEBUG is set, hw.usb.ums.debug is > 5 and the
  total size of all input reports is < 6.

Approved by:	emax (mentor)
2007-01-21 02:27:40 +00:00
John Baldwin b17efbe326 MFC: Warn that the swap zone is exhausted before the machine deadlocks.
Reviewed by:	alc
2007-01-17 20:17:06 +00:00
Xin LI 4f12a58a49 The pc98 porting team's copyright year should be 2003, when
5.0-RELEASE, the first release including pc98 is released.

Noticed by:	hrs
Confirmed by:	nyan
2007-01-10 01:29:46 +00:00
David E. O'Brien c87c98f745 MFC: Welcome to 2007! 2007-01-01 03:03:50 +00:00
Matt Jacob 9d96a57785 RELENG_6 (5, 4) change to recognize 6 port NetMos
PR:             58953
Submitted by:   Milan Obuch
Reviewed by:    marcel
2006-12-16 02:41:00 +00:00
Alexander Leidinger 1b17934139 Don't display the status of the SMART bits when talking about the security
feature (should safe a heart attack or two when seeing the security feature
enabled when it isn't / shouldn't be).

This bug is not present in any more recent RELENG_X (the code is
different by an order of magnitude), so no MFC.
2006-12-10 13:35:41 +00:00
John Baldwin e11caf6c62 Sync with RELENG_6 including updating to version 6.2.9 of the driver. 2006-12-08 16:33:32 +00:00
John Baldwin 4f088aea53 Sync with RELENG_6 including:
- Use bus_dmamap_load_mbuf_sg() for tx packets and associated stability
  fixes.
- Kick the firmware sooner so IPMI works.
2006-12-07 16:30:35 +00:00
John Baldwin 1b4e415f7b Sync with RELENG_6 including:
- Add support for the 5752 and 5780 phys.
- Handle 10/100 only "bge" phys correctly.
- MFC some parts of 1.6 that among other things fix use of non-autoneg
  media with bce(4).
2006-12-07 16:28:44 +00:00
John Baldwin b8d95ea3aa Regen. 2006-12-07 16:25:53 +00:00
John Baldwin 5ed46b36d1 Add BCM5752 and BCM5780. 2006-12-07 16:25:31 +00:00
John Baldwin a49bd5303f Reduce diffs to RELENG_6:
- Use bus_dmamap_load_mbuf_sg() rather than a private simple callback in
  conjuction with bus_dmamap_load_mbuf().
- Use bus_alloc_resource_any().
- Remove bogus BUS_DMA_ALLOCNOW flag.
2006-12-06 22:03:13 +00:00
John Baldwin ec859b3569 Reduce diffs with RELENG_6:
- Use bus_dmamap_load_mbuf_sg() for setting up rx descriptors.
- Fix a few whitespace nits.
2006-12-06 22:01:46 +00:00
John Baldwin 386fb8a2b0 Add an MI bus_dmamap_load_mbuf_sg() that wraps around
bus_dmamap_load_mbuf() using a simple callback to make it easier to
keep drivers in sync between 4.x and 6.x.

Not objected to by:	scottl
2006-12-06 22:00:46 +00:00
Bruce A. Mah 48055e9d11 MFC: SA-06:25.kmem, SA-06:26.gtar. 2006-12-06 20:59:07 +00:00
Bruce A. Mah 9a6cf22d4b MFC: SA-06:25.kmem, SA-06:26.gtar. 2006-12-06 20:14:16 +00:00
Colin Percival ed4564dbef Correct a signedness bug which allowed members of the operator
group to read kernel memory. [1]

Disable handling of GNUTYPE_NAMES tar file entries by default,
since they can be used to extract files outside of the cwd. [2]

Security:	FreeBSD-SA-06:25.kmem [1]
Security:	FreeBSD-SA-06:26.gtar [2]
2006-12-06 09:17:09 +00:00
John Baldwin 9ed9ca9773 Add support for making mfi and mfid devices. 2006-11-28 21:59:47 +00:00
John Baldwin 540565e54d Assign major numbers 177 and 178 to mfi(4) rather than using two majors
reserved for local devices (200 and 201).
2006-11-28 19:05:06 +00:00
John Baldwin 180ddf14f2 Document major numbers used for amr(4). 2006-11-28 19:03:53 +00:00
Yoshihiro Takahashi fb4a042122 MFi386: revision 1.385.2.35. 2006-11-09 04:04:41 +00:00
John Baldwin 1445e5a326 Ignore I/O APICs that aren't really there (return 0xffffffff when you try
to talk to them) if they aren't listed as the destination of any interrupts
in the MP Table instead of panic'ing when we fail to set the APIC ID.  The
new APIC code in 5.x+ has a similar check.
2006-10-25 14:44:29 +00:00
John Baldwin b0e60e6f78 MFC: uthread fixes for select timeout and signal handling. 2006-10-23 20:11:31 +00:00
Bruce Evans 5973402762 MFC: parts of the following, so that atomic.h in RELENG_4 can be
compiled by RELENG_6's compiler:
1.26: pass constraints as a parameter since chars and shorts need
      different ones.
1.27: fix pedantic syntax errors.
1.40: don't use the '+' constraint so much, since gcc-3.3.mumble broke
      it for non-register operands.

1.40 essentially backs outs 1.22, and also avoids using the "0"
constraint, and also remumbers asm parameters.  1.22 had already been
merged to RELENG_4 in 1.9.2.2 in order to fix compiling with -O0 with
RELENG_4's compiler.  This turned out to be not future-proof.  I think
the "0" constaint would work with gcc-3, but not using it is a better
way to fix compiling with -O0 in RELENG_4.  Problems in this area go
back to gcc-2.early or gcc-1 when the "0" and "+" constraints didn't
exist and there were no correct alternatives for them.  1.9.2.1
unnecessarily used an incorrect alternative that happened to work
except for -O0.

This change is essentially null when compiled by RELENG_4's compiler.
For GENERIC, LINT and one other configuration, it changes no object
files except atomic.o compiled with -O0; for the latter it gives
different register allocation and some unused instructions.
2006-10-22 07:00:07 +00:00
Bruce Evans dca0728463 Remove special support for gcc <= 2.8 so that the next change is more
readable.  gcc-2.8 was last sighted in FreeBSD-3 and wasn't the system
compiler in any version of FreeBSD-4.  The next change will improve
portability and might even work without ifdefs for gcc-2.8.
2006-10-21 11:09:50 +00:00
Ruslan Ermilov d97ff0c8ea - Finish the incomplete MFC of 1.11 in 1.6.2.3 (newsletter V-6).
- MFC: 1.14 (newsletter V-11), 1.15 (newsletter V-12).
2006-10-18 09:13:47 +00:00
Bruce A. Mah 992cb9f884 MFC: tzdata2006n. 2006-10-14 15:22:24 +00:00
Doug Barton 63b6904a7f MFC tzdata2006n 2006-10-13 17:51:42 +00:00
Xin LI 9009688c8d MFC rev. 1.16 (iedowse):
Add missing parentheses to fix a segmentation fault that is easily
reproducable with `jot -s " " 400 1 | column -t'. The bug was present
in the the original CSRG 'column -t' added in 1989.
2006-10-08 02:26:53 +00:00
Bruce A. Mah 1a68479300 MFC: SA-06:22.openssh. 2006-10-08 00:28:24 +00:00
Bruce A. Mah 3df66645f8 New errata: SA-06:23.openssl. 2006-10-07 15:35:17 +00:00
Bruce Evans 1b34ff224d Fail the probe instead of panicing if the memory address is 0. The
memory address can be 0 only with certain misconfigurations.  We don't
try to detect misconfigurations of the kernel config file, but IIRC the
panic was caused by a hardware misconfiguration like the following:
- a cy PCI card physically present but with a hardware conflict
- then the cy PCI probe is called first but fails due to the conflict
- no cy ISA card present
- the cy ISA probe is called.  Normally this uses the nonzero memory
  address in the config file and just fails when there is no cy ISA
  card present, but when there is a cy PCI card present, the ISA memory
  resource is apparently lost.  The (non-)presence of the cy ISA card
  probably makes no difference here.
2006-10-06 14:16:20 +00:00
Bruce Evans 2bce92ca8d Fixed overflow at 2G for writing clock frequencies using sysctls.
Reads worked correctly using the IU format.  Writes only supported
signed integers using the CTLTYPE_INT flag.  sysctl(1) parses args for
CTLTYPE_INT using (int)strtol() and has no range checking of course,
so read-write of frequencies larger than INT_MAX always blindly corrupts
the frequency to INT_MAX (2G-1).

This keeps writing of TSC frequencies working up to 4GHz.
2006-10-06 13:24:16 +00:00
Matt Jacob 11972af438 Add REPORT_LUNS definition. 2006-10-05 17:15:30 +00:00
Matt Jacob 2e61752fe6 MFC the current state of mpt. 2006-10-05 16:00:08 +00:00
Bruce Evans 7ac6b8a89a MFC (1.519: fix a syntax error (no statement after a label)) so that this
file in RELENG_4 can be compiled by gcc in -current again.
2006-10-03 18:19:17 +00:00
Bruce Evans 60c653da58 MFC (1.34: fix a syntax error (no statement after a label)) so that this
file in RELENG_4 can be compiled by gcc in -current again.
2006-10-03 18:13:49 +00:00
Bruce Evans 2bc31b0b50 MFC (1.13: fix a syntax error (no statement after a label)) so that this
file in RELENG_4 can be compiled by gcc in -current again.
2006-10-03 18:04:55 +00:00
Bruce Evans 22c75a1a6c Fixed a syntax error (no statement after a label) so that nfs in RELENG_4
can be compiled by the -current gcc again.
2006-10-03 17:53:03 +00:00
Simon L. B. Nielsen c704d5aba4 Correct multiple vulnerabilities in OpenSSH.
Security:	FreeBSD-SA-06:22.openssh
2006-09-30 19:57:15 +00:00
Colin Percival 0cf1d7c6b1 Correct problem in the 2006-09-28 patch concerning the handling of
excessively large DH moduli.

Reported by:	Steve Kiernan (Juniper SIRT)
Security:	FreeBSD-SA-06:23.openssl
2006-09-29 13:46:23 +00:00
Bruce A. Mah f2804129c0 MFC: SA-06:21.gzip, SA-06:23.openssl. 2006-09-28 15:49:13 +00:00
Bruce A. Mah 5747982878 New errata: SA-06:21.gzip, SA-06:23.openssl. 2006-09-28 15:17:08 +00:00
Colin Percival 1a6bbf9e63 Correct multiple vulnerabilities in crypto(3).
Limit the size of public keys used in order to protect applications
from a denial of service via insane key sizes.

Security:	FreeBSD-SA-06:23.openssl
2006-09-28 13:05:59 +00:00
Bruce M Simpson 851dbecea7 Add a sysctl net.link.ether.bridge.hwassmask which lets administrators
mask hardware checksums on bridge interface members.

PR:		kern/57100
2006-09-23 19:27:39 +00:00
Bruce M Simpson 9999550269 Add a sysctl net.link.ether.bridge.hwassmask which lets administrators
mask hardware checksums on bridge interface members.

PR:		kern/57100
2006-09-23 09:40:02 +00:00
Simon L. B. Nielsen 682a090cae Correct multiple vulnerabilities in gzip(1).
Security:	FreeBSD-SA-06:21.gzip
2006-09-19 14:11:35 +00:00
Matt Jacob 769ba89464 MFC 1.163- give VMware disks min/max tags in their quirk. 2006-09-15 20:48:18 +00:00
Peter Wemm 16faf54439 MFC: rev 1.21: fix return of uninitialized data from malloc(). Could
cause readdir() to fail or give duplicate results or other strange things.
2006-09-12 22:27:11 +00:00
Bruce A. Mah 475800b7cf MFC: SA-06:19.openssl. 2006-09-12 16:47:44 +00:00
Remko Lodder d045e0d4ae Add FreeBSD-SA-06:19.openssl to the Errata. 2006-09-06 22:57:02 +00:00
Simon L. B. Nielsen bbc07a0c27 Correct incorrect PKCS#1 v1.5 padding validation in crypto(3).
Security:	FreeBSD-SA-06:19.openssl
2006-09-06 21:24:04 +00:00
John Baldwin 3289b92eea Sync up with most of the changes to RELENG_6 including using bus_dma,
new PCI IDs, lots of style changes, suspend/resume methods.  Things not
included include the INTR_FAST + taskqueue changes, link flapping
workarounds in em_ioctl(), and jumbo frame fixups for architectures that
require strict alignment.
2006-09-05 19:48:10 +00:00
Bruce A. Mah 610cad552e Close off a tag properly. This problem has existed since I first
created this file way back in April 2001 (on all other active branches
the section containing this tag has been obsoleted so it was only a
RELENG_4 problem).

I have no idea how this file ever compiled before, but my doc
toolchain suddenly started complaining about it.
2006-08-31 00:51:21 +00:00
Bruce A. Mah 75406f5d17 New errata: SA-06:18.ppp. 2006-08-31 00:39:10 +00:00
Bruce A. Mah 2a8f4eae06 MFC: SA-06:18.ppp. 2006-08-29 22:41:28 +00:00
Colin Percival e88e01fad7 Correct buffer overflow in the handling of LCP options in ppp(4)
Security:	FreeBSD-SA-06:18.ppp
2006-08-23 22:06:08 +00:00
Gregory Neil Shapiro 98d58fbac8 sendmail has been upgraded from 8.13.6 to 8.13.8 2006-08-23 03:48:05 +00:00
Gregory Neil Shapiro 87b155eb66 Forced commit to .mc files to force creation of new .cf files for mergemaster. 2006-08-23 03:40:18 +00:00
Gregory Neil Shapiro e7886e684f MFC: sendmail 8.13.8 2006-08-23 03:39:12 +00:00
David Malone 04e78af938 MFC: 1.300 When we receive an out-of-window SYN for an "ESTABLISHED"
connection, ACK the SYN as required by RFC793.
2006-08-21 12:43:24 +00:00
David Malone 03e5be2d12 MFC: 1.27 Avoid unwanted sign extension of indexed byte load in bpf code. 2006-08-21 12:42:52 +00:00
David Malone 5065ebddc7 MFC: 1.170 Give the same timestamp for each packet to all BPF listeners. 2006-08-21 12:42:25 +00:00
Matt Jacob 2cafc28e85 MFC 1.120: Fix RELENG_4 code version- isp_roles wasn't getting
initialized so it ended up defaulting to ISP_ROLE_NONE. My testing
hadn't caught it because I was deliberatly setting role via ioctl.
2006-08-21 00:48:37 +00:00
Maxim Konovalov e2a91f9c6f MFC rev. 1.14: simple strcpy/strcat replacement. 2006-08-20 20:31:10 +00:00
John Baldwin 29edcdadb0 Make the 'mfi' module i386 only on 4.x since it doesn't compile cleanly
on 4.x currently and there is very little chance that any alphas will ever
have an mfi(4) card.
2006-08-14 21:08:20 +00:00
Yaroslav Tykhiy f8f52c191c MFC rev. 1.57:
Do not forget to increment the input line counter
  when reading a word spanning multiple lines.
2006-08-06 10:47:45 +00:00
John Baldwin 290b4174ac Bah, fix the 1.5 MFC to actually work on 4.x.
Pointy hat to:	jhb
2006-07-20 20:16:16 +00:00
John Baldwin f2e74f72ea MFC: Chain the bus_dmamap_load() calls when mapping a command with a data
CCB instead of using BUS_DMA_NOWAIT().  Since bus_dmamap_load() doesn't
support BUS_DMA_NOWAIT in 4.x, this could result in data corruption if
sufficient bounce pages weren't available.

Submitted by:	scottl
2006-07-20 20:07:37 +00:00
John Baldwin 75812123d4 MFC revs 1.4 and 1.5:
- Removed updates to if_ibytes, if_obytes, if_imcasts, and if_omcasts.
- Match code in 6.x and HEAD for handling excessively fragmented mbufs for
  TX.
- Handle ifconfig up when HW is down.
2006-07-20 18:54:15 +00:00
John Baldwin 29911091d0 MFC: Probe volumes synchronously during boot. 2006-07-18 20:01:06 +00:00
Matt Jacob c795d37c9c MFC 1.117: don't claim to support the 2422 yet. 2006-07-14 05:19:17 +00:00
Matt Jacob 19b60149ee MFC: Fixes related for VMWare 2006-06-27 18:13:23 +00:00
Matt Jacob e14dcec7c2 MFC 1.162: Grumble. VMWare ESX and VMWare WorkStation have *slightly*
different inquiry data (pointlessly different I might add). Pick
the common parts.
2006-06-26 05:42:54 +00:00
Matt Jacob b5b1e543a8 MFC 1.161: VMware disk volumes are only on LUN 0, and
some VMware HBAs have known bugs with commands sent to
other than LUN 0.
2006-06-25 02:03:18 +00:00
John Baldwin fd58dfe91a Bah, include Makefile for bce(4) module.
Reported by:	Scott Allendorf <scott-allendorf AT uiowa dot edu>
2006-06-23 21:10:40 +00:00
Bruce A. Mah a57f28ddf7 MFC: SA-06:17, mfi(4), mpt(4) update, bce(4). 2006-06-23 18:38:03 +00:00
John Baldwin 1b93261e83 Regen. 2006-06-23 16:48:18 +00:00
John Baldwin 99a948a16f MF6: Add the bce(4) driver. Unlike the driver in 6.x and later this driver
does not support jumbo frames or hardware vlan tagging.
2006-06-23 16:47:46 +00:00
Paul Saab 4ec0843a7b Add mfi without the Linux ioctl layer. 2006-06-22 15:22:05 +00:00
cvs2svn 81f87079dd This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2006-06-20 23:08:36 +00:00
Matt Jacob 1f3727d650 MFC 1.34: support for FC919X 2006-06-17 12:48:27 +00:00
John Baldwin e78df6e86c MFC 1.27: Fix a typo when setting wirespeed. 2006-06-15 20:57:05 +00:00
Matt Jacob 4b50c2e075 MFC 1.24- add ability to reset individual targets and negotiate specific
rates.
2006-06-14 19:47:22 +00:00
Hiroki Sato 01780d930d Document FreeBSD-SA-06:17.sendmail. 2006-06-14 16:36:08 +00:00
Colin Percival 918ccd0822 Correct a bug in the handling of multipart messages by sendmail(8)
which can allow a malformed message to crash a sendmail queue
processing process.

Security:	FreeBSD-SA-06:17.sendmail
2006-06-14 16:01:06 +00:00
Matt Jacob ff5211e6c8 MFC -current mpt driver to support FC target mode and SAS HBAs plus
probably correct U320 negotiations. MFC sequential probe scan code
top support htis.
2006-06-08 17:55:15 +00:00
cvs2svn c44f3af96c This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2006-06-05 22:25:50 +00:00
Matt Jacob fd10f4d70b MFC: allow this to compile cleanly under RELENG_4 2006-06-03 07:21:09 +00:00
Matt Jacob 4a64f8794a MFC: current state in RELENG_6 && -current as of 5/31/06. Lots of formatting
changes and type rototilling. Some genuine bug fixes tho.
2006-06-01 07:31:44 +00:00
Matt Jacob 9f145c53b7 MFC 2300 firmware 2006-06-01 07:18:26 +00:00
Bruce A. Mah 5c50da438d New errata: SA-06:16.
While here, retarget advisory URLs (and one or two others) to use
security.FreeBSD.org.
2006-06-01 04:56:53 +00:00
Bruce A. Mah 7ce45f14d7 Swing URLs to security advisories over to security.FreeBSD.org. 2006-05-31 23:49:51 +00:00
Bruce A. Mah b6ce60be7c MFC: SA-06:16.
Note:  We should swing the URLs for all the older security advisories
mentioned here over to the new location on security.FreeBSD.org.
2006-05-31 23:44:25 +00:00
Colin Percival 3b192f61b0 Correct a bug in the handling of backslash characters in smbfs which can
allow an attacker to escape from a chroot(2).

Security:	FreeBSD-SA-06:16.smbfs
2006-05-31 22:34:32 +00:00
cvs2svn 1823be123d This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2006-05-29 20:34:29 +00:00
John Baldwin 42d2722235 When routing a PCI interrupt across a PCI-PCI bridge that is not listed
in the MP Table, use the slot (aka device) of the _child_ PCI device
on the child bus of the PCI-PCI bridge instead of the slot of the
PCI-PCI bridge on the parent bus of the bridge.
2006-05-23 17:59:06 +00:00
Paul Saab 0f6b7809d4 Protect amr_wait_command under splbio to avoid a missed wakeup. 2006-05-16 07:03:32 +00:00
Tai-hwa Liang 4f301220e8 MFC: (1.4, 1.5) Allow the gif module to be built without IPv6 support when
NOINET6 is defined.
2006-05-15 23:27:00 +00:00
Maxim Konovalov 78f1625b44 MFC revs. 1.29, 1.30, a part of 1.36: the .Nm utility,
filesystem -> file system, move rcs id tag.

PR:		docs/66264
Submitted by:	Michel Lavondes
2006-05-15 10:03:09 +00:00
Tor Egge d1f353e99d MFC part of revision 1.436 missed in MFC to revision 1.250.2.24. If page
table allocation failed then the allocation should be retried.

Submitted by:	ps
2006-05-03 00:51:02 +00:00
David Malone 41808ed937 MFC: 1.37
Stop dump reading off the end of its inode bitmaps when it finds an
invalid inode number in a directory entry.
2006-05-02 19:09:22 +00:00
David Malone ea1fe38e6a MFC: v1.45, v1.44
Make port 37 time work on machines with 64 bit longs. Also merge a couple
of updates to comments.
2006-05-02 18:32:43 +00:00
Julian Elischer eb96ff8d0a MFC: Add capacity to forward messages to an arbitrary UDP port,
not just to 514.
2006-05-01 23:46:12 +00:00
Joe Marcus Clarke e43c8019c3 MFC:
Fix a file descriptor leak in cam_lookup_pass() when the ioctl to find
the passthru device fails.

Approved by:	re (scottl)
2006-05-01 00:21:47 +00:00
Colin Percival 5826d4c070 MFC: Correct a local information leakage bug affecting AMD FPUs.
Security:	FreeBSD-SA-06:14.fpu
2006-04-19 07:02:43 +00:00
Florent Thoumie 767f330119 - Add missing libdata/ldconfig{,32} directories to BSD.local.dist.
- Bump __FreeBSD_version so that misc/ldconfig_compat can make good use
of it.

Approved by:	cperciva (mentor)
2006-04-18 15:33:32 +00:00
Maxim Konovalov 0764d34a8f MFC rev. 1.112 by mdodd: bfp could be NULL.
PR:		kern/76410
2006-04-14 10:38:49 +00:00
Gregory Neil Shapiro 0ce2809f6a Forced commit to bump the $FreeBSD$ version so mergemaster merges
/etc/mail/freebsd.cf and /etc/mail/freebsd.submit.cf.

PR:		conf/95634
Submitted by:	Rostislav Krasny
Approved by:	re (scottl)
Obtained from:	keramida
2006-04-13 04:08:22 +00:00
Gregory Neil Shapiro 1af9ce6a59 MFC: Update sendmail 8.13.4 -> 8.13.6 in release note entry. 2006-03-29 07:58:06 +00:00
Gregory Neil Shapiro 0b5898868b MFC: Add new libsm file from sendmail 8.13.6 2006-03-29 07:43:23 +00:00
Gregory Neil Shapiro 77e0466b7d MFC: sendmail 8.13.6 2006-03-29 07:43:06 +00:00
Hajimu UMEMOTO c491b54569 MFC 1.55: fill ai_canonname field for numeric hostname, by the given
hostname.  follow new recommendation in RFC3493.

PR:		standards/94995
2006-03-27 16:47:17 +00:00
cvs2svn f37f9dbb4d This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2006-03-22 16:40:05 +00:00
Colin Percival 6159e829e8 Add missing code needed for the detection of IPSec packet replays. [1]
Correctly identify the user running opiepasswd(1) when the login name
differs from the account name. [2]

Modify timeout handling logic in sendmail(8) to correct a reported
signal handling race condition. [3]

Security:	FreeBSD-SA-06:11.ipsec [1]
Security:	FreeBSD-SA-06:12.opie [2]
Security:	FreeBSD-SA-06:13.sendmail [3]
2006-03-22 16:02:49 +00:00
Joe Marcus Clarke f5883a9bfe MFC:
Add missing libdata/ldconfig[32] entries.

Approved by:	re (scottl)
2006-03-14 22:13:13 +00:00
Roman Kurakin a008bf8d24 MFC:
Add support for Cronyx Tau32-PCI adapters.
2006-03-12 22:56:56 +00:00
John Baldwin 42cc9a8f91 Revert the previous change. Even though Intel insists that the behavior
this change restores is wrong, it turns out the "proper" method is worse
in practice for existing machines.  This is probably due to the fact that
using fixed priority with a physical broadcast destination effectively
broadcasts interrupts to all CPUs.  Fixing that would require a lot more
work than just restoring the previous "incorrect" behavior and would
probably be riskier as well.

PR:		kern/94160
Reported by:	Richard Wiwatowski rjwiwat at internode dot on dot net
2006-03-09 16:23:15 +00:00
Roman Kurakin 31f0c58c8e MFC:
Add support for Cronyx Tau32-PCI adapters.
	Connect to the system.
2006-03-04 23:01:39 +00:00
Roman Kurakin 7ad0795efc MFC:
Add support for Cronyx Tau32-PCI adapters.
2006-03-04 22:55:48 +00:00
Roman Kurakin b7615bd254 MFC:
Add support for Cronyx Tau32-PCI adapters.
2006-03-04 22:45:14 +00:00
cvs2svn c1dc19accd This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2006-03-03 18:42:10 +00:00
John Baldwin ae07094931 Use the fixed delivery mode rather than low priority for I/O APIC
interrupts since low priority delivery mode can only be used logical
destinations and 4.x and earlier always use only physical destinations.
2006-03-01 16:26:51 +00:00
Simon L. B. Nielsen a17473bb18 Correct a remote kernel panic when processing zero-length RPC records
via TCP.

Security:	FreeBSD-SA-06:10.nfs
Approved by:	cperciva
2006-03-01 14:21:56 +00:00
Ian Dowse 6f2020ba66 Fix an old mis-merge in 1.26.2.11 that invoked usb_cold_explore()
too late in the boot process - "cold" is guaranteed to be false at
SI_SUB_INT_CONFIG_HOOKS, but it was being KASSERTed as true. With
usb_cold_explore() now running at the correct time, it does need
to use polling mode and splusb(), so back out 1.26.2.14.

PR:		usb/81524
Tested by:	Eugene Grosbein
2006-02-28 09:32:08 +00:00
Hajimu UMEMOTO ef2dc9b352 MFC 1.63: avoided the use of purged address structure when an
address became invalid in nd6_timer().
2006-02-14 16:35:13 +00:00
Hajimu UMEMOTO 0a75c3bd03 MFC 1.168: Never select the PCB that has INP_IPV6 flag and is bound
to :: if we have another PCB which is bound to 0.0.0.0.  If a PCB has
the INP_IPV6 flag, then we set its cost higher than IPv4 only PCBs.
2006-02-11 09:10:53 +00:00
Hajimu UMEMOTO 62be4a437d MFC 1.56: make IPV6_V6ONLY socket option work for UDP as well. 2006-02-09 03:41:51 +00:00
Ruslan Ermilov d6f03ebe01 MFC: Make multicast routing rolling on bge's. 2006-02-01 10:15:12 +00:00
Diomidis Spinellis 0d94a803aa MFC: Return EINVAL if the tv_usec part of the utimes(2) arguments
contains incorrect fractional second values (outside the range
0-999999).
Prior to this change users could create files with values outside
that range.  Moreover, on 32-bit machines tv_usec offsets larger than
4.3s would result in an unnormalized AND wrong timestamp value,
due to overflow.
2006-01-22 13:41:15 +00:00
Diomidis Spinellis 8bb467bd3e MFC change 2005-09-19 10:11:47 UTC
Setting .nofinger will not hide you from root.
2006-01-22 11:56:15 +00:00
Diomidis Spinellis ea664c2004 MFC 1.47: Document the TMPDIR environment variable. 2006-01-22 11:41:18 +00:00
Ruslan Ermilov 5ed24e50dd MFC: polling(4) support for bge(4). 2006-01-17 10:41:06 +00:00
Pav Lucistnik ca951584be MFC 1.34: mention the size of the additional header 2006-01-14 12:13:04 +00:00
Ed Maste 6d08372564 Merge device_pager.c:1.69 from HEAD to RELENG_4:
The addition of a locking assertion to vm_page_zero_invalid() has
  revealed a long-time bug: vm_pager_get_pages() assumes that m[reqpage]
  contains a valid page upon return from pgo_getpages().  In the case of
  the device pager this page has been freed and replaced by a fake page.
  The fake page is properly inserted into the vm object but m[reqpage] is
  left pointing to a freed page.  For now, update m[reqpage] to point to
  the fake page.

  Submitted by:   tegge

Approved by:	alc, rwatson (mentor)
2006-01-12 19:56:58 +00:00
Colin Percival 613d8db2b9 Correct insecure temporary file usage in texindex. [06:01]
Correct insecure temporary file usage in ee. [06:02]
Correct a race condition when setting file permissions, sanitize file
names by default, and fix a buffer overflow when handling files
larger than 4GB in cpio. [06:03]

Security:	FreeBSD-SA-06:01.texindex
Security:	FreeBSD-SA-06:02.ee
Security:	FreeBSD-SA-06:03.cpio
2006-01-11 08:06:47 +00:00
Shunsuke Akiyama c7d8542358 Regenerate after updating usbdevs. 2006-01-06 15:16:41 +00:00
Florent Thoumie 6105148405 Fix latest commit, some vendor ids and product ids were missing.
Approved by:	pjd (implicit)
Pointyhat to:	self
2006-01-05 16:54:18 +00:00
Florent Thoumie 1c9096f353 MFC:
Add a hid blacklist quirk.

      src/sys/dev/usb/usbdevs: rev 1.240
      src/sys/dev/usb/usb_quirks.c: rev 1.45
      src/sys/dev/usb/uhid.c: rev 1.78
      src/sys/dev/usb/usb_quirks.h: rev 1.20

Approved by:	pjd
2006-01-05 16:46:10 +00:00
Paul Saab 7e7b44fd4a MFC:
revision 1.67
It seems ciss should ignore overrun and underrun on a SCSI INQUIRY
command.  This fixes some weird booting issues on newer versions
of the firmware on the MSA20.

revision 1.66
Update PCI ids to add the E200, E200i, P400, and P400i storage
controllers.  Remove the E400 since it is not a real product.

revision 1.65
There's no reason to check the valence.  This allows ciss to work
on the P600.
2005-12-31 06:28:57 +00:00
Diomidis Spinellis df0e9fe5a4 MFC 1.28
Bug fix: a numeric flag specification in the substitute command would
cause the next substitute flag to be ignored.
While working at it, detect and report overflows.
2005-12-25 16:40:03 +00:00
Diomidis Spinellis 4a5574a12e MFC 1.19
Use the appropriate error function for displaying the error,
instead of printing it to stdout.
2005-12-25 16:26:40 +00:00
Maxime Henrion f97aadf12e MFC r1.252:
date: 2005/12/12 14:30:13;  author: mux;  state: Exp;  lines: +1 -0
  Add the device ID of fxp(4) NICs found in Sony Vaio VGN-TX1XP laptops.
2005-12-16 03:26:37 +00:00
Gleb Smirnoff a6c634a44e Fix a typo that caused a panic in a quite rare case: when a packet was
policy routed by ipfw(4) to local IP address, and the previous destination
of the packet was reachable via an interface with checksum offloading
capabilities.

Not applicable to RELENG_5, RELENG_6 and HEAD.

Submitted by:	Mihail Balikov <misho interbgc.com>
2005-12-10 14:32:55 +00:00
Ruslan Ermilov c1026b37db MFC: Fix memory leak. 2005-12-09 07:13:06 +00:00
John Baldwin 075cf5a152 MF5: Always read RTC_IN to clear any pending interrupt when writing to
RTC_STATUSB.

Tested by:	Uwe Doering gemini at geminix dot org
2005-11-28 19:03:16 +00:00
Robert Watson e66f54b279 Add several missing calls to splx() in error cases associated with
calling ether_ipfw_chk() from the ethernet output code.

PR:		57985
Reported by:	Scot Loach <sloach at sandvine dot com>
2005-11-27 18:37:15 +00:00
Kirill Ponomarev e9ec5207c8 MFC: pkg_info.1:1.55
date: 2005/11/23 10:31:59;  author: krion;  state: Exp;  lines: +4 -1
  Document PKG_PATH enviroment variable.

  Prodded by:     Mark Andrews <Mark_Andrews AT isc DOT org>
2005-11-26 20:58:43 +00:00
Hajimu UMEMOTO b911500d1f MFC 1.55: The KAME's getipnodebyaddr() code honor the
MULTI_PTRS_ARE_ALIASES define also, but res_config.h was not
included into libc/net/name6.c.  So getipnodebyaddr() ignored
the multiple PTRs.
2005-11-18 02:38:45 +00:00
Pav Lucistnik 8aa540a47c Add new ports-net-im collection. 2005-11-09 10:16:26 +00:00
John Polstra 906987067d MFC 1.24: Fix an erroneous description of the file descriptor
assignments for the "~C" command.
2005-11-04 17:33:21 +00:00
Wilko Bulte 6008dfd2bc Small changes in the AlphaStation 200 and PC164 area. PC164 SRM does
not work with 53C896 SCSI chips.

Submitted by: Owen Mann <[email protected]>
2005-11-02 22:23:27 +00:00
Colin Percival 14b1ff25f5 Correct a man-in-the-middle SSL version rollback vulnerability.
Security:       FreeBSD-SA-05:21.openssl
2005-10-11 11:52:01 +00:00
Hajimu UMEMOTO d5e2470049 MFC 1.16: stop RFC 4193 address on the outside interface. 2005-10-10 09:52:01 +00:00
Doug Barton 9906dbfbac MFC through rm.c 1.53, rm.1 1.38, and Makefile 1.18.
This includes the recent change to improve handling of the -P flag
on read-only files, addition of the -I option for better handling
of recursive deletes, a test for removal of / in the argument list,
removal of clause 3 from the BSD license, some small code cleanups,
and related mdoc and comment changes and improvements.

The Makefile change removes a spurious SRCS=, and WARNS?=
2005-10-08 17:46:12 +00:00
John Baldwin 208191f1b1 Enable BWX for the Alcor2 chipset treating it like the Pyxis. This is not
an MFC as the code in 5.x and beyond is rather different.

Submitted by:	Paul V. Bolotoff walter at alasir dot com
2005-09-30 13:25:30 +00:00
Xin LI 5a66f48bd9 MFC 1.64: Restore a historical ufs_inactive behavior that respect
the RDONLY option, so subsequent call of UFS_TRUNCATE (ffs_truncate)
would not panic the system.  This fixes a panic that can happen
when mounting a corrputed filesystem read-only, and reading data
from it.

Reviewed by:	mckusick
2005-09-27 17:05:46 +00:00
Kirill Ponomarev e9bc9afe9c MFC: 1.20
date: 2005/09/24 21:41:47;  author: krion;  state: Exp;  lines: +1 -1
  Do not bitch about bsdpan modules not having origin.

  Based on PR:    bin/82269
  Submitted by:   Steven Hartland <killing at multiplay dot co dot uk>
  MFC after:      3 days
2005-09-27 07:56:03 +00:00
Kirill Ponomarev 78e71c01b7 MFC: 1.39
date: 2005/09/24 19:41:56;  author: krion;  state: Exp;  lines: +1 -1
  Remove '\n' since it's redundant in case if file doesn't exist while
  running 'pkg_info -g'

  Based on PR:    bin/42609
  Submitted by:   Jeff King <peff-freebsd at peff dot net>
  MFC after:      3 days
2005-09-27 07:54:08 +00:00
Robert Watson c7d769bfbd Merge rc.conf:1.260, rc.conf.5:1.265, and notionally kerbero:1.5 from
HEAD to RELENG_4:

  Add a new rc.conf entry, kerberos5_server_flags, which allows the
  administrator to specify additional start-up flags to the Kerberos
  5 Authentication Server.
2005-09-25 19:11:08 +00:00
Tor Egge bd1c32850b MFC: Retain generation count when writing zeroes instead of an inode to disk.
Don't free a struct inodedep if another process is allocating saved
     inode memory for the same struct inodedep in
     initiate_write_inodeblock().

     Handle disappearing dependencies in softdep_disk_io_initiation().
2005-09-20 22:37:54 +00:00
Gleb Smirnoff 8ee23ab4f5 MFC typo fix from 1.75:
Dej'a vu of revision 1.35

  PR:		kern/86258
  Submitted by:	Hiroshi Oota <ghelp excite.co.jp>
2005-09-20 13:47:59 +00:00
Stephan Uphoff bcd0b35a45 Multiple interrupt handlers may try to queue an event for a
nested kqueue. (4.X only race condition)

Found by:	Yahoo!
2005-09-20 01:12:06 +00:00
Doug Barton 8a37bb3346 MFC 1.32, always read to and write from a terminal.
PR:		bin/65892
Requested on:	freebsd-security
Requested by:	Yar Tikhiy <[email protected]>
2005-09-10 22:10:34 +00:00
Doug Barton 9595d86138 MFC through 1.22 the parts that make sense in this branch, which has
BIND 8 in the base. This includes the removal of the IP6.INT example
per RFC 4159.
2005-09-10 08:33:27 +00:00
Colin Percival 0b52e87f83 MFC: Correct insecure temporary file usage.
Security:	FreeBSD-SA-05:20.cvsbug
2005-09-07 13:44:06 +00:00
Stephan Uphoff e46db0c9d9 MFC ffs_softdep.c 1.182, softdep.h 1.18
Delay freeing disk space for file system blocks until all
dirty buffers are safely released. This fixes softdep
problems on truncation (deletion) of files with dirty
buffers.
2005-08-31 17:53:53 +00:00
Gregory Neil Shapiro d424f42cd9 MFC: sendmail 8.13.4 and hoststat(8)/purgestat(8) man page linking
Reminder by:    Terry Kennedy
2005-08-28 05:11:56 +00:00
Tor Egge ae2fa59957 MFC: Don't set the COMPLETE flag in an inodedep structure before the
related inode has been written.
2005-08-26 20:40:31 +00:00
Pawel Jakub Dawidek 42cdd86bbd MFC: sys/opencrypto/cryptodev.c 1.26
Fix bogus check. It was possible to panic the kernel by giving 0 length.
This is actually a local DoS, as every user can use /dev/crypto if there
is crypto hardware in the system and cryptodev.ko is loaded (or compiled
into the kernel).

Reported by:	Mike Tancsa <[email protected]>
Tested by:	Mike Tancsa <[email protected]>
Security:	Local DoS on systems with crypto HW and with /dev/crypto available
2005-08-19 20:45:42 +00:00
Murray Stokely a997916162 MFC: Sync with HEAD: fix typos, correct dates, add new freebsd
committer birthdays, add a few new history dates.
2005-08-19 03:38:59 +00:00
Diomidis Spinellis 67754cc9cd Fix make world breakage when MAKE_KERBEROS4 is defined.
Reviewed by:	Scott Allendorf
2005-08-16 23:04:52 +00:00
Tor Egge a3e033d97f MFC: Check for marker pages when scanning inactive page queue. 2005-08-15 17:56:08 +00:00
Diomidis Spinellis 7451acc525 MFC version 1.18
Interpret correctly the glob(3) return value.
Previously, interactive commands specifying a non-existent file or
directory used to display an "out of memory error".
2005-08-05 11:14:25 +00:00
Hajimu UMEMOTO 1ace8fadbb MFC 1.12: don't accept invalid form of an address like 1:2:3:4:5:6:7::8. 2005-07-29 16:27:31 +00:00
Xin LI 8675755e32 MFC 1.123:
Allow PLAY_MSF, PLAY_TRACK, PLAY_TRACK_REL, PAUSE, PLAY_12 commands to pass
through umass(4), in order to make cdcontrol(1) to issue commands to a USB
CD driver.

The command IDs were obtained from the CAM subsystem.  This was tested
on half dozen of USB CD drivers from different vendors.

Suggested by:   "intron" <intron at intron dot ac>
PR:             usb/83439
Reviewed by:    sanpei
2005-07-29 15:42:32 +00:00
Matthew N. Dodd 3816fca08a MFC 1.13
Move initialization above point of first possible reference to
avoid overwriting ty_status values set from the 'type' field.
2005-07-25 20:20:53 +00:00
Jonathan Chen eff178f849 MFC of 1.33: remember to reset nextgrp in getnetgrent(), so that subsequent calls to getnetgrent() doesn't return bogus information.
MFC of 1.34: fix innetgr() returning false positives and negatives when reverse netgroup matching is used.

PR:		35506
2005-07-25 20:05:40 +00:00
Sheldon Hearn a712bbe19a MFC rev 1.34: regen 2005-07-18 07:46:21 +00:00
Xin LI fc7299979b MFC revision 1.13
date: 2005/07/13 10:40:07;  author: delphij;  state: Exp;  lines: +7 -4
Better memory handling:

 - It is acceptable to call free(3) when the given pointer itself
   is NULL, so we do not need to determine NULL before passing
   a pointer to free(3)
 - Handle failure of malloc(3)

Submitted by:	Dan Lukes <dan at obluda cz>
PR:		bin/83352
Approved by:	re (scottl)
2005-07-17 17:29:22 +00:00
Ken Smith e5fd8baf13 MFC v1.2, Add -D_FREEFALL_CONFIG to CFLAGS via Makefile so that just
defining _FREEFALL_CONFIG in /etc/make.conf is all that is required
for the clusterisms to take effect.
2005-07-11 13:25:54 +00:00
Ken Smith 48e7073c83 MFC v1.16, Add -D_FREEFALL_CONFIG to CFLAGS via Makefile so that just
defining _FREEFALL_CONFIG in /etc/make.conf is all that is required
for the clusterisms to take effect.
2005-07-11 13:22:13 +00:00
Xin LI bb10cb5706 MFC 1.47:
Fix a bug when shell expansion is done against dangling symlinks, by
converting the stat() call to a lstat() call, which will cover the
situation.  One can exercise this bug by referring a dangling link with
something like */the-link.

Submitted by:   Simon 'corecode' Schubert [corecode fs ei tum de]
Obtained from:  NetBSD via DragonFlyBSD (NetBSD rev. 1.51 and DragonFly
                rev. 1.6)
2005-07-10 15:17:53 +00:00
Hiroki Sato 835305c772 Document security advisories applicable to 4.11R.
Submitted by:	Daniel Gerzo
PR:		www/82798
2005-07-03 13:43:10 +00:00
Dag-Erling Smørgrav b44ccced4e MFC: (1.75, 1.76) flush the send side rather than shut it down. 2005-07-03 10:40:23 +00:00
Mike Silbersack 77b7808c34 MFC PCI Ids for 5751M and 5789 chips - this brings device support
in line with what 6.x and 5.x have.

Requested by:	Juraj Lutter
2005-07-03 03:41:19 +00:00
Don Lewis 124b549098 Populate /R/ftp/ports explicitly and copy this to /R/cdrom/disc1/ports
instead of attempting the reverse, because the ftp.1 target is executed
before the cdrom.1 target, which is optional.  This has been broken
ever since the order of the targets was swapped and cdrom.1 was made
optional, which happened a very long time ago.
2005-07-02 07:22:12 +00:00
Bruce A. Mah 87f5f1cf40 MFC: SA-05:11.gzip, SA-05:14.bzip2, SA-05:15.tcp. (General security
advisory resync.)
2005-06-30 18:41:55 +00:00
Simon L. B. Nielsen b8833141ed Correct bzip2 denial of service and permission race vulnerabilities.
Obtained from:	Redhat, Steve Grubb via RedHat
Security:	CAN-2005-0953, CAN-2005-1260
Security:	FreeBSD-SA-05:14.bzip2
Approved by:	obrien

Correct TCP connection stall denial-of-service vulnerabilities.

MFC: rev 1.270 of tcp_input.c, rev 1.25 of tcp_seq.h by ps: When a TCP
packets containing a timestamp is received, inadequate checking of
sequence numbers is performed, allowing an attacker to artificially
increase the internal "recent" timestamp for a connection.

A TCP packets with the SYN flag set is accepted for established
connections, allowing an attacker to overwrite certain TCP options.

Security:	CAN-2005-0356, CAN-2005-2068
Security:	FreeBSD-SA-05:15.tcp

Approved by:	cperciva
2005-06-29 21:43:42 +00:00
Paul Saab 5a46cc72f4 Avoid a panic in the swizzle code by checking to see if the parent
of the pci bus is NULL.

Submitted by:	jhb
2005-06-29 15:57:10 +00:00
Paul Saab 6081e3d91f Merge a whole slew of stability fixes from RELENG_5/CURRENT.
- amr should now work reliably on systems with more than 4GB of ram.
- Assign a static slot number to each command instead of doing a
  linear search for free slots each time a command is needed.
- Fixes for the ioctl path.

A good portition of these changes were submitted by
David Sze <dsze at alumni dot uwaterloo dot ca>
2005-06-27 22:21:08 +00:00
Tai-hwa Liang 5805057cfb MFC: (1.154) Fixing a memory leak in xpt_release_device(). 2005-06-27 03:07:08 +00:00
Maxim Konovalov 4af8b08e76 MFC rev. 1.19 sys/kern/uipc_accf.c to sys/kern/uipc_socket.c, bug fixes for:
setsockopt(2) cannot remove accept filter, getsockopt(SO_ACCEPTFILTER)
always returns success on listen socket.
2005-06-26 07:04:23 +00:00
Roman Kurakin 7eb58dcb21 Prepare to close three old PRs.
MFC:
	revision 1.6
	date: 2004/12/28 00:07:56;  author: rik;  state: Exp;  lines: +1 -1
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

PR:	kern/21771, kern/66348, kern/14848
2005-06-25 20:30:43 +00:00
Roman Kurakin 40737abd69 Prepare to close three old PRs.
MFC:
	revision 1.118
	date: 2005/01/07 01:45:34;  author: imp;  state: Exp;  lines: +2 -1
	/* -> /*- for license, minor formatting changes
	----------------------------
	revision 1.117
	date: 2004/12/28 00:07:56;  author: rik;  state: Exp;  lines: +38 -12
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days
	----------------------------
	revision 1.116
	date: 2004/12/14 18:18:54;  author: rik;  state: Exp;  lines: +0 -2
	Kill double inclusion for <netinet/in.h> and <netinet/in_systm.h>.
	----------------------------
	revision 1.111
	date: 2004/06/25 10:25:33;  author: rik;  state: Exp;  lines: +2 -1
	Do not count loobacks as other fuilures.
	As a result magic will not be rejected any more in case of loopback.

	Discussed with:	joerg@
	----------------------------
	revision 1.108
	date: 2004/05/25 21:54:07;  author: rik;  state: Exp;  lines: +2 -2
	Keepalive timer should be added if we does not have any sppp consumers
	before and should be deleted if we do not have any anymore.
	----------------------------
	revision 1.107
	date: 2004/03/14 01:32:44;  author: rwatson;  state: Exp;  lines: +2 -2
	Compare spppq to NULL instead of using spppq as a boolean.

PR:	kern/21771, kern/66348, kern/14848
2005-06-25 12:27:17 +00:00
Roman Kurakin 8786bfafe2 Prepare to close three old PRs.
MFC:
	revision 1.976
	date: 2004/12/28 00:07:56;  author: rik;  state: Exp;  lines: +2 -0
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

PR:	kern/21771, kern/66348, kern/14848
2005-06-25 12:18:34 +00:00
Roman Kurakin 978c5624d6 Prepare to close three old PRs.
MFC:
	revision 1.27
	date: 2005/01/07 01:45:34;  author: imp;  state: Exp;  lines: +2 -1
	/* -> /*- for license, minor formatting changes
	----------------------------
	revision 1.26
	date: 2004/12/28 00:07:56;  author: rik;  state: Exp;  lines: +13 -2
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

PR:	kern/21771, kern/66348, kern/14848
2005-06-25 11:50:33 +00:00
Roman Kurakin 6975fc498f Prepare to close three old PRs.
MFC:
	revision 1.2
	date: 2005/01/07 01:45:35;  author: imp;  state: Exp;  lines: +1 -1
	branches:  1.2.2;
	/* -> /*- for license, minor formatting changes
	----------------------------
	revision 1.1
	date: 2004/12/28 00:07:57;  author: rik;  state: Exp;
	Add FR support to sppp (MFCronyx).

	Silence on: net@, current@, hackers@.
	No objections: joerg

	Requested by: by many (mostly Cronyx) users for a long long time.
	MFC after:	10 days

PR:	kern/21771, kern/66348, kern/14848
2005-06-25 11:36:18 +00:00
Ceri Davies dde2ceb20a Remove an extra 't' that I inexplicably managed to insert during the
last commit.

Pointy hat awarded by:  ru
2005-06-23 22:46:09 +00:00
Ceri Davies 3e149b2f1e MFC revisions 1.17 and 1.18. 2005-06-23 22:33:33 +00:00
Paul Saab 7a66b9008e If a PCI interrupt cannot be routed in the mptable directly, it
tries to swizzle the interrupt and route across the parent bridge
recursively.

Submitted by:	jhb
2005-06-20 21:42:03 +00:00
John Baldwin d23992b1d7 Use the correct types (size_t rather than int) for a couple of variables
passed to kernel_sysctl() to fix an unaligned exception on Alpha.  This
is not an MFC as the code in 5.x is very different.

Reported by:	Eric Millbrandt emillbrandt at coldhaus dot com
2005-06-20 20:47:48 +00:00
Dejan Lesjak 2f869e6dc5 MFC BSD.x11-4.dist rev. 1.27:
Move couple of directories out of mtree and into their respective
ports. This mtree now specifies basic structure of X11BASE, similarly
to BSD.local.dist.
2005-06-16 08:50:41 +00:00
Warner Losh fd0cbb638f (direct commit, since MAKEDEV is gone in HEAD and RELENG_5):
Create the twa devices that communicate with the twa driver.
2005-06-14 23:34:29 +00:00
Wilko Bulte c402604fcf Empty CMOS batteries can cause agony with your AlphaBIOS versus
SRM selection.

Found out the hard way by: gallatin
2005-06-14 17:46:35 +00:00
cvs2svn d546b9943b This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2005-06-14 02:23:16 +00:00
Simon L. B. Nielsen 7f642d5faf Partial MFC of 1.212:
- Add missing manual page links for sysctl_add_oid(9).

The rman(9) parts of 1.212 are not MFC'ed since 4.X does not have
rman(9).

PR:		docs/60088
Submitted by:	le
2005-06-12 16:34:57 +00:00
Kirill Ponomarev 8212e44e8b MFC: main.c:1.5, perform.c:1.12, pkg_version:1.33, version.h:1.4
date: 2005/05/24 08:26:44;  author: cperciva;  state: Exp;  lines: +1 -0
  Add an -I option to pkg_version:

    -I  Use only the index file for determining if a package is out of
        date.  This is much faster than using the version number from a
        port's Makefile, at the expense of potentially giving an incor-
        rect result if the index file is out of date.

  Without this option, the index file is only consulted if "make -V PKGNAME"
  cannot be used.
2005-06-12 08:29:24 +00:00
Colin Percival d9823ccd59 MFr5 revision 1.342.2.30:
Belatedly document the disabling of Hyper-Threading.  Security issues
  are not normally documented in UPDATING on the stable branches, but
  since this is a user-visible change, it needs to be here.

  This is not an MFC since Hyper-Threading is enabled by default in HEAD.

  Pointed out by: Erik Trulsson, via freebsd-stable

  Revision    Changes    Path
  1.342.2.30  +5 -0      src/UPDATING
2005-06-11 00:17:00 +00:00
Scott Long 5746df1e2d Back out the previous revision to unbreak UDP and NFS.
Submitted by: rwatson
2005-06-09 20:06:44 +00:00
Simon L. B. Nielsen 302a8e0bdd Correct directory traversal and race condition vulnerabilities in gzip.
Security:	FreeBSD-SA-05:11.gzip
Security:	CAN-2005-0988, CAN-2005-1228
Obtained from:	Steve Grubb via RedHat, Debian

Approved by:	nectar
2005-06-08 21:29:53 +00:00
Maxim Konovalov cf21c81b60 MFC revs. 1.89 - 1.94: DragonFly 1.2.0, FreeBSD 5.4, MacOS 10.4,
OpenBSD 3.7, FreeBSD 1.1, 1.1.5, 1.1.5.1, 2.0 release dates.
2005-06-08 04:01:16 +00:00
Maxim Konovalov f7c572fb3b MFC rev. 1.68: terminate an endless loop sh -T goes into in dowait()
around waitproc().
2005-06-08 03:49:41 +00:00
Hajimu UMEMOTO cfbc8cf216 MFC 1.57 (partly): The kernel didn't return correctly after the
check of the existence of IPsec policy in SADB_X_SPDDELETE2 via
PF_KEYv2.

PR:		kern/81804
Submitted by:	KAMADA Ken'ichi <kamada _at_ nanohz.org>
2005-06-07 12:19:10 +00:00
John-Mark Gurney 7f4cb81106 MFC: v1.209
make sure that the socket is either accepting connections or is connected
when attaching a knote to it...  otherwise return EINVAL...

Suggested by:	dclark at applmath.scu.edu
2005-06-07 07:12:58 +00:00
Paul Saab 07bdb4ebfd regenerate 2005-06-03 19:14:40 +00:00
Paul Saab 6bc7dcefa9 MFC support for the 5714 2005-06-03 19:14:02 +00:00
Simon L. B. Nielsen 317bbc4866 Make sure the dest_realm buffer is always NUL terminated.
This code is only used when rlogin is compiled with Kerberos 4
support, and since the Kerberos code in rlogin has been removed from
FreeBSD 5.0 and newer, this is not an MFC.

It is not believed that this bug could be exploited as a security
vulnerability.

PR:		bin/80661
Submitted by:	Przemyslaw Frasunek <[email protected]>
Approved by:	cperciva
2005-05-29 15:33:35 +00:00
Archie Cobbs 95dda7c35e MFC: (rev. 1.10) Correct L2TP header offset handling. 2005-05-26 14:59:38 +00:00
Bruce A. Mah 0149a1959f MFC: sed(1) -l. 2005-05-26 14:44:41 +00:00
Sheldon Hearn d3565be21c MFC rev 1.11: release maintainership 2005-05-25 16:32:14 +00:00
Gleb Smirnoff 6924bcd0e5 MFC:
Add option -l, to make output line buffered.

  PR:             bin/78692
  Submitted by:   Eugene Grosbein
2005-05-23 13:27:49 +00:00
Bruce A. Mah 8e44053b6a MFC: SA-05:09.htt. 2005-05-19 14:53:18 +00:00
Tony Ackerman f0d3d352ec Changed to reflect the latest changes in Intel's em version 2.1.7 2005-05-19 00:24:32 +00:00
Tony Ackerman 83c8c88ba0 Changes to bring the driver closer to Intel's em version 2.1.7
- Changed from using explicit devices id to using descriptive labels.
- Added support for 82573 and 82546 Quad adapters.
- Corrected support for 82547EI and 82541ER (mac_type was not assigned)
- Removed #ifdef DBG_STATS and extraneous code.
- Corrected incorrect Packet Buffer assignment for 82541.
- Cleaned up a few typos and style nits.

PR:	None
2005-05-18 23:54:40 +00:00
Tony Ackerman 4c37199ae2 Changes to bring the driver closer to Intel's em version 2.1.7
- Added support for 82573 and 82546 Quad adapters.
- Brought forward Intel's most current mac and phy changes.
2005-05-18 23:52:54 +00:00
Tony Ackerman 33104e59c7 Changes to bring the driver closer to Intel's em version 2.1.7
- Changed from using explicit devices id to using descriptive labels.
- Added support for 82573 and 82546 Quad adapters.
- Corrected support for 82547EI and 82541ER (mac_type was not assigned)
- Removed #ifdef DBG_STATS and extraneous code.
- Corrected incorrect Packet Buffer assignment for 82541.
- Cleaned up a few typos and style nits.

PR:	None
2005-05-18 23:48:42 +00:00
Julian Elischer 95f192f4de Revert a set of MFCs that worked for me but seem to be causing
problems for others. Rest assured you haven't seen the end of these..
As soon as I get back to a test environment I can use for finding the
problem I'm try again.
2005-05-16 09:39:25 +00:00
Joe Marcus Clarke 1f9b8e8b00 MFC rev 1.115:
Add libdata/pkgconfig.  It is used under ${LOCALBASE} as much (if not more)
than under ${X11BASE}.
2005-05-14 19:47:53 +00:00
Jacques Vidrine 2bef1912ee Add a knob for disabling/enabling HTT, "machdep.hyperthreading_allowed".
Default off due to information disclosure on multi-user systems.

Submitted by:	cperciva
Reviewed by:	jhb
2005-05-13 00:10:56 +00:00
Xin LI 83c2030a02 MFC 1.15+1.16: Remove a check about whether sa->sa_len is equal to salen
from getnameinfo(3).  This improves API compatibility with other POSIX
complaint operating systems.

PR:		standards/80008
Requested by:	Xin Liu <[email protected]>
Reviewed by:	freebsd-standards (das)
2005-05-09 13:12:49 +00:00
Colin Percival 423094370c MFC: Fix two issues which were missed in FreeBSD-SA-05:08.kmem.
Reported by:	Uwe Doering
2005-05-08 10:26:42 +00:00
Bruce A. Mah 716918022d MFC: SA-05:06.iir, SA-05:07.ldt, SA-05:08.kmem. 2005-05-06 23:17:22 +00:00
Colin Percival 1ed2dcbbea If we are going to
1. Copy a NULL-terminated string into a fixed-length buffer, and
2. copyout that buffer to userland,
we really ought to
0. Zero the entire buffer
first.

Security: FreeBSD-SA-05:08.kmem
2005-05-06 02:50:00 +00:00
Colin Percival ceb816462c Correctly validate inputs to the i386_get_ldt syscall.
Security: FreeBSD-SA-05:07.ldt
2005-05-06 02:40:18 +00:00
Colin Percival 572c5e54b5 Correct improper permissions on /dev/iir. The earlier permissions
of 0644 allowed for people to do Evil Things via ioctl(2).

Security: FreeBSD-SA-05:06.iir
2005-05-06 02:33:46 +00:00
Hajimu UMEMOTO ac40fbb19e MFS:
- replace use of a spinlock with a mutex.
- enclose getservby{name,port}(3) call with mutex lock.
- protect _hostconf_init_done and _hostconf_init() call with mutex lock.

	lib/libc/net/getaddrinfo.c:	1.41
	lib/libc/net/name6.c:		1.33
	lib/libc/net/getnameinfo.c:	1.14.6.1, 1.14.6.2
2005-05-05 06:07:05 +00:00
Peter Wemm 2e43ef2e35 Check in the freebsd.org cluster modifications to make k5su actually
usable.  In particular:
* disable unix password authentication (ie: do kerberos only)
* install k5su setuid by default
* allow instances for things like ksu to the www account instead
of only doing this for root.
This stuff is only enabled by make.conf switches.
2005-05-04 16:51:57 +00:00
Julian Elischer 0c6d2ae97b Massage uhub.c so that it's more obvious what the differences to -current are.
Do some diff reduction.
Bring in a few small fixes.
2005-05-03 23:40:59 +00:00
Doug Ambrisko 66db63aa59 Backout the Promise SATA support due to some reported hangs. I have
an idea what the problem is but need more testing.

Leave in the Intel PCI Device ID changes.
2005-05-03 15:53:48 +00:00
Paul Saab eed45186dd MFC a part of rev 1.39.
- Fix a bug handling the return value of alloc_bounce_pages at map creation
  time.  It returns the number of pages allocated, not 0 on success.
2005-05-02 20:37:17 +00:00
Bruce A. Mah acdf5813aa MFC: SA-05:04.ifconf, SA-05:05.cvs. 2005-05-01 17:24:00 +00:00
Julian Elischer d9b7b39b16 A bunch more MFCs. import a lot of the new bus management stuff. 2005-04-30 01:48:02 +00:00
David Xu e1304b0f27 MFC Revision 1.73:
> Dont set prefetch etc on VIA chips, causes problems on newer chips and
 > ATAPI devices.
2005-04-29 13:41:51 +00:00
Julian Elischer b742ad63d6 We probe USB1.1. busses late enough to get and use interrupts
so don't ignore them.. it leads to an interrupt storm which freezes
the system.
2005-04-28 23:49:15 +00:00
Julian Elischer eb9bc03c1a MFC a helper routine that will be used in a USB MFC. 2005-04-28 00:14:09 +00:00
Julian Elischer 2a3d068afc MFC Basic drivers from -current
Also bring in the code that probves the non EHCI controllers
after the EHCI controllers, thus ensuring that high speed
devices are not pingponged all aver theplace during startup.
2005-04-26 21:50:14 +00:00
Paul Saab 7683b5cc67 Add support for the Intel ICH6 2005-04-26 21:31:40 +00:00
Julian Elischer cc04d58255 Add missing include. 2005-04-26 20:52:07 +00:00
Jesus R. Camou f7b36fc1d6 MFC: o mention the required byte order in
the ``ip'' man page.

     o put the word ``raw'' somewhere in
       the title of the ``ip'' man page.

PR:		docs/30873
Submitted by:	Douglas De Couto <[email protected]>
Approved by:	trhodes (mentor)
2005-04-26 00:51:19 +00:00
Julian Elischer 75379a2ffa MFC the latest changes to the ehci driver. 2005-04-23 07:19:30 +00:00
Julian Elischer 76fa1e2452 MFC: 1.14
Don't use Bus-dma to allocate a simple buffer that is not used by DMA.
2005-04-22 21:49:39 +00:00
Julian Elischer 3fd13340cb MFC a most of the changes that have occured inthe uaudio driver. 2005-04-22 21:26:13 +00:00
Simon L. B. Nielsen 265f65da85 MFC:
Correct multiple security related errors: a buffer overflow, NULL
pointer dereferences, possible use of uninitialized variables, and
memory leaks.

Security:	CAN-2005-0753
Security:	FreeBSD-SA-05:05.cvs
Approved by:	peter
2005-04-22 18:13:30 +00:00
Remko Lodder 9101a68d57 MFC:
date: 2005/04/10 19:03:48;  author: remko;  state: Exp;  lines: +1 -0
Add myself to the calendar.

MFC after:      1 week
Approved by:    simon (mentor)
2005-04-22 17:28:17 +00:00
Doug Ambrisko b21126911c Add in Promise and Intel SATA support based on FreeBSD 5.X ATAng.
This gets the HW to work but not to deal with SATA errors.  So if
the drive has a read error it will probably lock up.  This is
a small subset of my patches that do deal with these errors and
other issues in FreeBSD and ata-raid.

Sponsored by:	IronPort Systems
2005-04-20 23:51:32 +00:00
Colin Percival b5a1289e33 Zero the ifr.ifr_name buffer in ifconf() in order to avoid
accidental disclosure of kernel memory to userland.

Security:	FreeBSD-SA-05:04.ifconf
2005-04-15 01:52:40 +00:00
Sheldon Hearn 82077eac3c MFC rev 1.33: regen
Approved by:	re (kensmith)
2005-04-12 13:05:41 +00:00
Diomidis Spinellis e10dada865 MFC: Remove wrong -unfilled .Bd argument implied by -literal. 2005-04-12 06:25:01 +00:00
Tai-hwa Liang aff104612b MFC: It's useful to have this tool for dumping $PIR table on i386 machines.
Reviewed by:	bms, sam (mentor)
2005-04-11 12:40:06 +00:00
Diomidis Spinellis 7d90fc3d4a MFC the new pipe sub-namespace. 2005-04-10 07:58:05 +00:00
Diomidis Spinellis c08e6d57dd MFC 1.241-1.242:
- Return POLLHUP rather than POLLIN/POLLOUT on TS_ZOMBIE ttys
- Remove unneeded POLLWRNORM (old bug)
- TS_ZOMBIE ttys will set POLLIN and POLLRDNORM
- Do not call selrecord in TS_ZOMBIE ttys

PR:		kern/73821
2005-04-08 21:43:25 +00:00
Scott Long b7e573dd1d MFC: Close a very small race with command hand-off. Add an extra diagnostic
to the timeout code.
2005-04-07 05:21:53 +00:00
Bruce A. Mah 04d542f8e4 MFC: SA-05:02.sendfile. 2005-04-06 00:43:16 +00:00
Colin Percival 25fc2b4860 MFC revision 1.103.
Security:	FreeBSD-SA-05:02.sendfile
2005-04-04 23:53:36 +00:00
Nate Lawson efb17144ab Use taskqueue_thread instead of swi as the latter doesn't have a context
that we can tsleep on.  This bug is not present in 5.x since we have a
real thread context there.  Suggested by jhb.

Submitted by:	Dinesh Nair (dinesh alphaque.com)
2005-04-02 06:05:30 +00:00
Bruce A. Mah 640a49bb7f MFC: SA-05:01.telnet, getaddrinfo(3) query order. 2005-04-01 05:01:29 +00:00
Colin Percival 8e18f76d87 MFC revision 1.105: If dangerous environment variables are used, check
that libraries being loaded aren't on a noexec-mounted filesystem.
2005-03-31 00:32:37 +00:00
Jacques Vidrine ac70898dec MFC src/contrib/telnet/telnet.c 1.16: Correct buffer overflows in
telnet(1).
Security: CAN-2005-0468, CAN-2005-0469
2005-03-28 15:46:58 +00:00
Kirill Ponomarev cffa6e483d MFC BSD.local.dist revision 1.114 and BSD.x11-4.dist revision 1.26:
date: 2005/03/22 18:29:41;  author: krion;  state: Exp;  lines: +4 -0
  Add mt locale directory, since more and more ports create and use it.
2005-03-25 06:36:09 +00:00
Joe Marcus Clarke f51bc5ec89 MFC: rev 1.61
Change the PATH for pkg_add to be the same used for pointyhat package builds.
This will give our users and porters a more consistent experience between
installing ports and installing packages.
2005-03-21 17:42:03 +00:00
Ruslan Ermilov 2125297d47 MFC 1.25: Fix a problem with multiple-delivery (i.e. broadcast) in ng_bridge. 2005-03-17 05:35:26 +00:00
Gleb Smirnoff 81a15714fb MFC 1.27-28:
Increase level of kernel messages logged to console from debug to warning.
2005-03-16 13:49:54 +00:00
Maxime Henrion b1fd04908b MFC if_fxp.c revision 1.224:
revision 1.224
  date: 2005/02/27 15:12:50;  author: mux;  state: Exp;  lines: +10 -10
  Fix a stupid bogon from myself, sc->revision wasn't initialized when
  testing it to know whether we should enable the 82503 serial mode...
  Move code to the right location and disallow the use of the 82503
  serial mode if the sc->revision field is 0 again.  This makes fxp(4)
  work correctly with ATMEL 350 93C46 cards (3 port 82559 based with a
  82555 PHY), as well as with the older ATMEL 220 93C46 (same flavour)
  and with the even older 10Mbps-only 82557 cards with the 82503 serial
  interface.

  Tested by:      Andre Albsmeier <[email protected]>, krion
2005-03-13 18:59:23 +00:00
Hajimu UMEMOTO b5b0aba51e MFC 1.1.1.3 (partly): NLS catclose() bug avoidance (KAJIMOTO Masato).
PR:		bin/44504
Tested by:	[email protected] (Yoshihiko Sarumaru)
2005-03-08 16:27:41 +00:00
John-Mark Gurney a75de66918 prevent a crash when the watched proc exits... This bug was inadvertantly
fixed in v1.77 on HEAD...

Prodded to investigate:	ps
2005-03-08 03:24:32 +00:00
Alexey Zelkin c05b4d7fcb MFC: rev 1.9; Respect LC_MESSAGES locale category while handling of
NLS catalogs
2005-03-07 14:03:09 +00:00
Joe Marcus Clarke af2e98c855 MFC: rev 1.8
Fix a problem in the Skinny ALG where a specially crafted packet could cause
a libalias application (e.g.  natd, ppp, etc.) to crash.  Note: Skinny support
is not enabled in natd or ppp by default.

Approved by:	nectar (secteam)
Security:	This fixes a remote DoS exploit
2005-03-06 19:59:41 +00:00
Maxime Henrion d7665cbeb8 Sync device IDs with HEAD. 2005-03-06 19:55:19 +00:00
Hideyuki KURASHINA dac0b162ee Add Japanese 4.11-RELEASE hardware notes:
(new) -> 1.2.2.1	  hardware/Makefile
  (new) -> 1.1.2.2	  hardware/Makefile.inc
  (new) -> 1.3.2.2	  hardware/alpha/Makefile
  (new) -> 1.1.2.4 	  hardware/alpha/article.sgml
  (new) -> 1.13.2.46.2.2  hardware/alpha/proc-alpha.sgml
  (new) -> 1.1.2.6	  hardware/common/artheader.sgml
  (new) -> 1.1.2.2	  hardware/common/config.sgml
  (new) -> 1.13.2.95	  hardware/common/dev.sgml
  (new) -> 1.1.2.2	  hardware/common/hw.ent
  (new) -> 1.1.2.2	  hardware/common/intro.sgml
  (new) -> 1.3.2.2	  hardware/i386/Makefile
  (new) -> 1.1.2.5	  hardware/i386/article.sgml
  (new) -> 1.1.2.4	  hardware/i386/proc-i386.sgml

Noticed by:	hrs
Submitted by:	Ryusuke Suzuki <ryusuke at nucl dot sci dot hokudai dot ac dot jp>
Reference:	[doc-jp-work 1086]
2005-03-06 15:46:04 +00:00
cvs2svn 2d9e5af41f This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2005-03-06 14:50:43 +00:00
Ruslan Ermilov 05475752ce MFC: 1.27: Pull up to ETHER_HDR_LEN before passing an mbuf to ether_input(). 2005-03-01 19:44:28 +00:00
Peter Pentchev cb3513e0b8 MFC rev. 1.13: remove the misleading documentation of the unused
'key' argument to mpool_open(3).
2005-02-27 14:06:12 +00:00
Dag-Erling Smørgrav 4298ff1370 MFC: (1.50) stop leaking connection buffers. 2005-02-23 09:52:54 +00:00
Giorgos Keramidas 6ecbb72e9d MFC rc.conf 1.236, periodic.conf 1.33:
Add a note about their respective manpages to rc.conf and periodic.conf
2005-02-22 14:24:13 +00:00
Giorgos Keramidas eb6de503e8 MFC 1.23-1.26:
- Clarify a bit the BUGS section
- Quote example file names consistently
- Various fixes (contractions, grammar, etc)
2005-02-22 14:21:13 +00:00
Gregory Neil Shapiro a92b8a7a3c MFC: Release note entry for sendmail 8.13.3 2005-02-19 17:23:02 +00:00
Gregory Neil Shapiro 9b2ca3821e MFC: Remove file no longer in 8.13.3 2005-02-19 17:21:57 +00:00
Gregory Neil Shapiro e6252dcc13 MFC: sendmail 8.13.3 2005-02-19 17:21:32 +00:00
Ruslan Ermilov 2373a251cb MFC: 1.52: Time out routes created by redirect. 2005-02-14 13:20:30 +00:00
cvs2svn d889acb5e1 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2005-02-14 02:30:02 +00:00
Diomidis Spinellis f656c2b262 MFC 1.8
PR:		bin/76374
Security: Correct hiding of arguments, such as the password, from ps(1)
2005-02-13 15:00:57 +00:00
Maxim Konovalov 6fe836974f MFC rev. 1.34: print a correct status for unix domain sockets, restore
input mode when return from the command one.
2005-02-13 12:55:36 +00:00
Maxim Konovalov 0d42dead7c MFC a bit of rev. 1.50: do not ever try to work with empty routing table.
MFC revs. 1.55 and 1.56: try to guess a buffer size for a fast growing
routing table.
2005-02-13 12:37:29 +00:00
Kirill Ponomarev 3f7c1e5be4 MFC: rev. 1.50
Introduce three new targets for ports collection:
showconfig-recursive, rmconfig-recursive and config-conditional.
2005-02-10 07:04:13 +00:00
Ruslan Ermilov a343694844 Fix disorder caused by a year being off-by-one. 2005-02-07 09:19:16 +00:00
Hiroki Sato 0c1df52ad8 Catch up with rev.1.22.2.419.2.9 in the English version and
fix some translation nits.

Submitted by:   Hiroo Ono (hiroo at oikumene dot gcd dot org)
Reviewed by:    rushani
2005-02-07 01:54:19 +00:00
Ruslan Ermilov 2edd57c5c7 MFC: A manpage for the "eiface" Netgraph node type. 2005-02-03 13:49:18 +00:00
Ruslan Ermilov e5a21b9dea MFC: New ASCII message, "getifname". 2005-02-03 13:46:06 +00:00
cvs2svn 6f3b0e0392 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2005-02-03 11:52:43 +00:00
Hajimu UMEMOTO 26586f4086 MFC 1.54: query A RR before AAAA RR. 2005-02-03 08:03:41 +00:00
Hiroki Sato ecd3387b79 Catch up with the English version:
1.1.2.126 -> 1.1.2.127	errata/article.sgml
2005-02-03 06:35:29 +00:00
Hiroki Sato 4927928f52 Remove a misleading sentence. 2005-02-03 06:33:21 +00:00
Hiroki Sato 1085cdd003 Update &release.*; entities. 2005-02-03 06:30:49 +00:00
Hiroki Sato 11b5630953 Merge the following from the English version:
1.1.2.117	-> 1.1.2.126	errata/article.sgml
	1.1.2.3		-> 1.1.2.4	relnotes/alpha/article.sgml
	1.22.2.388	-> 1.22.2.420	relnotes/common/new.sgml
	1.1.2.4		-> 1.1.2.5	relnotes/i386/article.sgml
2005-02-03 06:26:21 +00:00
Hiroki Sato 25228bfee0 - Simplify entity declarations in the preamble.
- Update copyright year.
- Trim old entries.
2005-02-03 06:22:57 +00:00
Ruslan Ermilov d16cd24e58 MFC: Bitmap of free units. 2005-02-02 16:43:17 +00:00
Ruslan Ermilov 04f389ba9c Further reduce diffs with HEAD:
- In constructor(), don't initialize if_addrhead; if_attach()
  will do it for us.

- In rcvdata(), don't try to emulate m_adj() and just let
  ether_input() do its job.

- Add support for node removal (a-la hardware detach).
2005-02-02 16:07:30 +00:00
Ruslan Ermilov 59e14f0809 MFC:
o ng_eiface.c#1.3
  Allow a changed MAC address to show up in ifconfig by changing
  it in the ifaddr list as well.

o ng_eiface.c#1.10
  Check the correct set of interface flags and fix a memory leak.

o ng_eiface.c#1.12, ng_eiface.h#1.6
  Use the (now standard) Ethernet address parse type.
2005-02-02 14:35:56 +00:00
Ruslan Ermilov 3e62b2da0e Minimize diffs to HEAD (no code changes). 2005-02-02 13:36:09 +00:00
Shunsuke Akiyama f596f5a29c MFC: rev 1.11
Add support for new chips, PL-2303X and PL-2303HX.
Bump document date.
2005-02-01 13:53:39 +00:00
Shunsuke Akiyama 30a8d4173a MFC: rev 1.26
- Add support for new chips, PL-2303X and PL-2303HX.
- Update comment about datasheet.
- Fix minor typo in sysctl variable description.
2005-02-01 13:52:51 +00:00
Hajimu UMEMOTO 7652f8b26a MFC 1.69: correct to look right interface. 2005-02-01 10:48:29 +00:00
Maxim Konovalov 3e56e1ea11 MFC rev. 1.88: FreeBSD 4.11 2005-01-31 18:50:47 +00:00
Ken Smith 711f18cd4c Add 4.11 release date (slightly off but this is what matches the entry
in RELENG_4_11).

Noticed by:	"Morgan Davis" <mdavis at dtl dot net>
2005-01-27 16:43:26 +00:00
Ruslan Ermilov e930c896e6 MFC: libpam is now standard. 2005-01-25 09:39:17 +00:00
Ruslan Ermilov 7c2795b7d8 MFC: Latest mdoc(7) fixes. 2005-01-25 09:36:25 +00:00
Robert Watson fb4cb3f0b6 Temporarily back out ipx.h:1.15.2.1, which introduced a Linux compatibility
u_int to the IPX address structure, which introduced strong alignment
requirements for the structure, which in turn caused problems for MARS.

Reported by:	"Igor B. Bykhalo" <goshik at binep dot ac dot ru>
2005-01-23 12:57:38 +00:00
Shunsuke Akiyama c8004dbdf6 MFC: revision 1.56
Fix USB serial device stalled after tcflush() was called.
2005-01-23 11:42:28 +00:00
Poul-Henning Kamp 3e74d1e2b1 Remove a check that prevents us from purging the queues on shared interrupt
lines.  This has been long gone in -current.

Nailed by:	Mike Tancsa <[email protected]>
2005-01-21 13:44:42 +00:00
Paul Saab 6caa2e8525 MFC rev 1.57: Remove 6422, V100 and add the P600.
Approved by:	re (kensmith)
2005-01-21 05:28:00 +00:00
Peter Wemm 1167a1148e Yet another pass on trying to fix the nfs statfs large-fs blocksize scaler.
Casting the result of the 64 bit division to 32 bits (thus discarding the
upper 32 bits) and then looking at the truncated result to try and figure
out if the untruncated result would fit in 32 bits was utterly useless.

I am still not sure that it is right, but it has a chance of working now.
I'm not at all sure about the sign handling.  NFSv3 only reports positive
values here, but correctness of handling the 63/64 bit signs on nfs
volumes is not a problem we'll likely have to deal with for some time. I
think the "most correct" test is for an unsigned division testing for
exceeding LONG_MAX, since we should never end up with a negative number to
compare against LONG_MIN.
2005-01-21 01:23:25 +00:00
Peter Wemm ed315ed8c7 Partial backport of 64 bit filesystem space code. In spite of the bugs
in the kernel NFS code, df itself was broken.  It tries to re-factor the
statfs blocks / blocksize into whatever the user requested.  Thus, it must
be able to report >2TB file systems correctly, which means it must deal
with 64 bit block counts.
2005-01-21 01:09:04 +00:00
Peter Pentchev b82fa1e083 Unbreak the build when Kerberos IV is *not* built - add libkafs5 to
the krb4 dependencies.

Approved by:	rwatson
2005-01-20 08:41:52 +00:00
Jeffrey Hsu 3d9b68cde4 Merge copyright changes from -current.
Approved by:	re (Ken Smith).
2005-01-19 21:19:41 +00:00
Ken Smith 0801903ffb MFC revision 1.105:
date: 2002/09/07 04:59:49;  author: peter;  state: Exp;  lines: +1 -0
  Supposedly linux has added a 6th syscall arg register (%ebp).  I am not
  100% sure if this is enough, but it will not harm anything.

This appears to fix some breakage with the emulation of linux's mmap2().
When that function became available recently the linux executables started
using it which broke installing the emulators/linux_base-8 port.

Pointer from:	akiyama
MFS after:	1 day
2005-01-18 22:11:12 +00:00
Yaroslav Tykhiy d184ab77fe MFC 1.201: Use syslog(3) instead of err(3) when a daemon.
A daemon has no stderr to send its complains to.
2005-01-18 21:56:30 +00:00
Joerg Wunsch 8b42201cf9 MFC: (rev 1.84) document the actual behaviour for displaying the `Total'
line.
2005-01-18 10:53:10 +00:00
Robert Watson b9bcee4859 Do build hprop(8) by default, as we already build hpropd(8) by default. 2005-01-17 17:36:12 +00:00
Robert Watson a73cac65a0 When building hprop, add ${KRB5DIR}/lib to the include path, as the
mit_dump.c expects to be able to include krb5/admin.h.
2005-01-17 17:35:38 +00:00
Scott Long de34f506e8 Add tap(4) to LINT
PR: kern/44260
Submitted by: Matthias Andree
2005-01-17 09:37:27 +00:00
Garrett Wollman b3034f2177 MFC IERS Bulletin C 29
Obtained from:	International Earth Rotation Service
2005-01-15 21:56:17 +00:00
David Malone 881887ac92 MFC: 1.104 of tcp_usrreq.c
when IN6P_AUTOFLOWLABEL is set, set the flowlabel on outgoing tcp
connections.
2005-01-15 15:58:17 +00:00
David Malone 66779db452 MFC of 1.61, 1.62 of tcp_syncache.c and 1.107 tcp_var.h.
The tcp syncache code was leaving the IPv6 flowlabel uninitialised
for the SYN|ACK packet and then letting in6_pcbconnect set the
flowlabel later. Arange for the syncache/syncookie code to set and
recall the flow label so that the flowlabel used for the SYN|ACK
is consistent. This is done by using some of the cookie (when tcp
cookies are enabeled) and by stashing the flowlabel in syncache.
2005-01-15 15:55:59 +00:00
Diomidis Spinellis 5e07d07a5a Correct the pbio include file location.
Noticed by:	ru
Reviewed by:	ru
2005-01-14 14:21:06 +00:00
Christian Brueffer 68e129a8d3 MFC: rev. 1.10
- list the Hama USB RS-232 Serial Adapter as supported
- bump .Dd
2005-01-14 12:27:26 +00:00
Ruslan Ermilov 80263571fb MFC: Sync with HEAD. 2005-01-14 09:55:41 +00:00
SUZUKI Shinsuke ae3a8ecbba MFC Rev. 1.71
fixed an unexpected addr/port matching failure in IPv6 SA management

PR:		kern/72393
2005-01-13 22:30:16 +00:00
Eric Anholt d7ebb07ca9 Remove and recreate with correct permissions/owner three additional X socket
directories.

Submitted by:	lesi
2005-01-13 21:50:14 +00:00
Scott Long b71645face Teach libdisk about the ipsd devices. Note: I don't like to editorilize in
commits, but libdisk is just plain lame.  Being required to teach it about
each disk device name is part of the magic folklore that is just plain
wrong.  This is one of the many many many reasons why libdisk & sysinstall
need to be thrown away and rebuilt from scratch.  No amount of tweaking
and fixing them will make them better.
2005-01-13 17:55:24 +00:00
Diomidis Spinellis b6af7ee1d2 MFC 1.16 (plug memory leak)
PR:		bin/75656
2005-01-13 08:41:36 +00:00
Hidetoshi Shimokawa f6a3a3d70d MFC rev. 1.50:
Clear PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN for broken hardware.
2005-01-13 07:16:20 +00:00
Scott Long 52ddd62ff1 Add the ips.4 manual page. Add minor tweaks. 2005-01-13 01:01:10 +00:00
Scott Long e94b0bf53a Put the ips driver on disk2 of the install floppies. 2005-01-13 00:55:55 +00:00
Scott Long 004bd07ee0 Allow sysinstall to see ips devices. 2005-01-13 00:54:40 +00:00
Scott Long 8f61c29eb5 Add the ips and ipsd device nodes. 2005-01-13 00:53:17 +00:00
Scott Long 1ef30832eb Add the ips driver to GENERIC and LINT. 2005-01-13 00:50:47 +00:00
Scott Long 9c85ebd9f5 Add the kernel compile glue for the ips driver. 2005-01-13 00:48:31 +00:00
Scott Long 50db01c949 Hook the ips module up. 2005-01-13 00:47:50 +00:00
Scott Long 568b459d6d Add the ips module. 2005-01-13 00:47:33 +00:00
Scott Long d29d754d65 At long last, MFC the IBM ServeRAID driver. This is a backport of the
sources from HEAD, as opposed to a forward port of the original IBM 4.x
sources.  As such, it benefits from the many reliability improvements
that have happened to the driver in HEAD.  This is a RELENG_4_11 candidate.
2005-01-13 00:46:40 +00:00
Scott Long 982b7f9882 Add the ipsd major number. 2005-01-13 00:37:02 +00:00
Ceri Davies 92d68b0145 MFC r1.17:
Add a usb category for USB PRs.

Approved by:	re (kensmith)
2005-01-12 20:07:19 +00:00
Ken Smith e5005e050d Add a period to the end of a sentence, and bump document date.
Pointy hat:	kensmith
2005-01-12 17:24:22 +00:00
Ken Smith 59cac3bcac Regen from syscalls.master v1.30.2.9. 2005-01-12 16:36:50 +00:00
Ken Smith c2e9e58b60 This is a partial MFC of the current RELENG_5 Linux emulation, which
became necessary due to the plans for using linux_base-8 for the 4.11
release.  Among other things running "/compat/linux/bin/ls -l" dumped
core because it tried to use completely non-existent system calls.  We
don't actually implement the system calls it's trying to use but we at
least need to have something in place that returns an error code.

Things being added:

  - wrapper for mmap2(2) from
        sys/compat/linux/linux_machdep.c v1.31
        sys/compat/linux/linux_dummy.c v1.35
  - add dummy entries for fadvise64(2) and *xattr(2) family of syscalls from
        sys/compat/linux/linux_dummy.c v1.37
  - add ENOATTR error code because that is what the *xattr(2) family of
    syscalls returns, which in turn required tweaking the error code
    translation table in the NFS server code[1].
  - add $FreeBSD$ token to lib/libc/gen/errlst.c so it passes pre-commit
    check script...

[1] Noticed by rwatson.

Requested by:	nectar
Reviewed by:	nectar, sobomax, re@
Tested by:	nectar, ceri
MFS after:	2 days
2005-01-12 16:34:54 +00:00
Maxime Henrion 4b068b7114 Merge if_fxp.c:1.221 from HEAD to RELENG_5:
date: 2005/01/04 19:30:14;  author: mux;  state: Exp;  lines: +1 -1
  Allow fxp(4) cards with a revision id of 0 to use the 82503 serial
  interface as well.  This is not an expected revision id per the
  datasheet, but unfortunately there are such cards out there with
  a 82557 chipset, and they want to use the 82503.

  PR:             kern/75739
  Reported by:    Andre Albsmeier <[email protected]>
2005-01-12 13:27:29 +00:00
Christian Brueffer 7b579ecc74 MFC: rev. 1.17
- add new supported chips: 82541ER and 82546GB
- change .Nd to look better (no need to mention FreeBSD there)
- bump .Dd
2005-01-12 11:21:47 +00:00
Christian Brueffer 90bbe170cb MFC: rev. 1.30
- some SATA controllers were erroneously marked as SCSI, correct that
- move those controllers into the right place
- mention that the driver supports SATA
- bump .Dd
2005-01-12 11:21:10 +00:00
Christian Brueffer ed21603e68 MFC:
- add vendor names for the MegaRAID cards, since LSI aquired
  the AMI storage devision some time ago
- bump .Dd
2005-01-12 11:20:00 +00:00
Ken Smith e3128815a1 Sync list of ftp sites with current reality. 2005-01-12 03:56:05 +00:00
Ken Smith 796ca75f44 MFC of an off-by-one fix sos made to HEAD in v1.96 of ata-chipset.c and
v1.50 of ata-lowlevel.c.  From his log message:

  Log:
  Compensate for off by one bugs in disk firmware for 48BIT addressing cutover.

Requested by:	marck
Glanced at by:	sos
MFC after:	2 days
2005-01-11 18:25:01 +00:00
Ken Smith 0a5e413878 More disc1 package set adjustments. With the shift to linux_base-8 we
got to the point there wasn't enough space to put much more than the
basic gnome2-lite/kde-lite packages on disc1 which was painful.  So
for 4.11 we're going to make a disc1-gnome and disc1-kde which allows
us to put back a bunch of packages that have been slowly stripped out
of disc1 due to size issues.  Set the environment variable PKG_WINDOW
to select which base windowing system to include, default is gnome.

MFC after: 2 days
2005-01-11 05:07:44 +00:00
Ian Dowse 25ed983af9 MFC: 1.6; When searching for a suitable block of memory on the free
list, skip blocks that are too big by a factor of two or greater.
This avoids some cases of extremely inefficient memory use that can
occur when large (e.g. 64k) blocks on the free list get used when
allocating a 4k chunk of 64-byte fragments. Because fragments have
their own free list, the 60k difference got lost forever every time.
2005-01-11 01:19:43 +00:00
Julian Elischer f085049624 MFC:
Replace the static "qdat" structure with a per-instance softc field
  in all USB ethernet drivers. The qdat structure contains a pointer
  to the interface's struct ifnet and is used to process incoming
  packets, so simultaneous use of two similar devices caused crashes
  and confusion.

PR: kern/59290
2005-01-10 23:01:35 +00:00
Alexey Zelkin 19949e7d34 MFC: rev 1.40, fix redraw of checklist box while specifiyng manual dialog
size
2005-01-10 18:17:22 +00:00
Wilko Bulte 84d8785e65 MFC:
Document slot specific location for base I/O board on AS600.

Thanks to: Charles Smeijer for getting me my AS600.
2005-01-07 21:11:08 +00:00
Wilko Bulte 99092ca1ff MFC:
Note that fdisk is not used on Alpha.
Remove outdated info on install media.

Submitted by: "William H. Magill" <[email protected]>
2005-01-07 19:45:06 +00:00
Guido van Rooij cfd2ab27b8 MFC: 1.6 (link ipnat.conf manpage)
Requested by: Hideyuki KURASHINA <[email protected]>
2005-01-07 09:18:31 +00:00
Julian Elischer b5505c5064 Remove disparaging comment. 2005-01-07 06:35:06 +00:00
Vinod Kashyap 7029cef6c0 MFC of recent changes related to the 9.1.5.2 release of twa on the 3ware website.
Reviewed by: re
Approved by: re
MFC after: 1 day
2005-01-07 01:00:46 +00:00
Maxim Konovalov b9a32fb9fa o Indent (from rev. 1.59). 2005-01-05 09:19:33 +00:00
Maxim Konovalov 3cb00801c8 o MFC a part of rev. 1.59: do not ever try to write a sparse files with
-z (compress the core dump and kernel) flag.

PR:		bin/36136
Submitted by:	Dorr H. Clark, Dmitry Frolov
2005-01-05 09:14:34 +00:00
Mike Silbersack 01e59d4dee MFC revs 1.235 and 1.264;
Improve the security of RST handling, and add a sysctl which can fall
back to the old method.
2005-01-05 08:45:43 +00:00
Kirill Ponomarev e162c760ec MFC: Remove trailing spaces. 2005-01-05 08:38:32 +00:00
Julian Elischer 8a0dbc818b Fix a comment. 2005-01-05 00:48:55 +00:00
Marius Strobl 7028a338a2 Fix a mis-merge in the MFC of rev. 1.64 in rev. 1.3.2.3; the following
change wasn't included:
- Set the CAM status to CAM_SCSI_STATUS_ERROR rather than CAM_REQ_CMP
  in case of a CHECK CONDITION.

Noticed by:	Uwe Doering <[email protected]>
2005-01-03 18:38:57 +00:00
Josef El-Rayes fae19d5cc7 MFC fixes to string modification code.
Approved by:	re
Discussed on:	re, secteam
2005-01-03 15:00:55 +00:00
Robert Watson a547ce8244 Merge ipx.h:1.18 from HEAD to RELENG_4:
date: 2004/06/22 21:46:49;  author: bms;  state: Exp;  lines: +3 -0
  Improve source-code compatibility with Linux applications using the
  IPX stack.

  PR:             kern/65217
  Submitted by:   Radim Kolar
2005-01-02 13:00:51 +00:00
Kirill Ponomarev a8f7886c9e MFC: rev 1.24
date: 2004/12/30 13:09:34;  author: krion;  state: Exp;  lines: +3 -1
    Add LOG_NTP facility.

    Submitted by:   Kurt Jaeger <pi at complx dot LF dot net>
    Approved by:    ru
    MFC after:      3 days
2005-01-02 08:53:09 +00:00
Ken Smith 58fa08508a emulators/linux_base -> emulators/linux_base-8 per kris@. 2005-01-02 08:32:57 +00:00
Doug White b0846317e4 MFC: Fix locking/better IFF_OACTIVE handling (by jmg). Correct detected RAM
sizing for 88E8001 parts.  Fix off-by-one in VPD data read.  Correct handling
of jumbo frames for Yukon based devices.

PR:		kern/75460
Committed on behalf of: bz
2005-01-02 05:27:59 +00:00
Mike Silbersack cf12f9ab09 MFC of port randomization rate-based disabling:
in_pcb.c rev 1.157
in_pcb.h rev 1.79
ip_input.c rev 1.293
ip_var.h rev 1.93

Approved by:	re
2005-01-02 01:53:44 +00:00
Christian Brueffer abcf3ccf0a MFC: rev. 1.25
- call the driver 'bktr' instead of 'brooktree' throughout the document
- add a HARDWARE section
- add a more descriptive NAME section
- update for recently imported Pinnacle PCTV support
- add Branko Lankester, the original author of the PCTV patches,
  to the AUTHORS section
- bump .Dd
2005-01-01 14:39:41 +00:00
Julian Elischer 5d4d00597a MFC:
Fix a bug where an aborted command was removed from the
queue but not from the hardware's cache of it, leading to the
hardware DMAing into "freed" memory buffers.  (leading to crashes when
a usb ransaction was timed, but but eventually happenned)
2005-01-01 10:39:36 +00:00
Maxim Sobolev 297973c870 Complete 2005 transition.
Happy New Year! :-)
2005-01-01 07:29:20 +00:00
Warner Losh 81e26f4690 MFC: 2005
Approved by: re@ (kensmith)
2004-12-31 19:16:33 +00:00
Peter Pentchev 06018667aa Fix the build: gcc 2.95 with -ansi does not like C++ // comments. 2004-12-31 12:25:54 +00:00
Ken Smith 5edfe29d85 MFC of rev 1.329 of vm_object.c:
date: 2004/07/28 18:23:08;  author: alc;  state: Exp;  lines: +2 -2
  Correct a very old error in both vm_object_madvise() (originating in
  vm/vm_object.c revision 1.88) and vm_object_sync() (originating in
  vm/vm_map.c revision 1.36): When descending a chain of backing objects,
  both use the wrong object's backing offset.  Consequently, both may
  operate on the wrong pages.

  Quoting Matt, "This could be responsible for all of the sporatic madvise
  oddness that has been reported over the years."

  Reviewed by:    Matt Dillon

Reviewed by:	alc
Helped by:	DFly vm_map.c rev 1.31, vm_object.c rev 1.17
2004-12-31 11:12:18 +00:00
Julian Elischer 20d66878df MFC:
Formatting changes and a small correction when count of companions is wrong.
Diff reduction.
2004-12-31 08:45:18 +00:00
Julian Elischer b9194a374e MFC:
Slightly reorganise part of the ohci_softintr() function
to better keep track of the total amoutn transferred during a
transfer. Seems similar to some code in the NetBSD version.
I notice they have incorporated matches from him so I don't know which
direction it went.

Submitted by:   [email protected]
Obtained from:  patches to make the ueagle driver work
2004-12-31 08:40:04 +00:00
Julian Elischer 72785df59a MFC:
Allow /sys/dev/bktr to support Pinnacle PCTV Rave cards

PR:             73669
Submitted by:   arne_woerner at yahoo dot com
2004-12-31 08:33:52 +00:00
Julian Elischer 24270727e5 MFC of some whitespace chenges.
The change in current had a real bugfix but when I merged it in to 4.x
it disappeared and only the formatting changes remained..
Oh well it's a diff reduction..
2004-12-31 08:15:19 +00:00
Julian Elischer fd31cd3345 MFC: Add support for USB Microsoft Intellimouse
Submitted by:   Matt Wright <[email protected]>
2004-12-31 07:32:13 +00:00
Tony Ackerman da522905cf Corrected a workaround that should only be applied to one adapter. Workaround
was causing device hangs when incorrectly applied to other adapters.

PR:		kern/66634
2004-12-31 00:15:36 +00:00
Tony Ackerman 168c2a2543 Added device id support for Intel 82541ER and 82546GB dual port PCIE adapter.
PR:	None
2004-12-30 22:36:54 +00:00
Julian Elischer 39332a707d Merge a fix from Dragonfly:
to quote Matt:
Fix a very serious bug in contigmalloc() which we inherited from FreeBSD-4.x.
The contigmalloc() code incorrectly assumes that a page in PQ_CACHE can
be reused without having to do any further checks and it unconditionally
busies and frees such pages, and assumes that the page becomes PQ_FREE even
though it might actually have gone to a PQ_HOLD state.  Additionally the
contigmalloc() code unconditionally sets m->object to NULL, ignoring the
fact that the page will be in the VM page bucket hash table if object
happens to not be NULL, leading to page bucket hash table corruption.

The fix is two fold.  First, we add checks for m->busy, (m->flags & PG_BUSY),
m->wire_count, and m->hold_count and do not reuse a page with any of those
set.  We do this for all pages, not just PQ_CACHE pages, though it is
believed that it only needs to be done for PQ_CACHE pages.  Second, we
replace the m->object = NULL assignment with an assertion that it is
already NULL, since it had better be NULL and we cannot just set it to NULL
unconditionally without blowing up the VM page hash table.

Symptoms of the bug include:

    * Filesystem corruption, in particular with slower disk drivers (e.g.
      like the 'twe' driver), or in systems with drivers which use
      contigmalloc() a lot (e.g. require bounce buffers).

      Mangled directory entries, bad indirect blocks (containing data instead
      of indirect block pointers), and files containing other file's data.

    * 'page not found in hash' panic.

This is the last major VM issue in DragonFly, one that has plagued in
particular David Rhodus (who is a heavy user of the 'twe' driver) for over
a year.  I would never have found this bug if not for DR's persistence and
the dozens of kernel cores he was able to provide me over the last year.  We
finally got a core with a 'smoking gun', after having written a program
(/usr/src/test/debug/vmpageinfo.c) to run through all the VM pages and check
their hash table association for correctness it became obvious that pages
were being reused without being removed from the hash table which finally
led to contigmalloc*().

Many thanks to: David Rhodus!  Free gift enclosed!
2004-12-30 22:24:43 +00:00
Christian Brueffer cd620ce8d8 MFC: rev. 1.7
Fix typos.
2004-12-30 02:54:27 +00:00
Christian Brueffer 11b9d974bf MFC: rev. 1.6 + 1.7
The ixgb(4) driver actually first appeared in 5.3 and the upcomming 4.11.
2004-12-29 16:37:19 +00:00
Maxim Sobolev 5fe5b02ecb MFC: add missed mpt(4) manpage. 2004-12-29 15:57:30 +00:00
Maxim Sobolev f9453f732f MFC: add support for FC929X. 2004-12-29 15:49:18 +00:00
Maxime Henrion 69c9ec81e3 Merge if_fxp.c:1.220 from HEAD to RELENG_4:
date: 2004/12/20 10:18:21;  author: mux;  state: Exp;  lines: +2 -2
  Only try to use the 82503 serial interface for the 82557 chipsets.  The
  datasheet says it is only valid for such chipsets and shouldn't be used
  with others.  This fixes some 82559 based cards which otherwise only
  work at 10Mbit.

  MFC after:      5 days
  Tested by:      krion
2004-12-28 22:49:24 +00:00
Maxim Konovalov f89659a324 MFC rev. 1.19: allocate an additional white space in a username column. 2004-12-27 13:22:37 +00:00
Maxim Konovalov d849b2f8ce MFC rev. 1.9: no macros for sigemptyset(3) and friends,
sigismember(3) could return -1.
2004-12-27 13:18:19 +00:00
Maxim Konovalov ddb449118a MFC rev. 1.94: add a missed "." . 2004-12-27 13:11:02 +00:00
Maxim Konovalov 27281cd4ec MFC rev. 1.27 dump.h and rev. 1.16 itime.c: do not dump core
in -W if dumpdates was not readable and ddatev == NULL; remove
unused ddates_in.
2004-12-27 12:53:30 +00:00
Maxim Konovalov b5bbb63d0d MFC revs.1.81 - 1.87: FreeBSD 4.10-RELEASE, DragonFly BSD 1.0, 6.0-CURRENT,
FreeBSD 5.3, OpenBSD 3.6, NetBSD 2.0, "FreeBSD Design and Impl." book
description.
2004-12-27 12:23:28 +00:00
Wilko Bulte d5fcd3e2bd Make LCA entry consistent with the other ones. 2004-12-27 11:28:14 +00:00
Wilko Bulte 9e65f0866f Add Alpha CPU types 10-15. 2004-12-27 11:17:39 +00:00
Wilko Bulte 37c120575b move em(4) to MI section 2004-12-24 14:02:24 +00:00
Alexey Zelkin c824ab02d9 Fix longstanding typo
PR:	misc/50370
2004-12-24 08:00:30 +00:00
Mike Silbersack 15c54e979b MFC rev 1.259; accept RSTs when our window is closed. 2004-12-23 22:07:19 +00:00
Julian Elischer 6f3875497d MFC:
Small formatting change to allow ctags to parse the file successfully.
2004-12-23 21:38:07 +00:00
Wilko Bulte b2aa261ed5 move if_em from MD to MI
approval nodded by: scottl, ru
2004-12-23 18:50:58 +00:00
Christian Brueffer 472f85bd34 MFC: rev. 1.33
Nuke ports-picobsd, it was thrown out a while ago.
2004-12-22 17:23:44 +00:00
Yaroslav Tykhiy 40ae0ea23e MFC 1.37, 1.40: Document S_* macros and more struct stat fields.
Requested by:	roam
2004-12-22 09:43:19 +00:00
Ken Smith 5acc183353 Adjust the package set on disc1 so it fits as of 4.11RC1. 2004-12-22 06:21:31 +00:00
Ken Smith 9c1b8cd053 MFC rev 1.103:
date: 2004/11/03 18:26:06;  author: kensmith;  state: Exp;  lines: +7 -0
  Update the list of package names/descriptions.

MFC after:	3 days
2004-12-22 04:45:49 +00:00
Yaroslav Tykhiy 4e99bea24b MFC 1.198:
Never emit a message to stderr: use syslog instead.
When in inetd mode, this prevents bogus messages from
appearing on the control channel.  When running as a
daemon, we shouldn't write to the terminal we used to
have at all.
2004-12-21 12:44:00 +00:00
Christian Brueffer bc0f34fe75 MFC: rev. 1.11
Properly capitalize FireWire
2004-12-20 21:43:57 +00:00
Christian Brueffer 186ee3334b MFC: rev. 1.6
- remove nonexistant "device fwohci"
- sort SYNOPSIS devices
- capitalize Ethernet
- bump .Dd
2004-12-20 21:43:18 +00:00
Christian Brueffer 45f716af41 MFC: rev. 1.4
Assorted markup, spelling, and grammar fixes.
2004-12-20 21:42:37 +00:00
Christian Brueffer 53ef57b5d5 MFC: rev. 1.5
Assorted markup, spelling, and grammar fixes.
2004-12-20 21:41:35 +00:00
Christian Brueffer 3592bc55ea MFC: rev. 1.14 - 1.16
- Properly capitalize Gigabit Ethernet.
- First update for the 5721/5750/5751 chips.
2004-12-20 20:06:26 +00:00
Paul Saab 4d878a0ee5 MFC: 5721 Support
Approved by:	re
2004-12-20 18:58:15 +00:00
Ruslan Ermilov 2f91dfe89e MFC: Sync. 2004-12-20 10:13:13 +00:00
Kirill Ponomarev 7a609a120b MFC: rev 1.48
Introduce new variables FETCHINDEX, MASTER_SITE_INDEX and add
description for MASTER_SITE_BACKUP.
2004-12-20 08:09:58 +00:00
Christian Brueffer e85c0aa544 MFC: rev. 1.6
Remove clauses 3 and 4 of the license.
2004-12-19 10:36:12 +00:00
Ken Smith d784ed8488 Uncomment entries under the "not found in doc-common" section.
Thanks to:	jkoshy
Requested by:	ru
2004-12-19 05:02:05 +00:00
733 changed files with 125692 additions and 41448 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
Copyright (C) 1992-2005 The FreeBSD Project. All rights reserved.
Copyright (C) 1992-2007 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+1 -1
View File
@@ -554,7 +554,7 @@ update:
@echo "--------------------------------------------------------------"
@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
@echo "--------------------------------------------------------------"
cd ${.CURDIR}; cvs -R -q update -rRELENG_4_11 -P -d
cd ${.CURDIR}; cvs -R -q update -rRELENG_4 -P -d
.endif
#
+17 -1
View File
@@ -8,6 +8,22 @@ A reverse chronology since 4.0 was released is included, followed by
the common items quick how-tos, followed by entries for versions of
-current prior to 4.0 Release.
20070426:
The ABI breakage in sendmail(8)'s libmilter has been repaired
so it is no longer necessary to recompile mail filters (aka,
milters). If you recompiled mail filters after the 20070411
note, it is not necessary to recompile them again.
20070411:
sendmail(8) has been updated to version 8.14.1. Mail filters
(aka, milters) compiled against the libmilter included in the
base operating system should be recompiled.
20050513:
Intel Hyper-Threading is now disabled by default due to a
security issue, but can be re-enabled by setting the
machdep.hyperthreading_allowed tunable in /boot/loader.conf.
20050124:
FreeBSD 4.11-RELEASE.
@@ -854,7 +870,7 @@ versions of -stable/-current.
Changes to the pccardd kernel interface require that you recompile
pccardd for new kernel.
19980725:
19990725:
The ipfw interface to the kernel has changed. You will need to
recompile ipfw programs for the new kernel.
+2
View File
@@ -130,6 +130,8 @@
/* we want to use the system malloc when we install as /bin/csh */
#define SYSMALLOC
#define BSD_STYLE_COLORLS
/* Use LC_MESSAGES locale category to open the message catalog */
#define MCLoadBySet NL_CAT_LOCALE
#endif
#if defined(__bsdi__)
+22 -15
View File
@@ -112,7 +112,7 @@ unit_t unitp [] = { NONE, KILO, MEGA, GIGA, TERA, PETA };
int bread(off_t, void *, int);
int checkvfsname(const char *, char **);
char *getmntpt(char *);
int longwidth(long);
int int64width(int64_t);
char *makenetvfslist(void);
char **makevfslist(char *);
void prthuman(struct statfs *, long);
@@ -376,9 +376,15 @@ prthumanval(double bytes)
* Convert statfs returned filesystem size into BLOCKSIZE units.
* Attempts to avoid overflow for large filesystems.
*/
#define fsbtoblk(num, fsbs, bs) \
(((fsbs) != 0 && (fsbs) < (bs)) ? \
(num) / ((bs) / (fsbs)) : (num) * ((fsbs) / (bs)))
static int64_t
fsbtoblk(int64_t num, uint64_t fsbs, u_long bs)
{
if (fsbs != 0 && fsbs < bs)
return (num / (int64_t)(bs / fsbs));
else
return (num * (int64_t)(fsbs / bs));
}
/*
* Print out status about a filesystem.
@@ -420,11 +426,12 @@ prtstat(struct statfs *sfsp, struct maxwidths *mwp)
if (hflag) {
prthuman(sfsp, used);
} else {
(void)printf(" %*ld %*ld %*ld", mwp->total,
fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize),
mwp->used, fsbtoblk(used, sfsp->f_bsize, blocksize),
mwp->avail, fsbtoblk(sfsp->f_bavail, sfsp->f_bsize,
blocksize));
(void)printf(" %*lld %*lld %*lld", mwp->total,
(long long)fsbtoblk(sfsp->f_blocks, sfsp->f_bsize,
blocksize), mwp->used,
(long long)fsbtoblk(used, sfsp->f_bsize, blocksize),
mwp->avail, (long long)fsbtoblk(sfsp->f_bavail,
sfsp->f_bsize, blocksize));
}
(void)printf(" %5.0f%%",
availblks == 0 ? 100.0 : (double)used / (double)availblks * 100.0);
@@ -453,20 +460,20 @@ update_maxwidths(struct maxwidths *mwp, struct statfs *sfsp)
getbsize(&dummy, &blocksize);
mwp->mntfrom = imax(mwp->mntfrom, strlen(sfsp->f_mntfromname));
mwp->total = imax(mwp->total, longwidth(fsbtoblk(sfsp->f_blocks,
mwp->total = imax(mwp->total, int64width(fsbtoblk(sfsp->f_blocks,
sfsp->f_bsize, blocksize)));
mwp->used = imax(mwp->used, longwidth(fsbtoblk(sfsp->f_blocks -
mwp->used = imax(mwp->used, int64width(fsbtoblk(sfsp->f_blocks -
sfsp->f_bfree, sfsp->f_bsize, blocksize)));
mwp->avail = imax(mwp->avail, longwidth(fsbtoblk(sfsp->f_bavail,
mwp->avail = imax(mwp->avail, int64width(fsbtoblk(sfsp->f_bavail,
sfsp->f_bsize, blocksize)));
mwp->iused = imax(mwp->iused, longwidth(sfsp->f_files -
mwp->iused = imax(mwp->iused, int64width(sfsp->f_files -
sfsp->f_ffree));
mwp->ifree = imax(mwp->ifree, longwidth(sfsp->f_ffree));
mwp->ifree = imax(mwp->ifree, int64width(sfsp->f_ffree));
}
/* Return the width in characters of the specified long. */
int
longwidth(long val)
int64width(int64_t val)
{
int len;
+5 -3
View File
@@ -35,7 +35,7 @@
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
.\" $FreeBSD$
.\"
.Dd July 8, 2002
.Dd January 11, 2005
.Dt LS 1
.Os
.Sh NAME
@@ -188,7 +188,9 @@ This option overrides the environment variable
.Dq ell . )
List in long format.
(See below.)
If the output is to a terminal, a total sum for all the file
A total sum (in blocks, see the
.Fl s
option for the block size unit) for all the file
sizes is output on a line before the long listing.
.It Fl m
Stream output format; list files across the page, separated by commas.
@@ -216,7 +218,7 @@ lexicographical order or the oldest entries first.
.It Fl s
Display the number of file system blocks actually used by each file, in units
of 512 bytes, where partial units are rounded up to the next integer value.
If the output is to a terminal, a total sum for all the file
A total sum for all the file
sizes is output on a line before the listing.
The environment variable
.Ev BLOCKSIZE
-2
View File
@@ -2,8 +2,6 @@
# $FreeBSD$
PROG= rm
WARNS?= 2
SRCS= rm.c
LINKS= ${BINDIR}/rm ${BINDIR}/unlink
MLINKS= rm.1 unlink.1
+37 -26
View File
@@ -1,3 +1,4 @@
.\"-
.\" Copyright (c) 1990, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -12,10 +13,6 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
@@ -35,7 +32,7 @@
.\" @(#)rm.1 8.5 (Berkeley) 12/5/94
.\" $FreeBSD$
.\"
.Dd January 28, 1999
.Dd September 29, 2005
.Dt RM 1
.Os
.Sh NAME
@@ -44,7 +41,8 @@
.Nd remove directory entries
.Sh SYNOPSIS
.Nm
.Op Fl dfiPRrvW
.Op Fl f | i
.Op Fl dIPRrvW
.Ar
.Nm unlink
.Ar file
@@ -80,10 +78,20 @@ The
option overrides any previous
.Fl f
options.
.It Fl I
Request confirmation once if more than three files are being removed or if a
directory is being recursively removed.
This is a far less intrusive option than
.Fl i
yet provides almost the same level of protection against mistakes.
.It Fl P
Overwrite regular files before deleting them.
Files are overwritten three times, first with the byte pattern 0xff,
then 0x00, and then 0xff again, before they are deleted.
Specifying this flag for a read only file will cause
.Nm
to generate an error message and exit.
The file wil not be removed or overwritten.
.It Fl R
Attempt to remove the file hierarchy rooted in each file argument.
The
@@ -115,9 +123,10 @@ The
utility removes symbolic links, not the files referenced by the links.
.Pp
It is an error to attempt to remove the files
.Dq .\&
.Pa / ,
.Pa .\&
or
.Dq .. .
.Pa .. .
.Pp
When the utility is called as
.Nm unlink ,
@@ -148,31 +157,17 @@ to parse its arguments, which allows it to accept
the
.Sq Li --
option which will cause it to stop processing flag options at that
point. This will allow the removal of file names that begin
point.
This will allow the removal of file names that begin
with a dash
.Pq Sq - .
For example:
.Dl rm -- -filename
The same behavior can be obtained by using an absolute or relative
path reference. For example:
path reference.
For example:
.Dl rm /home/user/-filename
.Dl rm ./-filename
.Sh SEE ALSO
.Xr chflags 1 ,
.Xr rmdir 1 ,
.Xr undelete 2 ,
.Xr unlink 2 ,
.Xr fts 3 ,
.Xr getopt 3 ,
.Xr symlink 7
.Sh BUGS
The
.Fl P
option assumes that the underlying file system is a fixed-block file
system.
UFS is a fixed-block file system, LFS is not.
In addition, only regular files are overwritten, other types of files
are not.
.Sh COMPATIBILITY
The
.Nm
@@ -188,6 +183,14 @@ Also, historical
.Bx
implementations prompted on the standard output,
not the standard error output.
.Sh SEE ALSO
.Xr chflags 1 ,
.Xr rmdir 1 ,
.Xr undelete 2 ,
.Xr unlink 2 ,
.Xr fts 3 ,
.Xr getopt 3 ,
.Xr symlink 7
.Sh STANDARDS
The
.Nm
@@ -203,3 +206,11 @@ A
.Nm
command appeared in
.At v1 .
.Sh BUGS
The
.Fl P
option assumes that the underlying file system is a fixed-block file
system.
UFS is a fixed-block file system, LFS is not.
In addition, only regular files are overwritten, other types of files
are not.
+129 -28
View File
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -31,6 +27,7 @@
* SUCH DAMAGE.
*/
#if 0
#ifndef lint
static const char copyright[] =
"@(#) Copyright (c) 1990, 1993, 1994\n\
@@ -38,10 +35,9 @@ static const char copyright[] =
#endif /* not lint */
#ifndef lint
#if 0
static char sccsid[] = "@(#)rm.c 8.5 (Berkeley) 4/18/94";
#endif
#endif /* not lint */
#endif
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -53,6 +49,8 @@ __FBSDID("$FreeBSD$");
#include <errno.h>
#include <fcntl.h>
#include <fts.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -60,26 +58,29 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok;
int rflag, Iflag;
uid_t uid;
int check(char *, char *, struct stat *);
int check2(char **);
void checkdot(char **);
void checkslash(char **);
void rm_file(char **);
void rm_overwrite(char *, struct stat *);
int rm_overwrite(char *, struct stat *);
void rm_tree(char **);
void usage(void);
/*
* rm --
* This rm is different from historic rm's, but is expected to match
* POSIX 1003.2 behavior. The most visible difference is that -f
* POSIX 1003.2 behavior. The most visible difference is that -f
* has two specific effects now, ignore non-existent files and force
* file removal.
* file removal.
*/
int
main(int argc, char *argv[])
{
int ch, rflag;
int ch;
char *p;
/*
@@ -103,7 +104,7 @@ main(int argc, char *argv[])
}
Pflag = rflag = 0;
while ((ch = getopt(argc, argv, "dfiPRrvW")) != -1)
while ((ch = getopt(argc, argv, "dfiIPRrvW")) != -1)
switch(ch) {
case 'd':
dflag = 1;
@@ -116,6 +117,9 @@ main(int argc, char *argv[])
fflag = 0;
iflag = 1;
break;
case 'I':
Iflag = 1;
break;
case 'P':
Pflag = 1;
break;
@@ -137,16 +141,22 @@ main(int argc, char *argv[])
if (argc < 1) {
if (fflag)
return 0;
return (0);
usage();
}
checkdot(argv);
if (getenv("POSIXLY_CORRECT") == NULL)
checkslash(argv);
uid = geteuid();
if (*argv) {
stdin_ok = isatty(STDIN_FILENO);
if (Iflag) {
if (check2(argv) == 0)
exit (1);
}
if (rflag)
rm_tree(argv);
else
@@ -182,8 +192,11 @@ rm_tree(char **argv)
flags |= FTS_NOSTAT;
if (Wflag)
flags |= FTS_WHITEOUT;
if (!(fts = fts_open(argv, flags, NULL)))
err(1, NULL);
if (!(fts = fts_open(argv, flags, NULL))) {
if (fflag && errno == ENOENT)
return;
err(1, "fts_open");
}
while ((p = fts_read(fts)) != NULL) {
switch (p->fts_info) {
case FTS_DNR:
@@ -197,8 +210,8 @@ rm_tree(char **argv)
errx(1, "%s: %s", p->fts_path, strerror(p->fts_errno));
case FTS_NS:
/*
* FTS_NS: assume that if can't stat the file, it
* can't be unlinked.
* Assume that since fts_read() couldn't stat the
* file, it can't be unlinked.
*/
if (!needstat)
break;
@@ -267,9 +280,18 @@ rm_tree(char **argv)
}
break;
case FTS_NS:
/*
* Assume that since fts_read() couldn't stat
* the file, it can't be unlinked.
*/
if (fflag)
continue;
/* FALLTHROUGH */
default:
if (Pflag)
rm_overwrite(p->fts_accpath, NULL);
if (!rm_overwrite(p->fts_accpath, NULL))
continue;
rval = unlink(p->fts_accpath);
if (rval == 0 || (fflag && errno == ENOENT)) {
if (rval == 0 && vflag)
@@ -335,7 +357,8 @@ rm_file(char **argv)
rval = rmdir(f);
else {
if (Pflag)
rm_overwrite(f, &sb);
if (!rm_overwrite(f, &sb))
continue;
rval = unlink(f);
}
}
@@ -355,11 +378,11 @@ rm_file(char **argv)
* XXX
* This is a cheap way to *really* delete files. Note that only regular
* files are deleted, directories (and therefore names) will remain.
* Also, this assumes a fixed-block filesystem (like FFS, or a V7 or a
* System V filesystem). In a logging filesystem, you'll have to have
* Also, this assumes a fixed-block file system (like FFS, or a V7 or a
* System V file system). In a logging file system, you'll have to have
* kernel support.
*/
void
int
rm_overwrite(char *file, struct stat *sbp)
{
struct stat sb;
@@ -375,14 +398,14 @@ rm_overwrite(char *file, struct stat *sbp)
sbp = &sb;
}
if (!S_ISREG(sbp->st_mode))
return;
return (1);
if ((fd = open(file, O_WRONLY, 0)) == -1)
goto err;
if (fstatfs(fd, &fsb) == -1)
goto err;
bsize = MAX(fsb.f_iosize, 1024);
if ((buf = malloc(bsize)) == NULL)
err(1, "malloc");
err(1, "%s: malloc", file);
#define PASS(byte) { \
memset(buf, byte, bsize); \
@@ -401,13 +424,16 @@ rm_overwrite(char *file, struct stat *sbp)
PASS(0xff);
if (!fsync(fd) && !close(fd)) {
free(buf);
return;
return (1);
}
err: eval = 1;
if (buf)
free(buf);
if (fd != -1)
close(fd);
warn("%s", file);
return (0);
}
@@ -423,7 +449,7 @@ check(char *path, char *name, struct stat *sp)
else {
/*
* If it's not a symbolic link and it's unwritable and we're
* talking to a terminal, ask. Symbolic links are excluded
* talking to a terminal, ask. Symbolic links are excluded
* because their permissions are meaningless. Check stdin_ok
* first because we may not have stat'ed the file.
*/
@@ -434,12 +460,16 @@ check(char *path, char *name, struct stat *sp)
return (1);
strmode(sp->st_mode, modep);
if ((flagsp = fflagstostr(sp->st_flags)) == NULL)
err(1, NULL);
err(1, "fflagstostr");
if (Pflag)
errx(1,
"%s: -P was specified, but file is not writable",
path);
(void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
modep + 1, modep[9] == ' ' ? "" : " ",
user_from_uid(sp->st_uid, 0),
group_from_gid(sp->st_gid, 0),
*flagsp ? flagsp : "", *flagsp ? " " : "",
*flagsp ? flagsp : "", *flagsp ? " " : "",
path);
free(flagsp);
}
@@ -451,6 +481,77 @@ check(char *path, char *name, struct stat *sp)
return (first == 'y' || first == 'Y');
}
#define ISSLASH(a) ((a)[0] == '/' && (a)[1] == '\0')
void
checkslash(char **argv)
{
char **t, **u;
int complained;
complained = 0;
for (t = argv; *t;) {
if (ISSLASH(*t)) {
if (!complained++)
warnx("\"/\" may not be removed");
eval = 1;
for (u = t; u[0] != NULL; ++u)
u[0] = u[1];
} else {
++t;
}
}
}
int
check2(char **argv)
{
struct stat st;
int first;
int ch;
int fcount = 0;
int dcount = 0;
int i;
const char *dname = NULL;
for (i = 0; argv[i]; ++i) {
if (lstat(argv[i], &st) == 0) {
if (S_ISDIR(st.st_mode)) {
++dcount;
dname = argv[i]; /* only used if 1 dir */
} else {
++fcount;
}
}
}
first = 0;
while (first != 'n' && first != 'N' && first != 'y' && first != 'Y') {
if (dcount && rflag) {
fprintf(stderr, "recursively remove");
if (dcount == 1)
fprintf(stderr, " %s", dname);
else
fprintf(stderr, " %d dirs", dcount);
if (fcount == 1)
fprintf(stderr, " and 1 file");
else if (fcount > 1)
fprintf(stderr, " and %d files", fcount);
} else if (dcount + fcount > 3) {
fprintf(stderr, "remove %d files", dcount + fcount);
} else {
return(1);
}
fprintf(stderr, "? ");
fflush(stderr);
first = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar();
if (ch == EOF)
break;
}
return (first == 'y' || first == 'Y');
}
#define ISDOT(a) ((a)[0] == '.' && (!(a)[1] || ((a)[1] == '.' && !(a)[2])))
void
checkdot(char **argv)
@@ -481,7 +582,7 @@ usage(void)
{
(void)fprintf(stderr, "%s\n%s\n",
"usage: rm [-f | -i] [-dPRrvW] file ...",
"usage: rm [-f | -i] [-dIPRrvW] file ...",
" unlink file");
exit(EX_USAGE);
}
+1 -1
View File
@@ -1164,7 +1164,7 @@ expmeta(char *enddir, char *name)
if (*p == '\0')
break;
}
if (metaflag == 0 || stat(expdir, &statb) >= 0)
if (metaflag == 0 || lstat(expdir, &statb) >= 0)
addfname(expdir);
return;
}
+2 -1
View File
@@ -930,7 +930,8 @@ dowait(int block, struct job *job)
in_dowait--;
if (breakwaitcmd != 0) {
breakwaitcmd = 0;
return -1;
if (pid <= 0)
return -1;
}
if (pid <= 0)
return pid;
+1
View File
@@ -969,6 +969,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
USTPUTC('\\', out);
pungetc();
} else if (c == '\n') {
plinno++;
if (doprompt)
setprompt(2);
else
+1 -1
View File
@@ -262,7 +262,7 @@ When waiting for a child, execute traps immediately.
If this option is not set,
traps are executed after the child exits,
as specified in
.St -p1003.2
.St -p1003.2 .
This nonstandard option is useful for putting guarding shells around
children that block signals. The surrounding shell may kill the child
or it may just return control to the tty and leave the child alone,
+34 -9
View File
@@ -312,6 +312,7 @@ static void compressedStreamEOF ( void ) NORETURN;
static void copyFileName ( Char*, Char* );
static void* myMalloc ( Int32 );
static int applySavedFileAttrToOutputFile ( int fd );
@@ -457,6 +458,10 @@ void compressStream ( FILE *stream, FILE *zStream )
ret = fflush ( zStream );
if (ret == EOF) goto errhandler_io;
if (zStream != stdout) {
int fd = fileno ( zStream );
if (fd < 0) goto errhandler_io;
ret = applySavedFileAttrToOutputFile ( fd );
if (ret != 0) goto errhandler_io;
ret = fclose ( zStream );
outputHandleJustInCase = NULL;
if (ret == EOF) goto errhandler_io;
@@ -525,6 +530,7 @@ Bool uncompressStream ( FILE *zStream, FILE *stream )
UChar obuf[5000];
UChar unused[BZ_MAX_UNUSED];
Int32 nUnused;
void* unusedTmpV;
UChar* unusedTmp;
nUnused = 0;
@@ -554,9 +560,10 @@ Bool uncompressStream ( FILE *zStream, FILE *stream )
}
if (bzerr != BZ_STREAM_END) goto errhandler;
BZ2_bzReadGetUnused ( &bzerr, bzf, (void**)(&unusedTmp), &nUnused );
BZ2_bzReadGetUnused ( &bzerr, bzf, &unusedTmpV, &nUnused );
if (bzerr != BZ_OK) panic ( "decompress:bzReadGetUnused" );
unusedTmp = (UChar*)unusedTmpV;
for (i = 0; i < nUnused; i++) unused[i] = unusedTmp[i];
BZ2_bzReadClose ( &bzerr, bzf );
@@ -567,6 +574,12 @@ Bool uncompressStream ( FILE *zStream, FILE *stream )
closeok:
if (ferror(zStream)) goto errhandler_io;
if ( stream != stdout) {
int fd = fileno ( stream );
if (fd < 0) goto errhandler_io;
ret = applySavedFileAttrToOutputFile ( fd );
if (ret != 0) goto errhandler_io;
}
ret = fclose ( zStream );
if (ret == EOF) goto errhandler_io;
@@ -639,6 +652,7 @@ Bool testStream ( FILE *zStream )
UChar obuf[5000];
UChar unused[BZ_MAX_UNUSED];
Int32 nUnused;
void* unusedTmpV;
UChar* unusedTmp;
nUnused = 0;
@@ -662,9 +676,10 @@ Bool testStream ( FILE *zStream )
}
if (bzerr != BZ_STREAM_END) goto errhandler;
BZ2_bzReadGetUnused ( &bzerr, bzf, (void**)(&unusedTmp), &nUnused );
BZ2_bzReadGetUnused ( &bzerr, bzf, &unusedTmpV, &nUnused );
if (bzerr != BZ_OK) panic ( "test:bzReadGetUnused" );
unusedTmp = (UChar*)unusedTmpV;
for (i = 0; i < nUnused; i++) unused[i] = unusedTmp[i];
BZ2_bzReadClose ( &bzerr, bzf );
@@ -1125,7 +1140,7 @@ void saveInputFileMetaInfo ( Char *srcName )
static
void applySavedMetaInfoToOutputFile ( Char *dstName )
void applySavedTimeInfoToOutputFile ( Char *dstName )
{
# if BZ_UNIX
IntNative retVal;
@@ -1134,16 +1149,26 @@ void applySavedMetaInfoToOutputFile ( Char *dstName )
uTimBuf.actime = fileMetaInfo.st_atime;
uTimBuf.modtime = fileMetaInfo.st_mtime;
retVal = chmod ( dstName, fileMetaInfo.st_mode );
ERROR_IF_NOT_ZERO ( retVal );
retVal = utime ( dstName, &uTimBuf );
ERROR_IF_NOT_ZERO ( retVal );
# endif
}
retVal = chown ( dstName, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
static
int applySavedFileAttrToOutputFile ( int fd )
{
# if BZ_UNIX
IntNative retVal;
retVal = fchmod ( fd, fileMetaInfo.st_mode );
if (retVal != 0)
return retVal;
(void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
/* chown() will in many cases return with EPERM, which can
be safely ignored.
*/
return 0;
# endif
}
@@ -1366,7 +1391,7 @@ void compress ( Char *name )
/*--- If there was an I/O error, we won't get here. ---*/
if ( srcMode == SM_F2F ) {
applySavedMetaInfoToOutputFile ( outName );
applySavedTimeInfoToOutputFile ( outName );
deleteOutputOnInterrupt = False;
if ( !keepInputFiles ) {
IntNative retVal = remove ( inName );
@@ -1544,7 +1569,7 @@ void uncompress ( Char *name )
/*--- If there was an I/O error, we won't get here. ---*/
if ( magicNumberOK ) {
if ( srcMode == SM_F2F ) {
applySavedMetaInfoToOutputFile ( outName );
applySavedTimeInfoToOutputFile ( outName );
deleteOutputOnInterrupt = False;
if ( !keepInputFiles ) {
IntNative retVal = remove ( inName );
+37 -14
View File
@@ -574,8 +574,11 @@ int BZ_API(BZ2_bzDecompressInit)
/*---------------------------------------------------*/
/* Return True iff data corruption is discovered.
Returns False if there is no problem.
*/
static
void unRLE_obuf_to_output_FAST ( DState* s )
Bool unRLE_obuf_to_output_FAST ( DState* s )
{
UChar k1;
@@ -584,7 +587,7 @@ void unRLE_obuf_to_output_FAST ( DState* s )
while (True) {
/* try to finish existing run */
while (True) {
if (s->strm->avail_out == 0) return;
if (s->strm->avail_out == 0) return False;
if (s->state_out_len == 0) break;
*( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
@@ -594,10 +597,13 @@ void unRLE_obuf_to_output_FAST ( DState* s )
s->strm->total_out_lo32++;
if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
}
/* can a new run be started? */
if (s->nblock_used == s->save_nblock+1) return;
if (s->nblock_used == s->save_nblock+1) return False;
/* Only caused by corrupt data stream? */
if (s->nblock_used > s->save_nblock+1)
return True;
s->state_out_len = 1;
s->state_out_ch = s->k0;
@@ -667,6 +673,10 @@ void unRLE_obuf_to_output_FAST ( DState* s )
cs_avail_out--;
}
}
/* Only caused by corrupt data stream? */
if (c_nblock_used > s_save_nblockPP)
return True;
/* can a new run be started? */
if (c_nblock_used == s_save_nblockPP) {
c_state_out_len = 0; goto return_notr;
@@ -712,6 +722,7 @@ void unRLE_obuf_to_output_FAST ( DState* s )
s->strm->avail_out = cs_avail_out;
/* end save */
}
return False;
}
@@ -732,8 +743,11 @@ __inline__ Int32 BZ2_indexIntoF ( Int32 indx, Int32 *cftab )
/*---------------------------------------------------*/
/* Return True iff data corruption is discovered.
Returns False if there is no problem.
*/
static
void unRLE_obuf_to_output_SMALL ( DState* s )
Bool unRLE_obuf_to_output_SMALL ( DState* s )
{
UChar k1;
@@ -742,7 +756,7 @@ void unRLE_obuf_to_output_SMALL ( DState* s )
while (True) {
/* try to finish existing run */
while (True) {
if (s->strm->avail_out == 0) return;
if (s->strm->avail_out == 0) return False;
if (s->state_out_len == 0) break;
*( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
@@ -754,8 +768,11 @@ void unRLE_obuf_to_output_SMALL ( DState* s )
}
/* can a new run be started? */
if (s->nblock_used == s->save_nblock+1) return;
if (s->nblock_used == s->save_nblock+1) return False;
/* Only caused by corrupt data stream? */
if (s->nblock_used > s->save_nblock+1)
return True;
s->state_out_len = 1;
s->state_out_ch = s->k0;
@@ -788,7 +805,7 @@ void unRLE_obuf_to_output_SMALL ( DState* s )
while (True) {
/* try to finish existing run */
while (True) {
if (s->strm->avail_out == 0) return;
if (s->strm->avail_out == 0) return False;
if (s->state_out_len == 0) break;
*( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
@@ -800,7 +817,11 @@ void unRLE_obuf_to_output_SMALL ( DState* s )
}
/* can a new run be started? */
if (s->nblock_used == s->save_nblock+1) return;
if (s->nblock_used == s->save_nblock+1) return False;
/* Only caused by corrupt data stream? */
if (s->nblock_used > s->save_nblock+1)
return True;
s->state_out_len = 1;
s->state_out_ch = s->k0;
@@ -830,6 +851,7 @@ void unRLE_obuf_to_output_SMALL ( DState* s )
/*---------------------------------------------------*/
int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )
{
Bool corrupt;
DState* s;
if (strm == NULL) return BZ_PARAM_ERROR;
s = strm->state;
@@ -840,12 +862,13 @@ int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )
if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR;
if (s->state == BZ_X_OUTPUT) {
if (s->smallDecompress)
unRLE_obuf_to_output_SMALL ( s ); else
unRLE_obuf_to_output_FAST ( s );
corrupt = unRLE_obuf_to_output_SMALL ( s ); else
corrupt = unRLE_obuf_to_output_FAST ( s );
if (corrupt) return BZ_DATA_ERROR;
if (s->nblock_used == s->save_nblock+1 && s->state_out_len == 0) {
BZ_FINALISE_CRC ( s->calculatedBlockCRC );
if (s->verbosity >= 3)
VPrintf2 ( " {0x%x, 0x%x}", s->storedBlockCRC,
VPrintf2 ( " {0x%08x, 0x%08x}", s->storedBlockCRC,
s->calculatedBlockCRC );
if (s->verbosity >= 2) VPrintf0 ( "]" );
if (s->calculatedBlockCRC != s->storedBlockCRC)
@@ -863,7 +886,7 @@ int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )
Int32 r = BZ2_decompress ( s );
if (r == BZ_STREAM_END) {
if (s->verbosity >= 3)
VPrintf2 ( "\n combined CRCs: stored = 0x%x, computed = 0x%x",
VPrintf2 ( "\n combined CRCs: stored = 0x%08x, computed = 0x%08x",
s->storedCombinedCRC, s->calculatedCombinedCRC );
if (s->calculatedCombinedCRC != s->storedCombinedCRC)
return BZ_DATA_ERROR;
+7 -5
View File
@@ -488,9 +488,11 @@ void sendMTFValues ( EState* s )
/*--
Recompute the tables based on the accumulated frequencies.
--*/
/* maxLen was changed from 20 to 17 in bzip2-1.0.3. See
comment in huffman.c for details. */
for (t = 0; t < nGroups; t++)
BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]),
alphaSize, 20 );
alphaSize, 17 /*20*/ );
}
@@ -527,7 +529,7 @@ void sendMTFValues ( EState* s )
if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
if (s->len[t][i] < minLen) minLen = s->len[t][i];
}
AssertH ( !(maxLen > 20), 3004 );
AssertH ( !(maxLen > 17 /*20*/ ), 3004 );
AssertH ( !(minLen < 1), 3005 );
BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]),
minLen, maxLen, alphaSize );
@@ -651,8 +653,8 @@ void BZ2_compressBlock ( EState* s, Bool is_last_block )
if (s->blockNo > 1) s->numZ = 0;
if (s->verbosity >= 2)
VPrintf4( " block %d: crc = 0x%8x, "
"combined CRC = 0x%8x, size = %d\n",
VPrintf4( " block %d: crc = 0x%08x, "
"combined CRC = 0x%08x, size = %d\n",
s->blockNo, s->blockCRC, s->combinedCRC, s->nblock );
BZ2_blockSort ( s );
@@ -703,7 +705,7 @@ void BZ2_compressBlock ( EState* s, Bool is_last_block )
bsPutUChar ( s, 0x50 ); bsPutUChar ( s, 0x90 );
bsPutUInt32 ( s, s->combinedCRC );
if (s->verbosity >= 2)
VPrintf1( " final combined CRC = 0x%x\n ", s->combinedCRC );
VPrintf1( " final combined CRC = 0x%08x\n ", s->combinedCRC );
bsFinishWrite ( s );
}
}
+11 -5
View File
@@ -524,17 +524,23 @@ Int32 BZ2_decompress ( DState* s )
if (s->origPtr < 0 || s->origPtr >= nblock)
RETURN(BZ_DATA_ERROR);
/*-- Set up cftab to facilitate generation of T^(-1) --*/
s->cftab[0] = 0;
for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1];
for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1];
for (i = 0; i <= 256; i++) {
if (s->cftab[i] < 0 || s->cftab[i] > nblock) {
/* s->cftab[i] can legitimately be == nblock */
RETURN(BZ_DATA_ERROR);
}
}
s->state_out_len = 0;
s->state_out_ch = 0;
BZ_INITIALISE_CRC ( s->calculatedBlockCRC );
s->state = BZ_X_OUTPUT;
if (s->verbosity >= 2) VPrintf0 ( "rt+rld" );
/*-- Set up cftab to facilitate generation of T^(-1) --*/
s->cftab[0] = 0;
for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1];
for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1];
if (s->smallDecompress) {
/*-- Make a copy of cftab, used in generation of T --*/
+18 -1
View File
@@ -162,7 +162,24 @@ void BZ2_hbMakeCodeLengths ( UChar *len,
if (! tooLong) break;
for (i = 1; i < alphaSize; i++) {
/* 17 Oct 04: keep-going condition for the following loop used
to be 'i < alphaSize', which missed the last element,
theoretically leading to the possibility of the compressor
looping. However, this count-scaling step is only needed if
one of the generated Huffman code words is longer than
maxLen, which up to and including version 1.0.2 was 20 bits,
which is extremely unlikely. In version 1.0.3 maxLen was
changed to 17 bits, which has minimal effect on compression
ratio, but does mean this scaling step is used from time to
time, enough to verify that it works.
This means that bzip2-1.0.3 and later will only produce
Huffman codes with a maximum length of 17 bits. However, in
order to preserve backwards compatibility with bitstreams
produced by versions pre-1.0.3, the decompressor must still
handle lengths of up to 20. */
for (i = 1; i <= alphaSize; i++) {
j = weight[i] >> 8;
j = 1 + (j / 2);
weight[i] = j << 8;
+91 -26
View File
@@ -46,6 +46,19 @@ $FreeBSD$
#define lchown chown
#endif
# ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
# endif
# ifndef ISSLASH
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
# endif
# ifndef FILE_SYSTEM_PREFIX_LEN
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
# endif
static void read_pattern_file ();
static void tape_skip_padding ();
static void defer_copyin ();
@@ -376,6 +389,54 @@ swab_array (ptr, count)
/* Current time for verbose table. */
static time_t current_time;
/* Return a safer suffix of FILE_NAME, or "." if it has no safer
suffix. Check for fully specified file names and other atrocities. */
static const char *
safer_name_suffix (char const *file_name)
{
char const *p;
/* Skip file system prefixes, leading file name components that contain
"..", and leading slashes. */
size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (file_name);
for (p = file_name + prefix_len; *p;)
{
if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
prefix_len = p + 2 - file_name;
do
{
char c = *p++;
if (ISSLASH (c))
break;
}
while (*p);
}
for (p = file_name + prefix_len; ISSLASH (*p); p++)
continue;
prefix_len = p - file_name;
if (prefix_len)
{
char *prefix = alloca (prefix_len + 1);
memcpy (prefix, file_name, prefix_len);
prefix[prefix_len] = '\0';
error (0, 0, "Removing leading `%s' from member names", prefix);
}
if (!*p)
p = ".";
return p;
}
/* Read the collection from standard input and create files
in the file system. */
@@ -396,6 +457,7 @@ process_copy_in ()
int in_file_des; /* Input file descriptor. */
char skip_file; /* Flag for use with patterns. */
int existing_dir; /* True if file is a dir & already exists. */
mode_t existing_mode;
int i; /* Loop index variable. */
char *link_name = NULL; /* Name of hard and symbolic links. */
#ifdef HPUX_CDF
@@ -494,18 +556,11 @@ process_copy_in ()
/* Do we have to ignore absolute paths, and if so, does the filename
have an absolute path? */
if (no_abs_paths_flag && file_hdr.c_name && file_hdr.c_name [0] == '/')
if (!abs_paths_flag && file_hdr.c_name && file_hdr.c_name[0])
{
char *p;
const char *p = safer_name_suffix (file_hdr.c_name);
p = file_hdr.c_name;
while (*p == '/')
++p;
if (*p == '\0')
{
strcpy (file_hdr.c_name, ".");
}
else
if (p != file_hdr.c_name)
{
char *non_abs_name;
@@ -642,6 +697,7 @@ process_copy_in ()
we are trying to create, don't complain about
it. */
existing_dir = TRUE;
existing_mode = file_stat.st_mode;
}
else if (!unconditional_flag
&& file_hdr.c_mtime <= file_stat.st_mtime)
@@ -778,8 +834,6 @@ process_copy_in ()
}
copy_files_tape_to_disk (in_file_des, out_file_des, file_hdr.c_filesize);
disk_empty_output_buffer (out_file_des);
if (close (out_file_des) < 0)
error (0, errno, "%s", file_hdr.c_name);
if (archive_format == arf_crcascii)
{
@@ -789,13 +843,15 @@ process_copy_in ()
}
/* File is now copied; set attributes. */
if (!no_chown_flag)
if ((chown (file_hdr.c_name,
if ((fchown (out_file_des,
set_owner_flag ? set_owner : file_hdr.c_uid,
set_group_flag ? set_group : file_hdr.c_gid) < 0)
&& errno != EPERM)
error (0, errno, "%s", file_hdr.c_name);
/* chown may have turned off some permissions we wanted. */
if (chmod (file_hdr.c_name, (int) file_hdr.c_mode) < 0)
if (fchmod (out_file_des, (int) file_hdr.c_mode) < 0)
error (0, errno, "%s", file_hdr.c_name);
if (close (out_file_des) < 0)
error (0, errno, "%s", file_hdr.c_name);
if (retain_time_flag)
{
@@ -847,14 +903,23 @@ process_copy_in ()
cdf_flag = 1;
}
#endif
res = mkdir (file_hdr.c_name, file_hdr.c_mode);
res = mkdir (file_hdr.c_name, file_hdr.c_mode & ~077);
}
else
res = 0;
{
if (!no_chown_flag && (existing_mode & 077) != 0
&& chmod (file_hdr.c_name, existing_mode & 07700) < 0)
{
error (0, errno, "%s: chmod", file_hdr.c_name);
return;
}
res = 0;
}
if (res < 0 && create_dir_flag)
{
create_all_directories (file_hdr.c_name);
res = mkdir (file_hdr.c_name, file_hdr.c_mode);
res = mkdir (file_hdr.c_name, file_hdr.c_mode & ~077);
}
if (res < 0)
{
@@ -936,20 +1001,20 @@ process_copy_in ()
#ifdef CP_IFIFO
if ((file_hdr.c_mode & CP_IFMT) == CP_IFIFO)
res = mkfifo (file_hdr.c_name, file_hdr.c_mode);
res = mkfifo (file_hdr.c_name, file_hdr.c_mode & ~077);
else
#endif
res = mknod (file_hdr.c_name, file_hdr.c_mode,
res = mknod (file_hdr.c_name, file_hdr.c_mode & ~077,
makedev (file_hdr.c_rdev_maj, file_hdr.c_rdev_min));
if (res < 0 && create_dir_flag)
{
create_all_directories (file_hdr.c_name);
#ifdef CP_IFIFO
if ((file_hdr.c_mode & CP_IFMT) == CP_IFIFO)
res = mkfifo (file_hdr.c_name, file_hdr.c_mode);
res = mkfifo (file_hdr.c_name, file_hdr.c_mode & ~077);
else
#endif
res = mknod (file_hdr.c_name, file_hdr.c_mode,
res = mknod (file_hdr.c_name, file_hdr.c_mode & ~077,
makedev (file_hdr.c_rdev_maj,
file_hdr.c_rdev_min));
}
@@ -1376,18 +1441,18 @@ create_final_defers ()
continue;
}
if (close (out_file_des) < 0)
error (0, errno, "%s", d->header.c_name);
/* File is now copied; set attributes. */
if (!no_chown_flag)
if ((chown (d->header.c_name,
if ((fchown (out_file_des,
set_owner_flag ? set_owner : d->header.c_uid,
set_group_flag ? set_group : d->header.c_gid) < 0)
&& errno != EPERM)
error (0, errno, "%s", d->header.c_name);
/* chown may have turned off some permissions we wanted. */
if (chmod (d->header.c_name, (int) d->header.c_mode) < 0)
if (fchmod (out_file_des, (int) d->header.c_mode) < 0)
error (0, errno, "%s", d->header.c_name);
if (close (out_file_des) < 0)
error (0, errno, "%s", d->header.c_name);
if (retain_time_flag)
{
+20 -2
View File
@@ -49,12 +49,13 @@ write_out_header (file_hdr, out_des)
{
char ascii_header[112];
char *magic_string;
int ret;
if (archive_format == arf_crcascii)
magic_string = "070702";
else
magic_string = "070701";
sprintf (ascii_header,
ret = snprintf (ascii_header, sizeof(ascii_header),
"%6s%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx",
magic_string,
file_hdr->c_ino, file_hdr->c_mode, file_hdr->c_uid,
@@ -62,6 +63,10 @@ write_out_header (file_hdr, out_des)
file_hdr->c_filesize, file_hdr->c_dev_maj, file_hdr->c_dev_min,
file_hdr->c_rdev_maj, file_hdr->c_rdev_min, file_hdr->c_namesize,
file_hdr->c_chksum);
if (ret >= sizeof(ascii_header)) {
fprintf(stderr, "Internal overflow, aborting\n");
exit (1);
}
tape_buffered_write (ascii_header, out_des, 110L);
/* Write file name to output. */
@@ -71,6 +76,7 @@ write_out_header (file_hdr, out_des)
else if (archive_format == arf_oldascii || archive_format == arf_hpoldascii)
{
char ascii_header[78];
int ret;
#ifndef __MSDOS__
dev_t dev;
dev_t rdev;
@@ -112,7 +118,7 @@ write_out_header (file_hdr, out_des)
if ((file_hdr->c_ino >> 16) != 0)
error (0, 0, "%s: truncating inode number", file_hdr->c_name);
sprintf (ascii_header,
ret = snprintf (ascii_header, sizeof(ascii_header),
"%06o%06o%06lo%06lo%06lo%06lo%06lo%06o%011lo%06lo%011lo",
file_hdr->c_magic & 0xFFFF, dev & 0xFFFF,
file_hdr->c_ino & 0xFFFF, file_hdr->c_mode & 0xFFFF,
@@ -120,6 +126,10 @@ write_out_header (file_hdr, out_des)
file_hdr->c_nlink & 0xFFFF, rdev & 0xFFFF,
file_hdr->c_mtime, file_hdr->c_namesize & 0xFFFF,
file_hdr->c_filesize);
if (ret >= sizeof(ascii_header)) {
fprintf(stderr, "Internal overflow, aborting\n");
exit (1);
}
tape_buffered_write (ascii_header, out_des, 76L);
/* Write file name to output. */
@@ -258,6 +268,14 @@ process_copy_out ()
file_hdr.c_dev_maj = major (file_stat.st_dev);
file_hdr.c_dev_min = minor (file_stat.st_dev);
file_hdr.c_ino = file_stat.st_ino;
/* Skip files larger than 4GB which will cause problems on
64bit platforms (and just not work on 32bit). */
if (file_stat.st_size > 0xffffffff) {
error (0, 0, "%s: skipping >4GB file", input_name.ds_string);
continue;
}
/* For POSIX systems that don't define the S_IF macros,
we can't assume that S_ISfoo means the standard Unix
S_IFfoo bit(s) are set. So do it manually, with a
+20 -11
View File
@@ -173,18 +173,18 @@ process_copy_pass ()
disk_empty_output_buffer (out_file_des);
if (close (in_file_des) < 0)
error (0, errno, "%s", input_name.ds_string);
if (close (out_file_des) < 0)
error (0, errno, "%s", output_name.ds_string);
/* Set the attributes of the new file. */
if (!no_chown_flag)
if ((chown (output_name.ds_string,
if ((fchown (out_file_des,
set_owner_flag ? set_owner : in_file_stat.st_uid,
set_group_flag ? set_group : in_file_stat.st_gid) < 0)
&& errno != EPERM)
error (0, errno, "%s", output_name.ds_string);
/* chown may have turned off some permissions we wanted. */
if (chmod (output_name.ds_string, in_file_stat.st_mode) < 0)
if (fchmod (out_file_des, in_file_stat.st_mode) < 0)
error (0, errno, "%s", output_name.ds_string);
if (close (out_file_des) < 0)
error (0, errno, "%s", output_name.ds_string);
if (reset_time_flag)
{
@@ -223,15 +223,24 @@ process_copy_pass ()
cdf_flag = 1;
}
#endif
res = mkdir (output_name.ds_string, in_file_stat.st_mode);
res = mkdir (output_name.ds_string, in_file_stat.st_mode & ~077);
}
else
res = 0;
{
if (!no_chown_flag && (out_file_stat.st_mode & 077) != 0
&& chmod (output_name.ds_string, out_file_stat.st_mode & 07700) < 0)
{
error (0, errno, "%s: chmod", output_name.ds_string);
continue;
}
res = 0;
}
if (res < 0 && create_dir_flag)
{
create_all_directories (output_name.ds_string);
res = mkdir (output_name.ds_string, in_file_stat.st_mode);
res = mkdir (output_name.ds_string, in_file_stat.st_mode & ~077);
}
if (res < 0)
{
@@ -297,20 +306,20 @@ process_copy_pass ()
{
#ifdef S_ISFIFO
if (S_ISFIFO (in_file_stat.st_mode))
res = mkfifo (output_name.ds_string, in_file_stat.st_mode);
res = mkfifo (output_name.ds_string, in_file_stat.st_mode & ~077);
else
#endif
res = mknod (output_name.ds_string, in_file_stat.st_mode,
res = mknod (output_name.ds_string, in_file_stat.st_mode & ~077,
in_file_stat.st_rdev);
if (res < 0 && create_dir_flag)
{
create_all_directories (output_name.ds_string);
#ifdef S_ISFIFO
if (S_ISFIFO (in_file_stat.st_mode))
res = mkfifo (output_name.ds_string, in_file_stat.st_mode);
res = mkfifo (output_name.ds_string, in_file_stat.st_mode & ~077);
else
#endif
res = mknod (output_name.ds_string, in_file_stat.st_mode,
res = mknod (output_name.ds_string, in_file_stat.st_mode & ~077,
in_file_stat.st_rdev);
}
if (res < 0)
+4 -4
View File
@@ -19,7 +19,7 @@ cpio \- copy files to and from archives
[\-\-unconditional] [\-\-verbose] [\-\-block-size=blocks] [\-\-swap-halfwords]
[\-\-io-size=bytes] [\-\-pattern-file=file] [\-\-format=format]
[\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message]
[\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse] [\-\-only\-verify\-crc]
[\-\-force\-local] [\-\-absolute\-filenames] [\-\-sparse] [\-\-only\-verify\-crc]
[\-\-quiet] [\-\-help] [\-\-version] [pattern...] [< archive]
.B cpio
@@ -251,9 +251,9 @@ current volume number (starting at 1).
In the verbose table of contents listing, show numeric UID and GID
instead of translating them into names.
.TP
.I " \-\-no-absolute-filenames"
In copy-in mode, create all files relative to the current directory,
even if they have an absolute file name in the archive.
.I " \-\-absolute-filenames"
Do not strip leading file name components that contain ".."
and leading slashes from file names in copy-in mode
.TP
.I " \-\-no-preserve-owner"
In copy-in mode and copy-pass mode, do not change the ownership of the
+1 -1
View File
@@ -46,7 +46,7 @@ extern int no_chown_flag;
extern int sparse_flag;
extern int quiet_flag;
extern int only_verify_crc_flag;
extern int no_abs_paths_flag;
extern int abs_paths_flag;
extern int last_header_start;
extern int copy_matching_files;
+2 -2
View File
@@ -98,8 +98,8 @@ int quiet_flag = FALSE;
actually extract the files. */
int only_verify_crc_flag = FALSE;
/* If TRUE, don't use any absolute paths, prefix them by `./'. */
int no_abs_paths_flag = FALSE;
/* If TRUE, allow any absolute paths */
int abs_paths_flag = FALSE;
#ifdef DEBUG_CPIO
/* If TRUE, print debugging information. */
+6 -6
View File
@@ -56,7 +56,7 @@ struct option long_opts[] =
{"list", 0, &table_flag, TRUE},
{"make-directories", 0, &create_dir_flag, TRUE},
{"message", 1, 0, 'M'},
{"no-absolute-filenames", 0, 0, 136},
{"absolute-filenames", 0, 0, 136},
{"no-preserve-owner", 0, 0, 134},
{"nonmatching", 0, &copy_matching_files, FALSE},
{"numeric-uid-gid", 0, &numeric_uid, TRUE},
@@ -105,7 +105,7 @@ Usage: %s {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message]\n\
[--unconditional] [--verbose] [--block-size=blocks] [--swap-halfwords]\n\
[--io-size=bytes] [--pattern-file=file] [--format=format]\n\
[--owner=[user][:.][group]] [--no-preserve-owner] [--message=message]\n\
[--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc]\n\
[--force-local] [--absolute-filenames] [--sparse] [--only-verify-crc]\n\
[--quiet] [--help] [--version] [pattern...] [< archive]\n",
program_name);
fprintf (fp, "\
@@ -266,8 +266,8 @@ crc newc odc bin ustar tar (all-caps also recognized)", optarg);
numeric_uid = TRUE;
break;
case 136: /* --no-absolute-filenames */
no_abs_paths_flag = TRUE;
case 136: /* --absolute-filenames */
abs_paths_flag = TRUE;
break;
case 134: /* --no-preserve-owner */
@@ -414,7 +414,7 @@ crc newc odc bin ustar tar (all-caps also recognized)", optarg);
|| retain_time_flag || no_chown_flag || set_owner_flag
|| set_group_flag || swap_bytes_flag || swap_halfwords_flag
|| (append_flag && !(archive_name || output_archive_name))
|| rename_batch_file || no_abs_paths_flag
|| rename_batch_file || abs_paths_flag
|| input_archive_name || (archive_name && output_archive_name))
usage (stderr, 2);
if (archive_format == arf_unknown)
@@ -429,7 +429,7 @@ crc newc odc bin ustar tar (all-caps also recognized)", optarg);
if (argc - 1 != optind || archive_format != arf_unknown
|| swap_bytes_flag || swap_halfwords_flag
|| table_flag || rename_flag || append_flag
|| rename_batch_file || no_abs_paths_flag)
|| rename_batch_file || abs_paths_flag)
usage (stderr, 2);
directory_name = argv[optind];
}
-2
View File
@@ -109,14 +109,12 @@ elif [ -f /bin/domainname ]; then
/usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
ORIGINATOR="`cat $TEMP`"
rm -f $TEMP
fi
fi
if [ "$ORIGINATOR" = "" ]; then
grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
ORIGINATOR="`cat $TEMP`"
rm -f $TEMP
fi
if [ -n "$ORGANIZATION" ]; then
+1 -1
View File
@@ -116,7 +116,7 @@ password_entry_parseline (cvsroot_canonical, warn, linenumber, linebuf)
if (isspace(*(linebuf + 1)))
/* special case since strtoul ignores leading white space */
entry_version = 0;
q = linebuf + 1;
else
entry_version = strtoul (linebuf + 1, &q, 10);
+10
View File
@@ -429,6 +429,16 @@ warning: this CVS does not support PreservePermissions");
else if (strcmp (p, "stat") == 0)
RereadLogAfterVerify = LOGMSG_REREAD_STAT;
}
else if (strcmp(line, "LocalKeyword") == 0)
{
/* Recognize cvs-1.12-style keyword control rather than erroring out. */
RCS_setlocalid(p);
}
else if (strcmp(line, "KeywordExpand") == 0)
{
/* Recognize cvs-1.12-style keyword control rather than erroring out. */
RCS_setincexc(p);
}
else
{
/* We may be dealing with a keyword which was added in a
+4 -3
View File
@@ -385,6 +385,7 @@ patch_fileproc (callerdat, finfo)
struct utimbuf t;
char *vers_tag, *vers_head;
char *rcs = NULL;
char *rcs_orig = NULL;
RCSNode *rcsfile;
FILE *fp1, *fp2, *fp3;
int ret = 0;
@@ -415,7 +416,7 @@ patch_fileproc (callerdat, finfo)
if ((rcsfile->flags & VALID) && (rcsfile->flags & INATTIC))
isattic = 1;
rcs = xmalloc (strlen (finfo->file) + sizeof (RCSEXT) + 5);
rcs_orig = rcs = xmalloc (strlen (finfo->file) + sizeof (RCSEXT) + 5);
(void) sprintf (rcs, "%s%s", finfo->file, RCSEXT);
/* if vers_head is NULL, may have been removed from the release */
@@ -757,8 +758,8 @@ failed to read diff file header %s for %s: end of file", tmpfile3, rcs);
free (vers_tag);
if (vers_head != NULL)
free (vers_head);
if (rcs != NULL)
free (rcs);
if (rcs_orig)
free (rcs_orig);
return ret;
}
+5 -4
View File
@@ -3040,8 +3040,7 @@ RCS_getdate (rcs, date, force_tag_match)
if (retval != NULL)
return (retval);
if (!force_tag_match ||
(vers != NULL && RCS_datecmp (vers->date, date) <= 0))
if (vers && (!force_tag_match || RCS_datecmp (vers->date, date) <= 0))
return xstrdup (vers->version);
else
return NULL;
@@ -4138,7 +4137,7 @@ RCS_checkout (rcs, workfile, rev, nametag, options, sout, pfn, callerdat)
size_t len;
int free_value = 0;
char *log = NULL;
size_t loglen;
size_t loglen = 0;
Node *vp = NULL;
#ifdef PRESERVE_PERMISSIONS_SUPPORT
uid_t rcs_owner = (uid_t) -1;
@@ -7456,7 +7455,7 @@ RCS_deltas (rcs, fp, rcsbuf, version, op, text, len, log, loglen)
for (ln = 0; ln < headlines.nlines; ++ln)
{
char buf[80];
char *buf;
/* Period which separates year from month in date. */
char *ym;
/* Period which separates month from day in date. */
@@ -7467,10 +7466,12 @@ RCS_deltas (rcs, fp, rcsbuf, version, op, text, len, log, loglen)
if (prvers == NULL)
prvers = vers;
buf = xmalloc (strlen (prvers->version) + 24);
sprintf (buf, "%-12s (%-8.8s ",
prvers->version,
prvers->author);
cvs_output (buf, 0);
free (buf);
/* Now output the date. */
ym = strchr (prvers->date, '.');
-4
View File
@@ -551,10 +551,6 @@
.ds doc-date-12 December
.
.de Dd
. \" XXX: why do we need gX?
. if "\*[doc-date-string]"" \
. nr gX 1
.
. ie \n[.$] \{\
. ie (\n[.$] == 3) \
. ds doc-date-string \$1\~\$2 \$3
-6
View File
@@ -180,8 +180,6 @@
.ds Ba \f[R]|\f[]
.ds Am &
.
.nr gX 0
.
.
.\" NS doc-header-string global string
.\" NS the final string used for the manual page header
@@ -203,12 +201,8 @@
. wh 0 doc-header
. wh -1.25i doc-footer
.
. if \n[gX] \
. ds doc-command-name
.
. br
.
. nr gX 0
. e@ doc-end-macro
..
.
+1
View File
@@ -697,6 +697,7 @@
.ds doc-str-Lb-libmagic Magic Number Recognition Library (libmagic, \-lmagic)
.ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu)
.ds doc-str-Lb-libossaudio OSS Audio Emulation Library (libossaudio, \-lossaudio)
.ds doc-str-Lb-libpam Pluggable Authentication Module Library (libpam, \-lpam)
.ds doc-str-Lb-libpcap Packet Capture Library (libpcap, \-lpcap)
.ds doc-str-Lb-libpci PCI Bus Access Library (libpci, \-lpci)
.ds doc-str-Lb-libpmc Performance Counters Library (libpmc, \-lpmc)
+43 -26
View File
@@ -2179,10 +2179,21 @@
. doc-parse-args \$@
. \}
. el \{\
. ie \n[doc-space-mode] \
. ie \n[doc-space-mode] \{\
. ds doc-saved-space "\*[doc-space]
. ds doc-space
. nr doc-space-mode 0
. el \
. \}
. el \{\
. ds doc-space "\*[doc-saved-space]
. nr doc-space-mode 1
.
. \" finish line only if it is interrupted and `doc-have-space'
. \" isn't set
. if \n[doc-reg-Sm] \
. if \n[.int] \
. nop \)
. \}
. \}\}
.
. if !\n[doc-arg-limit] \
@@ -2207,10 +2218,15 @@
. el \{\
. \" no argument for Sm
. nr doc-arg-ptr -1
. ie \n[doc-space-mode] \
. ie \n[doc-space-mode] \{\
. ds doc-saved-space "\*[doc-space]
. ds doc-space
. nr doc-space-mode 0
. el \
. \}
. el \{\
. ds doc-space "\*[doc-saved-space]
. nr doc-space-mode 1
. \}
. \}\}
.
. ie \n[doc-space-mode] \{\
@@ -2237,18 +2253,13 @@
. \}
.
. \" do we have parameters to print?
. ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
. \" ignore `.Sm on' and `.Sm off' without additional parameters
. ie (\n[doc-arg-ptr] > 1) \
. doc-print-and-reset
. el \
. doc-reset-args
. \}
. el \{\
. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
. \" skip `Sm' argument
. nr doc-arg-ptr +1
. doc-print-recursive
. \}
. el \
. doc-reset-args
..
.
.
@@ -2501,7 +2512,9 @@
. nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
.
. nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
. nr doc-curr-font \n[.f]
. nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
. nr doc-curr-size \n[.ps]
. nr doc-fontmode-depth -1
. \}
. el \
@@ -5144,6 +5157,10 @@
. ie \n[.$] \
. tm Usage: .Re (does not take arguments) (#\n[.c])
. el \{\
. if !\n[doc-is-reference] \{\
. tm mdoc warning: Extraneous .Re (#\n[.c])
. return
. \}
. doc-print-reference
. doc-reset-reference
. nr doc-is-reference 0
@@ -5222,7 +5239,7 @@
.\" NS doc-reference-count
.
.de doc-finish-reference
. nr doc-reference-count -1
. nr doc-reference-count -\$1
. ie \n[doc-reference-count] \
. nop \),
. el \
@@ -5252,81 +5269,81 @@
. chop doc-reference-title-name-for-book
. ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
. nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
. doc-finish-reference
. doc-finish-reference \n[doc-reference-title-count]
. \}
. el \{\
. nop \*[doc-reference-title-name]\c
. doc-finish-reference
. doc-finish-reference \n[doc-reference-title-count]
. \}\}
.
. if \n[doc-book-count] \{\
. unformat doc-book-name
. chop doc-book-name
. nop \*[doc-book-name]\c
. doc-finish-reference
. doc-finish-reference \n[doc-book-count]
. \}
.
. if \n[doc-publisher-count] \{\
. unformat doc-publisher-name
. chop doc-publisher-name
. nop \*[doc-publisher-name]\c
. doc-finish-reference
. doc-finish-reference \n[doc-publisher-count]
. \}
.
. if \n[doc-journal-count] \{\
. unformat doc-journal-name
. chop doc-journal-name
. nop \*[doc-journal-name]\c
. doc-finish-reference
. doc-finish-reference \n[doc-journal-count]
. \}
.
. if \n[doc-report-count] \{\
. unformat doc-report-name
. chop doc-report-name
. nop \*[doc-report-name]\c
. doc-finish-reference
. doc-finish-reference \n[doc-report-count]
. \}
.
. if \n[doc-issue-count] \{\
. unformat doc-issue-name
. chop doc-issue-name
. nop \*[doc-issue-name]\c
. doc-finish-reference
. doc-finish-reference \n[doc-issue-count]
. \}
.
. if \n[doc-volume-count] \{\
. unformat doc-volume-name
. chop doc-volume-name
. nop \*[doc-volume-name]\c
. doc-finish-reference
. doc-finish-reference \n[doc-volume-count]
. \}
.
. if \n[doc-page-number-count] \{\
. unformat doc-page-number-string
. chop doc-page-number-string
. nop \*[doc-page-number-string]\c
. doc-finish-reference
. doc-finish-reference \n[doc-page-number-count]
. \}
.
. if \n[doc-corporate-count] \{\
. unformat doc-corporate-name
. chop doc-corporate-name
. nop \*[doc-corporate-name]\c
. doc-finish-reference
. doc-finish-reference \n[doc-corporate-count]
. \}
.
. if \n[doc-date-count] \{\
. unformat doc-date
. chop doc-date
. nop \*[doc-date]\c
. doc-finish-reference
. doc-finish-reference \n[doc-date-count]
. \}
.
. if \n[doc-optional-count] \{\
. unformat doc-optional-string
. chop doc-optional-string
. nop \*[doc-optional-string]\c
. doc-finish-reference
. doc-finish-reference \n[doc-optional-count]
. \}
.
. if \n[doc-reference-count] \
@@ -6156,7 +6173,7 @@
. \}\}\}
. el \{\
. tm1 "Usage: .An {-nosplit | -split}
. tm1 .An author_name ... (#\n[.c])
. tm1 " .An author_name ... (#\n[.c])
. \}\}
.
. if \n[doc-in-authors-section] \{\
+2 -2
View File
@@ -1677,8 +1677,6 @@ and their results are:
.Lb libcurses
.It Li libedit
.Lb libedit
.It Li libedit
.Lb libedit
.It Li libevent
.Lb libevent
.It Li libform
@@ -1701,6 +1699,8 @@ and their results are:
.Lb libmenu
.It Li libossaudio
.Lb libossaudio
.It Li libpam
.Lb libpam
.It Li libpcap
.Lb libpcap
.It Li libpci
+8 -1
View File
@@ -118,11 +118,18 @@ int main FUNCTION((argc, argv), int argc AND char *argv[])
struct opie opie;
int rval, n = 499, i, mode = MODE_DEFAULT, force = 0;
char seed[OPIE_SEED_MAX+1];
char *username;
uid_t ruid;
struct passwd *pp;
memset(seed, 0, sizeof(seed));
if (!(pp = getpwnam(getlogin()))) {
ruid = getuid();
username = getlogin();
pp = getpwnam(username);
if (username == NULL || pp == NULL || pp->pw_uid != ruid)
pp = getpwuid(ruid);
if (pp == NULL) {
fprintf(stderr, "Who are you?");
return 1;
}
+73 -139
View File
@@ -1,4 +1,4 @@
# $Id: CACerts,v 8.1 2004/03/01 22:05:47 ca Exp $
# $Id: CACerts,v 8.3 2007/06/11 22:04:46 ca Exp $
# This file contains some CA certificates that are used to sign the
# certificates of mail servers of members of the sendmail consortium
# who may reply to questions etc sent to sendmail.org.
@@ -73,73 +73,6 @@ iTMZxC4pWjmnDueb0kzHuX1qPrQAg4bTFij9rVVlYE4UAkbT
-----END CERTIFICATE-----
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 0 (0x0)
Signature Algorithm: md5WithRSAEncryption
Issuer: C=US, ST=California, L=Emeryville, O=gshapiro.net, CN=Certificate Authority/[email protected]
Validity
Not Before: Jan 1 04:39:54 2002 GMT
Not After : Dec 31 04:39:54 2006 GMT
Subject: C=US, ST=California, L=Emeryville, O=gshapiro.net, CN=Certificate Authority/[email protected]
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
00:aa:dd:a2:fe:3b:fa:2f:5c:3d:f1:e1:d4:1d:55:
04:27:6b:01:62:00:d7:02:cb:74:47:69:84:d7:c6:
c5:71:55:79:35:3a:a8:ce:de:48:23:53:80:3c:cd:
54:2e:e9:fe:b1:76:5a:be:cb:fd:2d:dc:a3:36:c5:
c7:1e:4e:ef:76:f0:55:8f:a0:a5:f8:07:c5:52:1d:
a2:42:81:4d:8a:c8:42:3f:f3:01:80:f9:46:35:a6:
bc:c0:9b:9f:33:8b:49:9b:1d:87:8f:19:48:15:21:
23:57:df:6e:4d:03:ed:ae:9f:0b:91:b7:a9:47:66:
f1:0d:1b:1c:5d:b4:57:60:c7
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
A0:6D:E0:06:AF:61:94:B4:C6:84:15:B4:8B:74:22:67:4A:43:60:CA
X509v3 Authority Key Identifier:
keyid:A0:6D:E0:06:AF:61:94:B4:C6:84:15:B4:8B:74:22:67:4A:43:60:CA
DirName:/C=US/ST=California/L=Emeryville/O=gshapiro.net/CN=Certificate Authority/[email protected]
serial:00
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: md5WithRSAEncryption
87:27:d2:2a:3a:dc:04:cd:ef:e8:7b:1c:34:47:2e:13:34:a5:
08:f9:4d:df:d8:e1:6d:e6:9a:db:38:ee:20:6d:4a:ae:6f:1e:
bc:71:61:a4:b4:d6:40:24:ee:65:ca:e9:81:5a:ef:ee:62:57:
70:05:46:91:6b:d0:c6:a6:e9:38:65:ae:ea:50:b3:5c:27:c4:
7a:bd:95:8c:cb:45:ef:fc:fc:99:e5:6a:61:c3:44:77:d8:1f:
d6:b4:17:44:15:9a:bc:26:5b:ec:4e:29:5d:fd:cf:61:f3:be:
91:a4:3b:51:e6:73:5b:17:82:9d:5a:56:2c:63:c2:f1:d6:a2:
4c:5a
-----BEGIN CERTIFICATE-----
MIIDoTCCAwqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBmDELMAkGA1UEBhMCVVMx
EzARBgNVBAgTCkNhbGlmb3JuaWExEzARBgNVBAcTCkVtZXJ5dmlsbGUxFTATBgNV
BAoTDGdzaGFwaXJvLm5ldDEeMBwGA1UEAxMVQ2VydGlmaWNhdGUgQXV0aG9yaXR5
MSgwJgYJKoZIhvcNAQkBFhljZXJ0aWZpY2F0ZXNAZ3NoYXBpcm8ubmV0MB4XDTAy
MDEwMTA0Mzk1NFoXDTA2MTIzMTA0Mzk1NFowgZgxCzAJBgNVBAYTAlVTMRMwEQYD
VQQIEwpDYWxpZm9ybmlhMRMwEQYDVQQHEwpFbWVyeXZpbGxlMRUwEwYDVQQKEwxn
c2hhcGlyby5uZXQxHjAcBgNVBAMTFUNlcnRpZmljYXRlIEF1dGhvcml0eTEoMCYG
CSqGSIb3DQEJARYZY2VydGlmaWNhdGVzQGdzaGFwaXJvLm5ldDCBnzANBgkqhkiG
9w0BAQEFAAOBjQAwgYkCgYEAqt2i/jv6L1w98eHUHVUEJ2sBYgDXAst0R2mE18bF
cVV5NTqozt5II1OAPM1ULun+sXZavsv9LdyjNsXHHk7vdvBVj6Cl+AfFUh2iQoFN
ishCP/MBgPlGNaa8wJufM4tJmx2HjxlIFSEjV99uTQPtrp8LkbepR2bxDRscXbRX
YMcCAwEAAaOB+DCB9TAdBgNVHQ4EFgQUoG3gBq9hlLTGhBW0i3QiZ0pDYMowgcUG
A1UdIwSBvTCBuoAUoG3gBq9hlLTGhBW0i3QiZ0pDYMqhgZ6kgZswgZgxCzAJBgNV
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRMwEQYDVQQHEwpFbWVyeXZpbGxl
MRUwEwYDVQQKEwxnc2hhcGlyby5uZXQxHjAcBgNVBAMTFUNlcnRpZmljYXRlIEF1
dGhvcml0eTEoMCYGCSqGSIb3DQEJARYZY2VydGlmaWNhdGVzQGdzaGFwaXJvLm5l
dIIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAIcn0io63ATN7+h7
HDRHLhM0pQj5Td/Y4W3mmts47iBtSq5vHrxxYaS01kAk7mXK6YFa7+5iV3AFRpFr
0Mam6ThlrupQs1wnxHq9lYzLRe/8/JnlamHDRHfYH9a0F0QVmrwmW+xOKV39z2Hz
vpGkO1Hmc1sXgp1aVixjwvHWokxa
-----END CERTIFICATE-----
Certificate:
Data:
Version: 3 (0x2)
@@ -210,93 +143,94 @@ xBJlUbs98fcltM0L9lt6YSWtBgoBVdxxBSkNc+kwUb7T4bKJ/A8o9wZ1lhs0deAH
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 0 (0x0)
Serial Number:
fa:7c:2c:80:29:3f:c2:64
Signature Algorithm: md5WithRSAEncryption
Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2003/emailAddress=ca+ca-rsa2003@esmtp.org
Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org
Validity
Not Before: Aug 7 15:56:45 2003 GMT
Not After : Aug 6 15:56:45 2006 GMT
Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2003/emailAddress=ca+ca-rsa2003@esmtp.org
Not Before: May 4 02:07:56 2007 GMT
Not After : May 3 02:07:56 2010 GMT
Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (2048 bit)
Modulus (2048 bit):
00:aa:37:0f:09:a9:1c:e3:1a:0c:fe:bd:6c:37:a4:
cf:87:db:af:6b:b4:19:d4:11:db:c6:56:ca:39:80:
c6:a4:38:b0:bc:ac:7e:be:71:30:86:2c:dc:fa:b5:
fd:58:23:a0:c1:ad:11:53:85:ca:fb:e6:d8:7e:28:
eb:84:3b:cd:a3:fa:28:a5:cb:c7:b2:54:99:3e:40:
2a:27:43:4b:0c:26:4b:af:97:3d:92:82:d9:eb:2c:
7f:77:fd:b8:cd:7e:1e:04:81:17:3c:e2:44:68:ce:
88:66:02:90:24:35:24:c4:4c:ad:77:04:1a:3a:d5:
59:28:28:03:da:03:9d:f4:2e:52:6e:b5:36:96:4b:
14:f8:fc:8e:c6:d3:9b:e2:80:90:8b:71:d7:d0:5c:
43:b2:49:f1:5a:26:f3:5d:9e:3b:01:98:db:e3:ed:
5e:8d:dd:cf:aa:68:9d:0b:c9:e2:4e:fc:16:44:72:
93:07:62:18:05:c1:47:81:3c:3d:e4:e4:22:da:2c:
d6:4a:44:52:06:7a:83:b5:e9:52:38:97:2f:75:a6:
5c:6f:87:8a:8d:83:f4:d0:04:a5:34:18:5e:a1:06:
16:b3:54:ce:64:47:ca:70:56:a3:6f:b9:7f:af:91:
76:78:70:b4:ab:ae:8e:d5:22:26:57:b1:ba:e7:4b:
18:21
00:b0:28:91:31:af:82:ce:72:ef:36:ab:7d:e9:b1:
f5:77:66:38:4b:38:1f:5f:3d:12:d3:c8:fd:9a:f4:
d4:f6:b8:90:f9:26:5f:29:f7:43:f9:34:ec:65:62:
01:bb:64:f1:5d:ea:75:04:3d:92:65:60:a2:06:62:
fa:88:ca:d8:20:50:c8:1e:38:53:b5:18:dd:b7:bd:
c7:08:35:4c:d9:dc:c6:97:56:37:b6:65:33:74:5a:
b2:c3:85:08:2b:b7:26:70:ff:38:02:1a:67:6a:d0:
49:18:10:4b:f8:db:af:06:9c:b1:a8:82:a1:b1:75:
d2:52:9b:53:0c:ca:a7:e3:15:38:79:6d:a1:f5:ef:
7c:8b:fd:bd:04:78:f9:e8:1e:b9:92:ea:74:d7:45:
1e:4c:c8:bd:f4:5c:fc:1a:7f:e7:31:c6:ab:cb:78:
c7:4d:2f:b5:72:10:35:27:4a:1a:fa:53:19:f8:a7:
59:63:eb:e9:15:ab:dc:71:69:8c:42:1c:96:4e:89:
80:66:c9:9e:21:d5:3d:08:19:74:a5:f5:07:a0:ae:
de:79:af:fd:42:c2:79:7e:8c:f8:39:22:3b:c3:c4:
58:3b:d0:0d:e6:a9:11:b6:a2:cd:2e:e5:16:66:fd:
7e:65:33:94:b0:36:80:27:f5:80:76:a9:e5:df:f2:
cf:ef
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
3A:12:03:DB:0F:9E:28:45:A6:34:8D:38:AB:BA:47:8C:2A:A0:E4:2E
B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C
X509v3 Authority Key Identifier:
keyid:3A:12:03:DB:0F:9E:28:45:A6:34:8D:38:AB:BA:47:8C:2A:A0:E4:2E
DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2003/emailAddress=ca+ca-rsa2003@esmtp.org
serial:00
keyid:B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C
DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org
serial:FA:7C:2C:80:29:3F:C2:64
X509v3 Basic Constraints:
CA:TRUE
CA:TRUE
X509v3 Subject Alternative Name:
email:ca+ca-rsa2003@esmtp.org
email:ca+ca-rsa2007@esmtp.org
X509v3 Issuer Alternative Name:
email:ca+ca-rsa2003@esmtp.org
email:ca+ca-rsa2007@esmtp.org
Signature Algorithm: md5WithRSAEncryption
96:83:b6:54:93:df:38:d0:48:a7:a1:c8:08:c9:0f:e9:80:05:
e3:7e:c3:61:51:88:7b:7a:bb:24:b0:69:a3:22:e4:98:38:da:
c8:c3:eb:52:70:63:e2:66:f2:59:ef:56:be:aa:7c:87:6e:94:
85:d4:71:ba:35:f7:ee:d0:6e:52:1d:1f:e4:fd:2f:e2:70:31:
5d:b7:8b:13:cc:70:10:21:fa:34:29:8f:8d:d8:4a:c7:0f:b2:
36:e7:1e:1e:46:d1:11:84:80:7c:bb:24:c4:63:be:2a:24:53:
74:0c:89:e0:6a:f4:08:63:bf:54:d3:0a:d9:fc:fe:6c:de:4f:
97:61:08:a0:10:92:eb:af:06:ec:50:86:c4:cc:6b:31:32:60:
25:7a:09:47:f8:42:7a:a2:d5:90:fa:48:be:bf:0a:e1:03:b8:
56:24:b9:12:e9:ba:09:30:47:be:a5:8e:a2:92:a4:dc:a6:a7:
c6:29:39:65:6e:64:4a:1b:b2:c3:07:29:f5:c0:7e:78:e0:22:
9b:98:d4:87:91:ca:e1:66:9d:2f:70:f1:4c:a5:8e:2e:68:52:
b3:bd:95:76:56:40:0e:46:47:e4:b3:ec:aa:3c:e8:86:96:5a:
ed:fa:c9:10:95:53:04:13:71:01:91:ce:cd:3a:51:c6:30:e9:
48:49:64:a3
98:98:7c:d3:d0:5b:72:47:15:e6:22:68:bb:78:0e:78:66:e9:
56:16:d8:bc:9d:5a:dc:27:29:fb:91:2d:6a:21:35:18:56:b4:
4f:2a:09:c0:08:6f:9a:59:2b:2e:72:9a:fb:50:ba:c7:a9:91:
a0:f9:6c:be:cf:78:42:43:02:70:53:97:ba:6a:e3:da:17:e8:
1f:c7:3a:5b:e7:bc:eb:e5:24:4c:f5:cf:61:34:1e:20:ed:17:
63:ef:81:d3:9e:25:fe:cc:05:19:cc:8a:82:c9:4c:3a:b5:6b:
49:51:76:46:02:aa:60:bb:c4:b9:61:48:33:da:79:8d:46:a3:
06:20:98:f3:b2:db:3b:ad:c9:1d:0e:97:3d:b7:14:19:d3:7d:
04:8b:6a:81:e0:11:5b:e1:35:a3:ff:2f:11:86:1c:31:85:7a:
fd:3f:36:ef:99:25:46:2e:b0:cb:43:45:4a:ec:be:d3:3f:a4:
77:9b:79:cc:ce:92:63:a5:d9:ed:db:a0:9d:5d:7c:d7:80:f6:
c9:41:fb:02:96:8e:fd:f3:da:05:9d:81:a7:25:da:26:35:3b:
a9:0c:8c:f5:a7:5d:48:ec:87:c7:7a:60:51:76:f2:de:9b:14:
2b:55:8a:43:df:99:19:f3:eb:e7:03:e6:a7:a2:a2:28:dd:d5:
07:6a:3f:f7
-----BEGIN CERTIFICATE-----
MIIFFzCCA/+gAwIBAgIBADANBgkqhkiG9w0BAQQFADCBpTELMAkGA1UEBhMCVVMx
EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRQwEgYDVQQK
EwtFbmRtYWlsIE9yZzEMMAoGA1UECxMDTVRBMSIwIAYDVQQDExlDbGF1cyBBc3Nt
YW5uIENBIFJTQSAyMDAzMSYwJAYJKoZIhvcNAQkBFhdjYStjYS1yc2EyMDAzQGVz
bXRwLm9yZzAeFw0wMzA4MDcxNTU2NDVaFw0wNjA4MDYxNTU2NDVaMIGlMQswCQYD
MIIFJzCCBA+gAwIBAgIJAPp8LIApP8JkMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD
VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIQmVya2VsZXkx
FDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNNVEExIjAgBgNVBAMTGUNs
YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDMxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz
YTIwMDNAZXNtdHAub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
qjcPCakc4xoM/r1sN6TPh9uva7QZ1BHbxlbKOYDGpDiwvKx+vnEwhizc+rX9WCOg
wa0RU4XK++bYfijrhDvNo/oopcvHslSZPkAqJ0NLDCZLr5c9koLZ6yx/d/24zX4e
BIEXPOJEaM6IZgKQJDUkxEytdwQaOtVZKCgD2gOd9C5SbrU2lksU+PyOxtOb4oCQ
i3HX0FxDsknxWibzXZ47AZjb4+1ejd3PqmidC8niTvwWRHKTB2IYBcFHgTw95OQi
2izWSkRSBnqDtelSOJcvdaZcb4eKjYP00ASlNBheoQYWs1TOZEfKcFajb7l/r5F2
eHC0q66O1SImV7G650sYIQIDAQABo4IBTjCCAUowHQYDVR0OBBYEFDoSA9sPnihF
pjSNOKu6R4wqoOQuMIHSBgNVHSMEgcowgceAFDoSA9sPnihFpjSNOKu6R4wqoOQu
oYGrpIGoMIGlMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8G
A1UEBxMIQmVya2VsZXkxFDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNN
VEExIjAgBgNVBAMTGUNsYXVzIEFzc21hbm4gQ0EgUlNBIDIwMDMxJjAkBgkqhkiG
9w0BCQEWF2NhK2NhLXJzYTIwMDNAZXNtdHAub3JnggEAMAwGA1UdEwQFMAMBAf8w
IgYDVR0RBBswGYEXY2ErY2EtcnNhMjAwM0Blc210cC5vcmcwIgYDVR0SBBswGYEX
Y2ErY2EtcnNhMjAwM0Blc210cC5vcmcwDQYJKoZIhvcNAQEEBQADggEBAJaDtlST
3zjQSKehyAjJD+mABeN+w2FRiHt6uySwaaMi5Jg42sjD61JwY+Jm8lnvVr6qfIdu
lIXUcbo19+7QblIdH+T9L+JwMV23ixPMcBAh+jQpj43YSscPsjbnHh5G0RGEgHy7
JMRjviokU3QMieBq9Ahjv1TTCtn8/mzeT5dhCKAQkuuvBuxQhsTMazEyYCV6CUf4
Qnqi1ZD6SL6/CuEDuFYkuRLpugkwR76ljqKSpNymp8YpOWVuZEobssMHKfXAfnjg
IpuY1IeRyuFmnS9w8Uylji5oUrO9lXZWQA5GR+Sz7Ko86IaWWu36yRCVUwQTcQGR
zs06UcYw6UhJZKM=
YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDcxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz
YTIwMDdAZXNtdHAub3JnMB4XDTA3MDUwNDAyMDc1NloXDTEwMDUwMzAyMDc1Nlow
gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhC
ZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAKBgNVBAsTA01UQTEiMCAG
A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEmMCQGCSqGSIb3DQEJARYX
Y2ErY2EtcnNhMjAwN0Blc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQCwKJExr4LOcu82q33psfV3ZjhLOB9fPRLTyP2a9NT2uJD5Jl8p90P5
NOxlYgG7ZPFd6nUEPZJlYKIGYvqIytggUMgeOFO1GN23vccINUzZ3MaXVje2ZTN0
WrLDhQgrtyZw/zgCGmdq0EkYEEv4268GnLGogqGxddJSm1MMyqfjFTh5baH173yL
/b0EePnoHrmS6nTXRR5MyL30XPwaf+cxxqvLeMdNL7VyEDUnShr6Uxn4p1lj6+kV
q9xxaYxCHJZOiYBmyZ4h1T0IGXSl9Qegrt55r/1Cwnl+jPg5IjvDxFg70A3mqRG2
os0u5RZm/X5lM5SwNoAn9YB2qeXf8s/vAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU
sklrUkXukDbSeUcDM9mguoBQ2hwwgdoGA1UdIwSB0jCBz4AUsklrUkXukDbSeUcD
M9mguoBQ2hyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
bmlhMREwDwYDVQQHEwhCZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAK
BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEm
MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwN0Blc210cC5vcmeCCQD6fCyAKT/C
ZDAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAu
b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAub3JnMA0GCSqGSIb3
DQEBBAUAA4IBAQCYmHzT0FtyRxXmImi7eA54ZulWFti8nVrcJyn7kS1qITUYVrRP
KgnACG+aWSsucpr7ULrHqZGg+Wy+z3hCQwJwU5e6auPaF+gfxzpb57zr5SRM9c9h
NB4g7Rdj74HTniX+zAUZzIqCyUw6tWtJUXZGAqpgu8S5YUgz2nmNRqMGIJjzsts7
rckdDpc9txQZ030Ei2qB4BFb4TWj/y8RhhwxhXr9PzbvmSVGLrDLQ0VK7L7TP6R3
m3nMzpJjpdnt26CdXXzXgPbJQfsClo7989oFnYGnJdomNTupDIz1p11I7IfHemBR
dvLemxQrVYpD35kZ8+vnA+anoqIo3dUHaj/3
-----END CERTIFICATE-----
+8 -4
View File
@@ -1,6 +1,6 @@
$FreeBSD$
sendmail 8.13.1
sendmail 8.14.2
originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/
For the import of sendmail, the following files were removed:
@@ -21,9 +21,13 @@ The following directories were renamed:
Imported using:
cvs import -m 'Import sendmail 8.13.1' \
src/contrib/sendmail SENDMAIL v8_13_1
cvs import -m 'Import sendmail 8.14.2' \
src/contrib/sendmail SENDMAIL v8_14_2
After importing, bump the version of src/etc/sendmail/freebsd*mc
so mergemaster will merge /etc/mail/freebsd*cf:
cvs commit -f src/etc/sendmail/freebsd*mc
To make local changes to sendmail, simply patch and commit to the main
branch (aka HEAD). Never make local changes on the vendor (SENDMAIL)
@@ -93,4 +97,4 @@ infrastructure in FreeBSD:
usr.sbin/mailwrapper/Makefile
[email protected]
31-July-2004
11-November-2007
+7 -7
View File
@@ -12,13 +12,13 @@ sendmail/SECURITY for more installation information.
2. Create any necessary site configuration build files, as noted in
devtools/Site/README.
3. In the sendmail/ directory, run "sh Build" (see sendmail/README for
3. In the sendmail/ directory, run "sh ./Build" (see sendmail/README for
details).
4. Change to the cf/cf/ directory (that's not a typo): Copy whichever .mc
file best matches your environment to sendmail.mc. Next, tailor it
as explained in cf/README. Then run
"sh Build sendmail.cf".
"sh ./Build sendmail.cf".
5. Back up your current /etc/mail/sendmail.cf and the sendmail binary (whose
location varies from operating system to operating system, but is usually
@@ -26,21 +26,21 @@ sendmail/SECURITY for more installation information.
6. Install sendmail.cf as /etc/mail/sendmail.cf and submit.cf as
/etc/mail/submit.cf. This can be done in the cf/cf by using
"sh Build install-cf".
"sh ./Build install-cf".
Please read sendmail/SECURITY before continuing; you have to create a
new user smmsp and a new group smmsp for the default installation.
Then install the sendmail binary built in step 3 by cd-ing back to
sendmail/ and running "sh Build install".
sendmail/ and running "sh ./Build install".
7. For each of the associated sendmail utilities (makemap, mailstats,
etc.), read the README in the utility's directory if it exists. When
you are ready to install it, back up your installed version and type "sh
Build install".
you are ready to install it, back up your installed version and type
"sh ./Build install".
8. If you are upgrading from an older version of sendmail and are using any
database maps, be sure to rebuild them with the new version of makemap,
in case you are now using a different (and thereby incompatible) version
of Berkeley DB.
$Revision: 8.15 $, Last updated $Date: 2002/05/28 18:09:25 $
$Revision: 8.16 $, Last updated $Date: 2007/10/03 21:00:28 $
+14 -8
View File
@@ -29,10 +29,10 @@ This list is not guaranteed to be complete.
* Null bytes are not handled properly in headers.
Sendmail should handle full binary data. As it stands, it handles
all values in the body, but only 0x01-0x80 and 0xA0-0xFF in
the header. Notably missing is 0x00, which would require a major
restructuring of the code -- for example, almost no C library support
could be used to handle strings.
all values in the body, but not 0x00 in the header. Changing
this would require a major restructuring of the code -- for
example, almost no C library support could be used to handle
strings.
* Header checks are not called if header value is too long or empty.
@@ -41,6 +41,12 @@ This list is not guaranteed to be complete.
characters then no header check is done even if one is configured for
the header.
* Header lines which are too long will be split incorrectly.
Header lines which are longer than 2045 characters will be split
but some characters might be lost. Fix: obey RFC (2)822 and do not
send lines that are longer than 1000 characters.
* Sender addresses whose domain part cause a temporary A record lookup
failure but have a valid MX record will be temporarily rejected in
the default configuration. Solution: fix the DNS at the sender side.
@@ -164,7 +170,7 @@ Kresolve sequence dnsmx canon
When sendmail is doing 8->7 bit MIME conversions, and the message
contains certain MIME body types that cannot be converted to 7-bit,
sendmail will strip the message to 7-bit.
sendmail will pass the message as 8-bit.
* 7->8 bit MIME conversion
@@ -229,9 +235,9 @@ Kresolve sequence dnsmx canon
Sendmail will deliver to a fail if the file is owned by the DefaultUser
or has the set-user-ID bit set. Unfortunately, some systems clear that bit
when a file is modified. Sendmail compensates by resetting the file mode
when a file is modified. Sendmail compensates by resetting the file mode
back to it's original settings. Unfortunately, there's still a
permission failure race as sendmail checks the permissions before locking
permission failure race as sendmail checks the permissions before locking
the file. This is unavoidable as sendmail must verify the file is safe
to open before opening it. A file can not be locked until it is open.
@@ -241,4 +247,4 @@ Kresolve sequence dnsmx canon
be used if set instead of LOCAL_RELAY ($R). This will be fixed in a
future version.
$Revision: 8.56 $, Last updated $Date: 2002/12/18 22:39:06 $
$Revision: 8.59 $, Last updated $Date: 2007/02/21 23:13:58 $
+1265 -558
View File
File diff suppressed because it is too large. Load diff
+6 -5
View File
@@ -3,17 +3,18 @@
This directory has the latest sendmail(TM) software from Sendmail, Inc.
Report any bugs to sendmail-bugs@sendmail.ORG
Report any bugs to sendmail-bugs-YYYY@support.sendmail.org
where YYYY is the current year, e.g., 2005.
There is a web site at http://WWW.Sendmail.ORG/ -- see that site for
There is a web site at http://www.sendmail.org/ -- see that site for
the latest updates.
+--------------+
| INTRODUCTION |
+--------------+
0. The vast majority of queries to <sendmail[email protected]>
are answered in the README files noted below.
0. The vast majority of queries about sendmail are answered in the
README files noted below.
1. Read this README file, especially this introduction, and the DIRECTORY
PERMISSIONS sections.
@@ -463,4 +464,4 @@ sendmail Source for the sendmail program itself.
test Some test scripts (currently only for compilation aids).
vacation Source for the vacation program. NOT PART OF SENDMAIL!
$Revision: 8.91 $, Last updated $Date: 2002/11/09 23:33:07 $
$Revision: 8.93 $, Last updated $Date: 2005/09/16 20:08:50 $
+634 -3
View File
@@ -1,11 +1,642 @@
SENDMAIL RELEASE NOTES
$Id: RELEASE_NOTES,v 8.1679 2004/07/30 18:03:07 ca Exp $
$Id: RELEASE_NOTES,v 8.1909 2007/10/31 16:04:13 ca Exp $
This listing shows the version of the sendmail binary, the version
of the sendmail configuration files, the date of release, and a
summary of the changes in that release.
8.14.2/8.14.2 2007/11/01
If a message was queued and it contained 8 bit characters in
a From: or To: header, then those characters could be
"mistaken" for internal control characters during a queue
run and trigger various consistency checks. Problem
noted by Neil Rickert of Northern Illinois University.
If MaxMimeHeaderLength is set to a value greater than 0 (which
it is by default) then even if the Linelimit parameter
is 0, sendmail corrupted in the non-transfer-encoding
case every MAXLINE-1 characters. Patch from John Gardiner
Myers of Proofpoint.
Setting the suboption DeliveryMode for DaemonPortOptions did not
work in earlier 8.14 versions.
Note: DeliveryMode=interactive is silently converted to
background if a milter can reject or delete a recipient.
Prior to 8.14 this happened only if milter could delete
recipients.
ClientRate should trigger when the limit was exceeded (as
documented), not when it was reached. Patch from
John Beck of Sun Microsystems.
Force a queue run for -qGqueuegroup even if no runners are
specified (R=0) and forking (F=f) is requested.
When multiple results are requested for a DNS map lookup
(-z and -Z), return only those that are relevant for
the query (not also those in the "additional section".)
If the message transfer time to sendmail (when acting as server)
exceeds Timeout.queuewarn or Timeout.queuereturn and
the message is refused (by a milter), sendmail previously
created a delivery status notification (DSN). Patch
from Doug Heath of The Hertz Corporation.
A code change in Cyrus-SASL 2.1.22 for sasl_decode64() requires
the MTA to deal with some input (i.e., "=") itself.
Problem noted by Eliot Lear.
sendmail counted a delivery as successful if PIPELINING is
compiled in but not offered by the server and the
delivery failed temporarily. Patch from Werner Wiethege.
If getting the result of an LDAP query times out then close the
map so it will be reopened on the next lookup. This
should help "failover" configurations that specify more
than one LDAP server.
If check_compat returns $#discard then a "savemail panic" could
be triggered under some circumstances (e.g., requiring
a system which does not have the compile time flag
HASFLOCK set). Based on patch by Motonori Nakamura
of National Institute of Informatics, Japan.
If a milter rejected a recipient, the count for nrcpts= in the
logfile entry might have been wrong. Problem found by
Petra Humann of TU Dresden.
If a milter invoked smfi_chgfrom() where ESMTP arguments are not
NULL, the message body was lost. Patch from Motonori
Nakamura of National Institute of Informatics, Japan.
sendmail(8) had a bogus space in -qGname. Patch from Peng Haitao.
CONTRIB: buildvirtuser: Preserve ownership and permissions when
replacing files.
CONTRIB: buildvirtuser: Skip dot-files (e.g., .cvsignore) when
reading the /etc/mail/virtusers/ directory.
CONTRIB: buildvirtuser: Emit warnings instead of exiting where
appropriate.
LIBMILTER: Fix ABI backwards compatibility so milters compiled
against an older libmilter.so shared library can use an
8.14 libmilter.so shared library.
LIBMILTER: smfi_version() did not properly extract the patchlevel
from the version number, however, the returned value was
correct for the current libmilter version.
8.14.1/8.14.1 2007/04/03
Even though a milter rejects a recipient the MTA will still keep
it in its list of recipients and deliver to it if the
transaction is accepted. This is a regression introduced
in 8.14.0 due to the change for SMFIP_RCPT_REJ. Bug
found by Andy Fiddaman.
The new DaemonPortOptions which begin with a lower case character
could not be set in 8.14.0.
If a server shut down the connection in response to a STARTTLS
command, sendmail would log a misleading error message
due to an internal inconsistency. Problem found by
Werner Wiethege.
Document how some sendmail.cf options change the behavior of mailq.
Noted by Paul Menchini of the North Carolina School of
Science and Mathematics.
CONFIG: Add confSOFT_BOUNCE m4 option for setting SoftBounce.
CONFIG: 8.14.0's RELEASE_NOTES failed to mention the addition
of the confMAX_NOOP_COMMANDS and confSHARED_MEMORY_KEY_FILE
m4 options for setting MaxNOOPCommands and
SharedMemoryKeyFile.
CONFIG: Add confMILTER_MACROS_EOH and confMILTER_MACROS_DATA m4
options for setting Milter.macros.eoh and Milter.macros.data.
CONTRIB: Use flock() and fcntl() in qtool.pl if necessary.
Patch from Daniel Carroll of Mesa State College.
LIBMILTER: Make sure an unknown command does not affect the
currently available macros. Problem found by Andy Fiddaman.
LIBMILTER: The MTA did not offer SMFIF_SETSYMLIST during option
negotiation. Problem reported by Bryan Costales.
LIBMILTER: Fix several minor errors in the documentation.
Patches from Bryan Costales.
PORTABILITY FIXES:
AIX 5.{1,2}: libsm/util.c failed to compile due to
redefinition of several macros, e.g., SIG_ERR.
Patch from Jim Pirzyk with assistance by Bob
Booth, University of Illinois at Urbana-Champaign.
Add support for QNX.6. Patch from Sean Boudreau of QNX
Software Systems.
New Files:
devtools/M4/depend/QNX6.m4
devtools/OS/QNX.6.x
include/sm/os/sm_os_qnx.h
New Files added in 8.14.0, but not shown in the release notes entry:
libmilter/docs/smfi_chgfrom.html
libmilter/docs/smfi_version.html
8.14.0/8.14.0 2007/01/31
Header field values are now 8 bit clean. Notes:
- header field names are still restricted to 7 bit.
- RFC 2822 allows only 7 bit (US-ASCII) characters in
headers.
Preserve spaces after the colon in a header. Previously, any
number of spaces after the colon would be changed to
exactly one space.
In some cases of deeply nested aliases/forwarding, mail can
be silently lost. Moreover, the MaxAliasRecursion
limit may be reached too early, e.g., the counter
may be off by a factor of 4 in case of a sequence of
.forward files that refer to others. Patch from
Motonori Nakamura of Kyoto University.
Fix a regression in 8.13.8: if InputMailFilters is set then
"sendmail -bs" can trigger an assertion because the
hostname of the client is undefined. It is now set
to "localhost" for the xxfi_connect() callback.
Avoid referencing a freed variable during cleanup when terminating.
Problem reported and diagnosed by Joe Maimon.
New option HeloName to set the name for the HELO/EHLO command.
Patch from Nik Clayton.
New option SoftBounce to issue temporary errors (4xy) instead of
permanent errors (5xy). This can be useful for testing.
New suboptions for DaemonPortOptions to set them individually
per daemon socket:
DeliveryMode DeliveryMode
refuseLA RefuseLA
delayLA DelayLA
queueLA QueueLA
children MaxDaemonChildren
New option -K for LDAP maps to replace %1 through %9 in the
lookup key with the LDAP escaped contents of the
arguments specified in the map lookup. Loosely based
on patch from Wolfgang Hottgenroth.
Log the time after which a greet_pause delay triggered. Patch
from Nik Clayton.
If a client is rejected via TCP wrapper or some other check
performed by validate_connection() (in conf.c) then do
not also invoke greet_pause. Problem noted by Jim Pirzyk
of the University of Illinois at Urbana-Champaign.
If a client terminates the SMTP connection during a pause
introduced by greet_pause, then a misleading message
was logged previously. Problem noted by Vernon Schryver
et.al., patch from Matej Vela.
New command "mstat" for control socket to provide "machine
readable" status.
New named config file rule check_eom which is called at the end
of a message, its parameter is the size of the message.
If the macro {addr_type} indicates that the current address
is a header address it also distinguishes between
recipient and sender addresses (as it is done for
envelope addresses).
When a macro is set in check_relay, then its value is accessible
by all transactions in the same SMTP session.
Increase size of key for ldap lookups to 1024 (MAXKEY).
New option MaxNOOPCommands to override default of 20 for the
number of "useless" commands before the SMTP server will
slow down responding.
New option SharedMemoryKeyFile: if shared memory support is
enabled, the MTA can be asked to select a shared memory
key itself by setting SharedMemoryKey to -1 and specifying
a file where to store the selected key.
Try to deal with open HTTP proxies that are used to send spam
by recognizing some commands from them. If the first command
from the client is GET, POST, CONNECT, or USER, then the
connection is terminated immediately.
New PrivacyOptions noactualrecipient to avoid putting
X-Actual-Recipient lines in DSNs revealing the actual
account that addresses map to. Patch from Dan Harkless.
New options B, z, and Z for DNS maps:
-B: specify a domain that is always appended to queries.
-z: specify the delimiter at which to cut off the result of
a query if it is too long.
-Z: specify the maximum number of entries to be concatenated
to form the result of a lookup.
New target "check" in the Makefile of libsm: instead of running tests
implicitly while building libsm, they must be explicitly
started by using "make check".
Fixed some inconsistent checks for NULL pointers that have been
reported by the SATURN tool which has been developed by
Isil Dillig and Thomas Dillig of Stanford University.
Fix a potential race condition caused by a signal handler for
terminated child processes. Problem noted by David F. Skoll.
When a milter deleted a recipient, that recipient could cause a
queue group selection. This has been disabled as it was not
intended.
New operator 'r' for the arith map to return a random number.
Patch from Motonori Nakamura of Kyoto University.
New compile time option MILTER_NO_NAGLE to turn off the Nagle
algorithm for communication with libmilter ("cork" on Linux),
which may improve the communication performance on some
operating systems. Patch from John Gardiner Myers of
Proofpoint.
If sendmail received input that contained a CR without subsequent LF
(thus violating RFC 2821 (2.3.7)), it could previously
generate an additional blank line in the output as the last
line.
Restarting persistent queue runners by sending a HUP signal to
the "queue control process" (QCP) works now.
Increase the length of an input line to 12288 to deal with
really long lines during SMTP AUTH negotiations.
Problem noted by Werner Wiethege.
If ARPANET mode (-ba) was selected STARTTLS would fail (due to
a missing initialization call for that case). Problem
noted by Neil Rickert of Northern Illinois University.
If sendmail is linked against a library that initializes Cyrus-SASL
before sendmail did it (such as libnss-ldap), then SMTP AUTH
could fail for the sendmail client. A patch by Moritz Both
works around the API design flaw of Cyrus-SASLv2.
CONFIG: Make it possible to unset the StatusFile option by
undefining STATUS_FILE. By not setting StatusFile,
the MTA will not attempt to open a statistics file on
each delivery.
CONFIG: New FEATURE(`require_rdns') to reject messages from SMTP
clients whose IP address does not have proper reverse DNS.
Contributed by Neil Rickert of Northern Illinois University
and John Beck of Sun Microsystems.
CONFIG: New FEATURE(`block_bad_helo') to reject messages from SMTP
clients which provide a HELO/EHLO argument which is either
unqualified, or is one of our own names (i.e., the server
name instead of the client name). Contributed by Neil
Rickert of Northern Illinois University and John Beck of
Sun Microsystems.
CONFIG: New FEATURE(`badmx') to reject envelope sender addresses
(MAIL) whose domain part resolves to a "bad" MX record.
Based on contribution from William Dell Wisner.
CONFIG: New macros SMTP_MAILER_LL and RELAY_MAILER_LL to override
the maximum line length of the smtp mailers.
CONFIG: New option `relaytofulladdress' for FEATURE(`access_db')
to allow entries in the access map to be of the form
To:[email protected] RELAY
CONFIG: New subsuboptions eoh and data to specify the list of
macros a milter should receive at those stages in the
SMTP dialogue.
CONFIG: New option confHELO_NAME for HeloName to set the name
for the HELO/EHLO command.
CONFIG: dnsbl and enhdnsbl can now also discard or quarantine
messages by using those values as second argument.
Patches from Nelson Fung.
CONTRIB: cidrexpand uses a hash symbol as comment character and
ignores everything after it unless it is in quotes or
preceeded by a backslash.
DEVTOOLS: New macro confMKDIR: if set to a program that creates
directories, then it used for "make install" to create
the required installation directories.
DEVTOOLS: New macro confCCLINK to specify the linker to use for
executables (defaults to confCC).
LIBMILTER: A new version of the milter API has been created that
has several changes which are listed below and documented
in the webpages reachable via libmilter/docs/index.html.
LIBMILTER: The meaning of the version macro SMFI_VERSION has been
changed. It now refers only to the version of libmilter,
not to the protocol version (which is used only internally,
it is not user/milter-programmer visible). Additionally,
a version function smfi_version() has been introduced such
that a milter program can check the libmilter version also
at runtime which is useful if a shared library is used.
LIBMILTER: A new callback xxfi_negotiate() can be used to
dynamically (i.e., at runtime) determine the available
protocol actions and features of the MTA and also to
specify which of these a milter wants to use. This allows
for more flexibility than hardcoding these flags in the
xxfi_flags field of the smfiDesc structure.
LIBMILTER: A new callback xxfi_data() is available so milters
can act on the DATA command.
LIBMILTER: A new callback xxfi_unknown() is available so milters
can receive also unknown SMTP commands.
LIBMILTER: A new return code SMFIS_NOREPLY has been added which
can be used by the xxfi_header() callback provided the
milter requested the SMFIP_NOHREPL protocol action.
LIBMILTER: The new return code SMFIS_SKIP can be used in the
xxfi_body() callback to skip over further body chunks
and directly advance to the xxfi_eom() callback. This
is useful if a milter can make a decision based on the
body chunks it already received without reading the entire
rest of the body and the milter wants to invoke functions
that are only available from the xxfi_eom() callback.
LIBMILTER: A new function smfi_addrcpt_par() can be used to add
new recipients including ESMTP parameters.
LIBMILTER: A new function smfi_chgfrom() can be used to change the
envelope sender including ESMTP parameters.
LIBMILTER: A milter can now request to be informed about rejected
recipients (RCPT) too. This requires to set the protocol
flag SMFIP_RCPT_REJ during option negotiation. Whether
a RCPT has been rejected can be checked by comparing the
value of the macro {rcpt_mailer} with "error".
LIBMILTER: A milter can now override the list of macros that it
wants to receive from the MTA for each protocol step
by invoking the function smfi_setsymlist() during option
negotiation.
LIBMILTER: A milter can receive header field values with all
leading spaces by requesting the SMFIP_HDR_LEADSPC
protocol action. Also, if the flag is set then the MTA
does not add a leading space to headers that are added,
inserted, or replaced.
LIBMILTER: If a milter sets the reply code to "421" for the HELO
callback, the SMTP server will terminate the SMTP session
with that error to match the behavior of all other callbacks.
New Files:
cf/feature/badmx.m4
cf/feature/block_bad_helo.m4
cf/feature/require_rdns.m4
devtools/M4/UNIX/check.m4
include/sm/misc.h
include/sm/sendmail.h
include/sm/tailq.h
libmilter/docs/smfi_addrcpt_par.html
libmilter/docs/smfi_setsymlist.html
libmilter/docs/xxfi_data.html
libmilter/docs/xxfi_negotiate.html
libmilter/docs/xxfi_unknown.html
libmilter/example.c
libmilter/monitor.c
libmilter/worker.c
libsm/memstat.c
libsm/t-memstat.c
libsm/t-qic.c
libsm/util.c
sendmail/daemon.h
sendmail/map.h
8.13.8/8.13.8 2006/08/09
Fix a regression in 8.13.7: if shared memory is activated, then
the server can erroneously report that there is
insufficient disk space. Additionally make sure that
an internal variable is set properly to avoid those
misleading errors. Based on patch from Steve Hubert
of University of Washington.
Fix a regression in 8.13.7: the PidFile could be removed after
the process that forks the daemon exited, i.e., if
sendmail -bd is invoked. Problem reported by Kan Sasaki
of Fusion Communications Corp. and Werner Wiethege.
Avoid opening qf files if QueueSortOrder is "none". Patch from
David F. Skoll.
Avoid a crash when finishing due to referencing a freed variable.
Problem reported and diagnosed by Moritz Jodeit.
CONTRIB: cidrexpand now deals with /0 by issuing the entire IPv4
range (0..255).
LIBMILTER: The "hostname" argument of the xxfi_connect() callback
previously was the equivalent of {client_ptr}. However,
this did not match the documentation of the function, hence
it has been changed to {client_name}. See doc/op/op.*
about these macros.
8.13.7/8.13.7 2006/06/14
A malformed MIME structure with many parts can cause sendmail to
crash while trying to send a mail due to a stack overflow,
e.g., if the stack size is limited (ulimit -s). This
happens because the recursion of the function mime8to7()
was not restricted. The function is called for MIME 8 to
7 bit conversion and also to enforce MaxMimeHeaderLength.
To work around this problem, recursive calls are limited to
a depth of MAXMIMENESTING (20); message content after this
limit is treated as opaque and is not checked further.
Problem noted by Frank Sheiness.
The changes to the I/O layer in 8.13.6 caused a regression for
SASL mechanisms that use the security layer, e.g.,
DIGEST-MD5. Problem noted by Robert Stampfli.
If a timeout occurs while reading a message (during the DATA phase)
a df file might have been left behind in the queue.
This was another side effect of the changes to the I/O
layer made in 8.13.6.
Several minor problems have been fixed that were found by a
Coverity scan of sendmail 8 as part of the NetBSD
distribution. See http://scan.coverity.com/
Note: the scan generated also a lot of "false positives",
e.g., "error" reports about situations that cannot happen.
Most of those code places are marked with lint(1) comments
like NOTREACHED, but Coverity does not understand those.
Hence an explicit assertion has been added in some cases
to avoid those false positives.
If the start of the sendmail daemon fails due to a configuration
error then in some cases shared memory segments or pid
files were not removed.
If DSN support is disabled via access_db, then related ESMTP
parameters for MAIL and RCPT should be rejected. Problem
reported by Akihiro Sagawa.
Enabling zlib compression in OpenSSL 0.9.8[ab] breaks the padding
bug work-around. Hence if sendmail is linked against
either of these versions and compression is available,
the padding bug work-around is turned off. Based on
patch from Victor Duchovni of Morgan Stanley.
CONFIG: FEATURE(`dnsbl') and FEATURE(`enhdnsbl') used
blackholes.mail-abuse.org as default domain for lookups,
however, that list is no longer available. To avoid
further problems, no default value is available anymore,
but an argument must be specified.
Portability:
Fix compilation on OSF/1 for sfsasl.c. Patch from
Pieter Bowman of the University of Utah.
8.13.6/8.13.6 2006/03/22
SECURITY: Replace unsafe use of setjmp(3)/longjmp(3) in the server
and client side of sendmail with timeouts in the libsm I/O
layer and fix problems in that code. Also fix handling of
a buffer in sm_syslog() which could have been used as an
attack vector to exploit the unsafe handling of
setjmp(3)/longjmp(3) in combination with signals.
Problem detected by Mark Dowd of ISS X-Force.
Handle theoretical integer overflows that could triggered if
the server accepted headers larger than the maximum
(signed) integer value. This is prevented in the default
configuration by restricting the size of a header, and on
most machines memory allocations would fail before reaching
those values. Problems found by Phil Brass of ISS.
If a server returns 421 for an RSET command when trying to start
another transaction in a session while sending mail, do
not trigger an internal consistency check. Problem found
by Allan E Johannesen of Worcester Polytechnic Institute.
If a server returns a 5xy error code (other than 501) in response
to a STARTTLS command despite the fact that it advertised
STARTTLS and that the code is not valid according to RFC
2487 treat it nevertheless as a permanent failure instead
of a protocol error (which has been changed to a
temporary error in 8.13.5). Problem reported by Jeff
A. Earickson of Colby College.
Clear SMTP state after a HELO/EHLO command. Patch from John
Myers of Proofpoint.
Observe MinQueueAge option when gathering entries from the queue
for sorting etc instead of waiting until the entries are
processed. Patch from Brian Fundakowski Feldman.
Set up TLS session cache to properly handle clients that try to
resume a stored TLS session.
Properly count the number of (direct) child processes such that
a configured value (MaxDaemonChildren) is not exceeded.
Based on patch from Attila Bruncsak.
LIBMILTER: Remove superfluous backslash in macro definition
(libmilter.h). Based on patch from Mike Kupfer of
Sun Microsystems.
LIBMILTER: Don't try to set SO_REUSEADDR on UNIX domain sockets.
This generates an error message from libmilter on
Solaris, though other systems appear to just discard the
request silently.
LIBMILTER: Deal with sigwait(2) implementations that return
-1 and set errno instead of returning an error code
directly. Patch from Chris Adams of HiWAAY Informations
Services.
Portability:
Fix compilation checks for closefrom(3) and statvfs(2)
in NetBSD. Problem noted by S. Moonesamy, patch from
Andrew Brown.
8.13.5/8.13.5 2005/09/16
Store the filesystem identifier of the df/ subdirectory (if it
exists) in an internal structure instead of the base
directory. This structure is used decide whether there
is enough free disk space when selecting a queue, hence
without this change queue selection could fail if a df/
subdirectory exists and is on a different filesystem
than the base directory.
Use the queue index of the df file (instead of the qf file) for
checking whether a link(2) operation can be used to split
an envelope across queue groups. Problem found by
Werner Wiethege.
If the list of items in the queue is larger than the maximum
number of items to process, sort the queue first and
then cut the list off instead of the other way around.
Patch from Matej Vela of Rudjer Boskovic Institute.
Fix helpfile to show full entry for ETRN. Problem noted by
Penelope Fudd, patch from Neil Rickert of Northern Illinois
University.
FallbackSmartHost should also be tried on temporary errors.
From John Beck of Sun Microsystems.
When a server responds with 421 to the STARTTLS command then treat
it as a temporary error, not as protocol error. Problem
noted by Andrey J. Melnikoff.
Properly define two functions in libsm as static because their
prototype used static too. Patch from Peter Klein.
Fix syntax errors in helpfile for MAIL and RCPT commands.
LIBMILTER: When smfi_replacebody() is called with bodylen equals
zero then do not silently ignore that call. Patch from
Gurusamy Sarathy of Active State.
LIBMILTER: Recognize "421" also in a multi-line reply to terminate
the SMTP session with that error. Fix from Brian Kantor.
Portability: New option HASSNPRINTF which can be set if the OS
has a properly working snprintf(3) to get rid
of the last two (safe) sprintf(3) calls in the
source code.
Add support for AIX 5.3.
Add support for SunOS 5.11 (aka Solaris 11).
Add support for Darwin 8.x. Patch from Lyndon Nerenberg.
OpenBSD 3.7 has removed support for NETISO.
CONFIG: Add OSTYPE(freebsd6) for FreeBSD 6.X.
Set DontBlameSendmail to AssumeSafeChown and
GroupWritableDirPathSafe for OSTYPE(darwin).
Patch from Lyndon Nerenberg.
Some features still used 4.7.1 as enhanced status code which
was supposed to be eliminated in 8.13.0 because some
broken systems misinterpret it as a permanent error.
Patch from Matej Vela of Rudjer Boskovic Institute.
Some default values in a generated cf file did not match
the defaults in the sendmail binary. Problem noted
by Mike Pechkin.
New Files:
cf/ostype/freebsd6.m4
devtools/OS/AIX.5.3
devtools/OS/Darwin.8.x
devtools/OS/SunOS.5.11
include/sm/time.h
8.13.4/8.13.4 2005/03/27
The bug fixes in 8.13.3 for connection handling uncovered a
different error which could result in connections that
stay in CLOSE_WAIT state due to a variable that was not
properly initialized. Problem noted by Michael Sims.
Deal with empty hostnames in hostsignature(). This bug could lead
to an endless loop when doing LMTP deliveries to another
host. Problem first reported by Martin Lathoud and
tracked down by Gael Roualland.
Make sure return parameters are initialized in getmxrr(). Problem
found by Gael Roualland using valgrind.
If shared memory is used and the RunAsUser option is set, then the
owner and group of the shared memory segment is set to
the ids specified RunAsUser and the access mode is set
to 0660 to allow for updates by sendmail processes.
The number of queue entries that is (optionally) kept in shared
memory was wrong in some cases, e.g., envelope splitting
and bounce generation.
Undo a change made in 8.13.0 to silently truncate long strings
in address rewriting because the message can be triggered
for header checks where long strings are legitimate.
Problem reported by Mary Verge DeSisto, and tracked
down with the help of John Beck of Sun Microsystems.
The internal stab map did not obey the -m flag. Patch from
Rob McMahon of Warwick University, England.
The socket map did not obey the -f flag. Problem noted by
Dan Ringdahl, forwarded by Andrzej Filip.
The addition of LDAP recursion in 8.13.0 broke enforcement of
the LDAP map -1 argument which tells the MTA to only
return success if and only if a single LDAP match is found.
Add additional error checks in the MTA for milter communication
to avoid a possible segmentation fault. Based on patch
by Joe Maimon.
Do not trigger an assertion if X509_digest() returns success but
does not assign a value to its output parameter. Based
on patch by Brian Kantor.
Add more checks when resetting internal AUTH data (applies only
to Cyrus SASL version 2). Otherwise an SMTP session might
be dropped after an AUTH failure.
Portability:
Add LA_LONGLONG as valid LA_TYPE type for systems that use
"long long" to read load average data, e.g.,
AIX 5.1 in 32 bit mode. Note: this has to be set
"by hand", it is not (yet) automatically detected.
Problem noted by Burak Bilen.
Use socklen_t for accept(), etc. on AIX 5.x. This should
fix problems when compiling in 64 bit mode.
Problem first reported by Harry Meiert of
University of Bremen.
New Files:
include/sm/sem.h
libsm/sem.c
libsm/t-sem.c
8.13.3/8.13.3 2005/01/11
Enhance handling of I/O errors, especially EOF, when STARTTLS
is active.
Make sure a connection is not reused after it has been closed
due to a 421 error. Problem found by Allan E Johannesen
of Worcester Polytechnic Institute.
Avoid triggering an assertion when sendmail is interrupted while
closing a connection. Problem found by Allan E Johannesen
of Worcester Polytechnic Institute.
Regression: a change in 8.13.2 caused sendmail not to try the
next MX host (or FallbackMXhost if configured) when, at
connection open, the current server returns a 4xy or 5xy
SMTP reply code. Problem noted by Mark Tranchant.
8.13.2/8.13.2 2004/12/15
Do not split the first header even if it exceeds the internal
buffer size. Previously a part of such a header would
end up in the body of the message. Problem noted by
Simple Nomad of BindView.
Do not complain about "cataddr: string too long" when checking
headers that do not contain RFC 2822 addresses.
Problem noted by Rich Graves of Brandeis University.
If a server returns a 421 reply to the RSET command between
message deliveries, do not attempt to deliver any more
messages on that connection. This prevents bogus "Bad
file number" recipient status. Problem noted by
Allan E Johannesen of Worcester Polytechnic Institute.
Allow trailing white space in EHLO command as recommended by RFC
2821. Problem noted by Ralph Santagato of SBC Services.
Deal with clients which use AUTH but negotiate a smaller buffer size
for data exchanges than the value used by sendmail, e.g.,
Cyrus IMAP lmtp server. Based on patch by Jamie Clark.
When passing ESMTP arguments for RCPT to a milter, do not cut
them off at a comma. Problem noted by Krzysztof Oledzki.
Add more logging to milter change header functions to
complement existing logging. Based on patch from
Gurusamy Sarathy of Active State.
Include <lber.h> in include/sm/config.h when LDAPMAP is defined.
Patch from Edgar Hoch of the University of Stuttgart.
Fix DNS lookup if IPv6 is enabled when converting an IP address
to a hostname for use with SASL. Problem noted by Ken Jones;
patch from Hajimu UMEMOTO.
CONFIG: For consistency enable MODIFY_MAILER_FLAGS for the prog
mailer. Patch from John Beck of Sun Microsystems.
LIBMILTER: It was possible that xxfi_abort() was called after
xxfi_eom() for a message if some timeouts were triggered.
Patch from Alexey Kravchuk.
LIBMILTER: Slightly rearrange mutex use in listener.c to allow
different threads to call smfi_opensocket() and smfi_main().
Patch from Jordan Ritter of Cloudmark.
MAIL.LOCAL: Properly terminate MBDB before exiting. Problem
noted by Nelson Fung.
MAIL.LOCAL: make strip-mail.local used a wrong path to access
mail.local. Problem noted by William Park.
VACATION: Properly terminate MBDB before exiting. Problem noted
by Nelson Fung.
Portability:
Add support for DragonFly BSD.
New Files:
cf/ostype/dragonfly.m4
devtools/OS/DragonFly
include/sm/os/sm_os_dragonfly.h
Deleted Files:
libsm/vsscanf.c
8.13.1/8.13.1 2004/07/30
Using the default AliasFile ldap: specification would cause the
objectClasses of the LDAP response to be included in the
@@ -121,7 +752,7 @@ summary of the changes in that release.
sendmail will now remove its pidfile when it exits. This was done
to prevent confusion caused by running sendmail stop
scripts two or more times, where the second and subsequent
runs would report misleading error messages about sendmail's
runs would report misleading error messages about sendmail's
pid no longer existing. See section 1.3.15 of doc/op/op.me
for a discussion of the implications of this, including
how to correct broken scripts which may have depended on
@@ -1019,7 +1650,7 @@ summary of the changes in that release.
Properly count message size for mailstats during mail collection.
Problem noted by Werner Wiethege.
Log complete response from LMTP delivery agent on failure. Based on
patch from by Motonori Nakamura of Kyoto University.
patch from Motonori Nakamura of Kyoto University.
Provide workaround for getopt() implementations that do not catch
missing arguments.
Fix the message size calculation if the message body is replaced by
+188 -76
View File
@@ -77,7 +77,7 @@ Let's examine a typical .mc file:
divert(-1)
#
# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -397,6 +397,9 @@ SMTP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data
that ARRIVE from an address that resolves to one of
the SMTP mailers and which are converted to MIME will
be labeled with this character set.
SMTP_MAILER_LL [990] The maximum line length for SMTP mailers
(except the relay mailer).
RELAY_MAILER_LL [2040] The maximum line length for the relay mailer.
UUCP_MAILER_PATH [/usr/bin/uux] The program used to send UUCP mail.
UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default
flags are `DFMhuU' (and `m' for uucp-new mailer,
@@ -492,11 +495,12 @@ QPAGE_MAILER_QGRP [undefined] The queue group for the qpage mailer.
LOCAL_PROG_QGRP [undefined] The queue group for the prog mailer.
Note: to tweak Name_MAILER_FLAGS use the macro MODIFY_MAILER_FLAGS:
MODIFY_MAILER_FLAGS(`Name', `change') where Name is the first part of
the macro Name_MAILER_FLAGS and change can be: flags that should
be used directly (thus overriding the default value), or if it
starts with `+' (`-') then those flags are added to (removed from)
the default value. Example:
MODIFY_MAILER_FLAGS(`Name', `change') where Name is the first part
of the macro Name_MAILER_FLAGS (note: that means Name is entirely in
upper case) and change can be: flags that should be used directly
(thus overriding the default value), or if it starts with `+' (`-')
then those flags are added to (removed from) the default value.
Example:
MODIFY_MAILER_FLAGS(`LOCAL', `+e')
@@ -958,7 +962,7 @@ generics_entire_domain
virtusertable A domain-specific form of aliasing, allowing multiple
virtual domains to be hosted on one machine. For example,
if the virtuser table contained:
if the virtuser table contains:
[email protected] foo-info
[email protected] bar-info
@@ -1030,12 +1034,6 @@ ldap_routing Implement LDAP-based e-mail recipient routing according to
See the LDAP ROUTING section below for more information.
nodns If you aren't running DNS at your site (for example,
you are UUCP-only connected). It's hard to consider
this a "feature", but hey, it had to go somewhere.
Actually, as of 8.7 this is a no-op -- remove "dns" from
the hosts service switch entry instead.
nullclient This is a special case -- it creates a configuration file
containing nothing but support for forwarding all mail to a
central hub via a local SMTP-based network. The argument
@@ -1186,7 +1184,7 @@ accept_unqualified_senders
Normally, MAIL FROM: commands in the SMTP session will be
refused if the connection is a network connection and the
sender address does not include a domain name. If your
setup sends local mail unqualified (i.e., MAIL FROM: <joe>),
setup sends local mail unqualified (i.e., MAIL FROM:<joe>),
you will need to use this feature to accept unqualified
sender addresses. Setting the DaemonPortOptions modifier
'u' overrides the default behavior, i.e., unqualified
@@ -1240,15 +1238,15 @@ use_client_ptr If this feature is enabled then check_relay will override
versions when delay_checks was not in use. See doc/op/op.*
about check_relay, {client_name}, and {client_ptr}.
dnsbl Turns on rejection of hosts found in an DNS based rejection
list. If an argument is provided it is used as the domain
in which blocked hosts are listed; otherwise it defaults to
blackholes.mail-abuse.org. An explanation for an DNS based
rejection list can be found at http://mail-abuse.org/rbl/.
A second argument can be used to change the default error
message. Without that second argument, the error message
will be
dnsbl Turns on rejection, discarding, or quarantining of hosts
found in a DNS based list. The first argument is used as
the domain in which blocked hosts are listed. A second
argument can be used to change the default error message,
or select one of the operations `discard' and `quarantine'.
Without that second argument, the error message will be
Rejected: IP-ADDRESS listed at SERVER
where IP-ADDRESS and SERVER are replaced by the appropriate
information. By default, temporary lookup failures are
ignored. This behavior can be changed by specifying a
@@ -1278,13 +1276,6 @@ dnsbl Turns on rejection of hosts found in an DNS based rejection
See below (EDNSBL_TO) for an explanation.
NOTE: The default DNS blacklist, blackholes.mail-abuse.org,
is a service offered by the Mail Abuse Prevention System
(MAPS). As of July 31, 2001, MAPS is a subscription
service, so using that network address won't work if you
haven't subscribed. Contact MAPS to subscribe
(http://mail-abuse.org/).
enhdnsbl Enhanced version of dnsbl (see above). Further arguments
(up to 5) can be used to specify specific return values
from lookups. Temporary lookup failures are ignored unless
@@ -1494,6 +1485,81 @@ greet_pause Adds the greet_pause ruleset which enables open proxy
R$* $: $&{daemon_flags}
R$* a $* $# 0
block_bad_helo Reject messages from SMTP clients which provide a HELO/EHLO
argument which is either unqualified, or is one of our own
names (i.e., the server name instead of the client name).
This check is performed at RCPT stage and disabled for the
following cases:
- authenticated sessions,
- connections from IP addresses in class $={R}.
Currently access_db lookups can not be used to
(selectively) disable this test, moreover,
FEATURE(`delay_checks')
is required.
require_rdns Reject mail from connecting SMTP clients without proper
rDNS (reverse DNS), functional gethostbyaddr() resolution.
Note: this feature will cause false positives, i.e., there
are legitimate MTAs that do not have proper DNS entries.
Rejecting mails from those MTAs is a local policy decision.
The basic policy is to reject message with a 5xx error if
the IP address fails to resolve. However, if this is a
temporary failure, a 4xx temporary failure is returned.
If the look-up succeeds, but returns an apparently forged
value, this is treated as a temporary failure with a 4xx
error code.
EXCEPTIONS:
Exceptions based on access entries are discussed below.
Any IP address matched using $=R (the "relay-domains" file)
is excepted from the rules. Since we have explicitly
allowed relaying for this host, based on IP address, we
ignore the rDNS failure.
The philosophical assumption here is that most users do
not control their rDNS. They should be able to send mail
through their ISP, whether or not they have valid rDNS.
The class $=R, roughly speaking, contains those IP addresses
and address ranges for which we are the ISP, or are acting
as if the ISP.
If `delay_checks' is in effect (recommended), then any
sender who has authenticated is also excepted from the
restrictions. This happens because the rules produced by
this FEATURE() will not be applied to authenticated senders
(assuming `delay_checks').
ACCESS MAP ENTRIES:
Entries such as
Connect:1.2.3.4 OK
Connect:1.2 RELAY
will whitelist IP address 1.2.3.4, so that the rDNS
blocking does apply to that IP address
Entries such as
Connect:1.2.3.4 REJECT
will have the effect of forcing a temporary failure for
that address to be treated as a permanent failure.
badmx Reject envelope sender addresses (MAIL) whose domain part
resolves to a "bad" MX record. By default these are
MX records which resolve to A records that match the
regular expression:
^(127\.|10\.|0\.0\.0\.0)
This default regular expression can be overridden by
specifying an argument, e.g.,
FEATURE(`badmx', `^127\.0\.0\.1')
Note: this feature requires that the sendmail binary
has been compiled with the options MAP_REGEX and
DNSMAP.
+-------+
| HACKS |
+-------+
@@ -1593,7 +1659,7 @@ The four mailers are:
uucp-old (obsolete name: "uucp")
This is the oldest, the worst (but the closest to UUCP) way of
sending messages accros UUCP connections. It does bangify
sending messages across UUCP connections. It does bangify
everything and prepends $U (your UUCP name) to the sender's
address (which can already be a bang path itself). It can
only send to one address at a time, so it spends a lot of
@@ -1872,7 +1938,8 @@ sections below).
See the file cf/sendmail.schema for the actual LDAP schemas. Note that
this schema (and therefore the lookups and examples below) is experimental
at this point as it has had little public review. Therefore, it may change
in future versions. Feedback via sendmail@sendmail.org is encouraged.
in future versions. Feedback via sendmail-YYYY@support.sendmail.org is
encouraged (replace YYYY with the current year, e.g., 2005).
-------
Aliases
@@ -2336,7 +2403,7 @@ without any prior arrangement). Along the same lines,
FEATURE(`relay_local_from')
will allow relaying if the sender specifies a return path (i.e.
MAIL FROM: <user@domain>) domain which is a local domain. This is a
MAIL FROM:<user@domain>) domain which is a local domain. This is a
dangerous feature as it will allow spammers to spam using your mail
server by simply specifying a return address of [email protected].
It should not be used unless absolutely necessary.
@@ -2357,7 +2424,7 @@ allow relaying for roaming users.
If source routing is used in the recipient address (e.g.,
RCPT TO: <user%[email protected]>), sendmail will check
RCPT TO:<user%[email protected]>), sendmail will check
[email protected] for relaying if othersite.com is an allowed relay host
in either class {R}, class {m} if FEATURE(`relay_entire_domain') is used,
or the access database if FEATURE(`access_db') is used. To prevent
@@ -2434,10 +2501,15 @@ definition for the database; for example
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access_map')
Notice: If a second argument is specified it must contain the option
`-T<TMPF>' as shown above. The optional third and fourth parameters
may be `skip' or `lookupdotdomain'. The former enables SKIP as
value part (see below), the latter is another way to enable the
feature of the same name (see above).
`-T<TMPF>' as shown above. The optional parameters may be
`skip' enables SKIP as value part (see below).
`lookupdotdomain' another way to enable the feature of the
same name (see above).
`relaytofulladdress' enable entries of the form
To:[email protected] RELAY
to allow relaying to just a specific
e-mail address instead of an entire domain.
Remember, since /etc/mail/access is a database, after creating the text
file as described below, you must use makemap to create the database
@@ -2505,7 +2577,8 @@ The value part of the map can contain:
name is unresolvable. "Accept" does not mean
"relay", but at most acceptance for local
recipients. That is, OK allows less than RELAY.
RELAY Accept mail addressed to the indicated domain or
RELAY Accept mail addressed to the indicated domain
(or address if `relaytofulladdress' is set) or
received from the indicated domain for relaying
through your SMTP server. RELAY also serves as
an implicit OK for the other checks.
@@ -2522,15 +2595,30 @@ The value part of the map can contain:
it but causing the default action.
### any text where ### is an RFC 821 compliant error code and
"any text" is a message to return for the command.
The string should be quoted to avoid surprises,
e.g., sendmail may remove spaces otherwise.
The entire string should be quoted to avoid
surprises:
"### any text"
Otherwise sendmail formats the text as email
addresses, e.g., it may remove spaces.
This type is deprecated, use one of the two
ERROR: entries below instead.
ERROR:### any text
as above, but useful to mark error messages as such.
If quotes need to be used to avoid modifications
(see above), they should be placed like this:
ERROR:"### any text"
ERROR:D.S.N:### any text
where D.S.N is an RFC 1893 compliant error code
and the rest as above.
and the rest as above. If quotes need to be used
to avoid modifications, they should be placed
like this:
ERROR:D.S.N:"### any text"
QUARANTINE:any text
Quarantine the message using the given text as the
quarantining reason.
@@ -2614,31 +2702,33 @@ as value part in the access map. Taking the example from above:
Mail can't be sent to [email protected] or anyone at cyberspammer.com.
That's why tagged entries should be used.
There are several DNS based blacklists, the first of which was
the RBL (``Realtime Blackhole List'') run by the MAPS project,
see http://mail-abuse.org/. These are databases of spammers
There are several DNS based blacklists which can be found by
querying a search engine. These are databases of spammers
maintained in DNS. To use such a database, specify
FEATURE(`dnsbl')
FEATURE(`dnsbl', `dnsbl.example.com')
This will cause sendmail to reject mail from any site in the original
Realtime Blackhole List database. This default DNS blacklist,
blackholes.mail-abuse.org, is a service offered by the Mail Abuse
Prevention System (MAPS). As of July 31, 2001, MAPS is a subscription
service, so using that network address won't work if you haven't
subscribed. Contact MAPS to subscribe (http://mail-abuse.org/).
You can specify an alternative RBL server to check by specifying an
argument to the FEATURE. The default error message is
This will cause sendmail to reject mail from any site listed in the
DNS based blacklist. You must select a DNS based blacklist domain
to check by specifying an argument to the FEATURE. The default
error message is
Rejected: IP-ADDRESS listed at SERVER
where IP-ADDRESS and SERVER are replaced by the appropriate
information. A second argument can be used to specify a different
text. By default, temporary lookup failures are ignored and hence
cause the connection not to be rejected by the DNS based rejection
list. This behavior can be changed by specifying a third argument,
which must be either `t' or a full error message. For example:
text or action. For example,
FEATURE(`dnsbl', `dnsbl.example.com', `quarantine')
would quarantine the message if the client IP address is listed
at `dnsbl.example.com'.
By default, temporary lookup failures are ignored
and hence cause the connection not to be rejected by the DNS based
rejection list. This behavior can be changed by specifying a third
argument, which must be either `t' or a full error message. For
example:
FEATURE(`dnsbl', `dnsbl.example.com', `',
`"451 Temporary lookup failure for " $&{client_addr} " in dnsbl.example.com"')
@@ -2651,8 +2741,7 @@ where IP-ADDRESS and SERVER are replaced by the appropriate
information.
This FEATURE can be included several times to query different
DNS based rejection lists, e.g., the dial-up user list (see
http://mail-abuse.org/dul/).
DNS based rejection lists.
Notice: to avoid checking your own local domains against those
blacklists, use the access_db feature and add:
@@ -2662,7 +2751,7 @@ blacklists, use the access_db feature and add:
to the access map, where 10.1 is your local network. You may
want to use "RELAY" instead of "OK" to allow also relaying
instead of just disabling the DNS lookups in the backlists.
instead of just disabling the DNS lookups in the blacklists.
The features described above make use of the check_relay, check_mail,
@@ -2796,9 +2885,9 @@ That may cause problems with simple header checks due to the
tokenization. It might be simpler to use a regex map and apply it
to $&{currHeader}.
2. There are no default rulesets coming with this distribution of
sendmail. You can either write your own or you can search the
WWW for examples, e.g., http://www.digitalanswers.org/check_local/
3. When using a default ruleset for headers, the name of the header
sendmail. You can write your own, can search the WWW for examples,
or take a look at cf/cf/knecht.mc.
3. When using a default ruleset for headers, the name of the header
currently being checked can be found in the $&{hdr_name} macro.
After all of the headers are read, the check_eoh ruleset will be called for
@@ -2870,12 +2959,12 @@ the previous paragraph. Example:
| STARTTLS |
+----------+
In this text, cert will be used as an abreviation for X.509 certificate,
In this text, cert will be used as an abbreviation for X.509 certificate,
DN (CN) is the distinguished (common) name of a cert, and CA is a
certification authority, which signs (issues) certs.
For STARTTLS to be offered by sendmail you need to set at least
this variables (the file names and paths are just examples):
these variables (the file names and paths are just examples):
define(`confCACERT_PATH', `/etc/mail/certs/')
define(`confCACERT', `/etc/mail/certs/CA.cert.pem')
@@ -4011,12 +4100,17 @@ confDONT_INIT_GROUPS DontInitGroups [False] If set, the initgroups(3)
will only have their primary
(/etc/passwd) group permissions.
confUNSAFE_GROUP_WRITES UnsafeGroupWrites
[False] If set, group-writable
[True] If set, group-writable
:include: and .forward files are
considered "unsafe", that is, programs
and files cannot be directly referenced
from such files. World-writable files
are always considered unsafe.
Notice: this option is deprecated and
will be removed in future versions;
Set GroupWritableForwardFileSafe
and GroupWritableIncludeFileSafe in
DontBlameSendmail if required.
confCONNECT_ONLY_TO ConnectOnlyTo [undefined] override connection
address (for testing).
confCONTROL_SOCKET_NAME ControlSocketName
@@ -4028,6 +4122,11 @@ confDOUBLE_BOUNCE_ADDRESS DoubleBounceAddress
"double bounce" error message to this
address. If it expands to an empty
string, double bounces are dropped.
confSOFT_BOUNCE SoftBounce [False] If set, issue temporary errors
(4xy) instead of permanent errors
(5xy). This can be useful during
testing of a new configuration to
avoid erroneous bouncing of mails.
confDEAD_LETTER_DROP DeadLetterDrop [undefined] Filename to save bounce
messages which could not be returned
to the user or sent to postmaster.
@@ -4127,12 +4226,8 @@ confAUTH_OPTIONS AuthOptions [undefined] If this option is 'A'
then the AUTH= parameter for the
MAIL FROM command is only issued
when authentication succeeded.
Other values (which should be listed
one after the other without any
intervening characters except for
space or comma) are a, c, d, f, p,
and y. See doc/op/op.me for
details.
See doc/op/op.me for more options
and details.
confAUTH_MAX_BITS AuthMaxBits [INT_MAX] Limit the maximum encryption
strength for the security layer in
SMTP AUTH (SASL). Default is
@@ -4187,7 +4282,7 @@ confNICE_QUEUE_RUN NiceQueueRun [undefined] If set, the priority of
confDIRECT_SUBMISSION_MODIFIERS DirectSubmissionModifiers
[undefined] Defines {daemon_flags}
for direct submissions.
confUSE_MSP UseMSP [false] Use as mail submission
confUSE_MSP UseMSP [undefined] Use as mail submission
program, see sendmail/SECURITY.
confDELIVER_BY_MIN DeliverByMin [0] Minimum time for Deliver By
SMTP Service Extension (RFC 2852).
@@ -4196,6 +4291,11 @@ confREQUIRES_DIR_FSYNC RequiresDirfsync [true] RequiresDirfsync can
flag REQUIRES_DIR_FSYNC at runtime.
See sendmail/README for details.
confSHARED_MEMORY_KEY SharedMemoryKey [0] Key for shared memory.
confSHARED_MEMORY_KEY_FILE
SharedMemoryKeyFile
[undefined] File where the
automatically selected key for
shared memory is stored.
confFAST_SPLIT FastSplit [1] If set to a value greater than
zero, the initial MX lookups on
addresses is suppressed when they
@@ -4209,6 +4309,11 @@ confMAILBOX_DATABASE MailboxDatabase [pw] Type of lookup to find
information about local mailboxes.
confDEQUOTE_OPTS - [empty] Additional options for the
dequote map.
confMAX_NOOP_COMMANDS MaxNOOPCommands [20] Maximum number of "useless"
commands before the SMTP server
will slow down responding.
confHELO_NAME HeloName If defined, use as name for EHLO/HELO
command (instead of $j).
confINPUT_MAIL_FILTERS InputMailFilters
A comma separated list of filters
which determines which filters and
@@ -4240,7 +4345,14 @@ confMILTER_MACROS_ENVRCPT Milter.macros.envrcpt
milters after RCPT TO command.
confMILTER_MACROS_EOM Milter.macros.eom
[{msg_id}] Macros to transmit to
milters after DATA command.
milters after the terminating
DATA '.' is received.
confMILTER_MACROS_EOH Milter.macros.eoh
Macros to transmit to milters
after the end of headers.
confMILTER_MACROS_DATA Milter.macros.data
Macros to transmit to milters
after DATA command is received.
See also the description of OSTYPE for some parameters that can be
@@ -4587,4 +4699,4 @@ M4 DIVERSIONS
8 DNS based blacklists
9 special local rulesets (1 and 2)
$Revision: 8.691 $, Last updated $Date: 2004/07/19 17:47:34 $
$Revision: 8.722 $, Last updated $Date: 2007/04/03 21:26:58 $
+3 -1
View File
@@ -1,7 +1,7 @@
#
# Makefile for configuration files.
#
# $Id: Makefile,v 8.58 2003/10/20 22:01:00 ca Exp $
# $Id: Makefile,v 8.60 2005/06/14 02:16:34 gshapiro Exp $
#
#
@@ -164,9 +164,11 @@ M4FILES=\
${CFDIR}/ostype/bsdi2.0.m4 \
${CFDIR}/ostype/dgux.m4 \
${CFDIR}/ostype/domainos.m4 \
${CFDIR}/ostype/dragonfly.m4 \
${CFDIR}/ostype/dynix3.2.m4 \
${CFDIR}/ostype/freebsd4.m4 \
${CFDIR}/ostype/freebsd5.m4 \
${CFDIR}/ostype/freebsd6.m4 \
${CFDIR}/ostype/gnu.m4 \
${CFDIR}/ostype/hpux10.m4 \
${CFDIR}/ostype/hpux11.m4 \
+26 -10
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001, 2004, 2005 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -19,7 +19,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: knecht.mc,v 8.58 2004/01/28 00:54:41 eric Exp $')
VERSIONID(`$Id: knecht.mc,v 8.62 2006/09/27 19:48:59 eric Exp $')
OSTYPE(bsd4.4)
DOMAIN(generic)
@@ -30,6 +30,7 @@ define(`confHOST_STATUS_DIRECTORY', `.hoststat')
define(`confTO_ICONNECT', `10s')
define(`confTO_QUEUEWARN', `8h')
define(`confMIN_QUEUE_AGE', `27m')
define(`confTRUSTED_USER', `smtrust')
define(`confTRUSTED_USERS', ``www listmgr'')
define(`confPRIVACY_FLAGS', ``authwarnings,noexpn,novrfy'')
@@ -42,11 +43,13 @@ define(`confCLIENT_CERT', `CERT_DIR/MYcert.pem')
define(`confCLIENT_KEY', `CERT_DIR/MYkey.pem')
define(`CYRUS_MAILER_PATH', `/usr/local/cyrus/bin/deliver')
define(`CYRUS_MAILER_FLAGS', `fAh5@/:|')
FEATURE(access_db)
FEATURE(local_lmtp)
FEATURE(virtusertable)
FEATURE(mailertable)
FEATURE(`access_db')
FEATURE(`blacklist_recipients')
FEATURE(`local_lmtp')
FEATURE(`virtusertable')
FEATURE(`mailertable')
FEATURE(`nocanonify', `canonify_hosts')
CANONIFY_DOMAIN(`sendmail.org')
@@ -63,13 +66,26 @@ define(`confFAST_SPLIT', `10')
dnl # 10 runners, split into at most 15 recipients per envelope
QUEUE_GROUP(`mqueue', `P=/var/spool/mqueue, R=5, r=15, F=f')
dnl # enable spam assassin
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')
MAILER(local)
MAILER(smtp)
MAILER(cyrus)
dnl # enable DomainKeys and DKIM
INPUT_MAIL_FILTER(`dkim-filter', `S=unix:/var/run/smtrust/dkim.sock, F=T, T=R:2m')
dnl INPUT_MAIL_FILTER(`dk-filter', `S=unix:/var/run/smtrust/dk.sock, F=T, T=R:2m')
define(`confMILTER_MACROS_CONNECT', `j, {daemon_name}')
define(`confMILTER_MACROS_ENVFROM', `i, {auth_type}')
dnl # enable some DNSBLs
dnl FEATURE(`dnsbl', `dnsbl.sorbs.net', `"550 Mail from " $`'&{client_addr} " refused - see http://www.dnsbl.sorbs.net/"')
FEATURE(`dnsbl', `sbl-xbl.spamhaus.org', `"550 Mail from " $`'&{client_addr} " refused - see http://www.spamhaus.org/sbl/"')
FEATURE(`dnsbl', `list.dsbl.org', `"550 Mail from " $`'&{client_addr} " refused - see http://dsbl.org/"')
FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " refused - see http://spamcop.net/bl.shtml"')
MAILER(`local')
MAILER(`smtp')
MAILER(`cyrus')
LOCAL_RULE_0
Rcyrus.$+ + $+ < @ $=w . > $#cyrus $@ $2 $: $1
+29 -16
View File
@@ -16,8 +16,8 @@
#####
##### SENDMAIL CONFIGURATION FILE
#####
##### built by ca@wiz.smi.sendmail.com on Fri Jul 30 11:06:26 PDT 2004
##### in /extra/home/ca/sm-8.13.1/OpenSource/sendmail-8.13.1/cf/cf
##### built by ca@nother.smi.sendmail.com on Wed Oct 31 09:24:27 PDT 2007
##### in /extra/home/ca/sm-8.14.2/OpenSource/sendmail-8.14.2/cf/cf
##### using ../ as configuration include directory
#####
######################################################################
@@ -29,13 +29,13 @@
##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ #####
##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ #####
##### $Id: submit.mc,v 8.13 2003/09/10 22:12:48 ca Exp $ #####
##### $Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $ #####
##### $Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $ #####
##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ #####
##### $Id: proto.m4,v 8.710 2004/07/27 17:32:48 ca Exp $ #####
##### $Id: proto.m4,v 8.732 2007/04/20 00:53:30 ca Exp $ #####
# level 10 config file format
V10/Berkeley
@@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1]
# Configuration version number
DZ8.13.1/Submit
DZ8.14.2/Submit
###############
@@ -252,7 +252,7 @@ O PrivacyOptions=goaway,noetrn,restrictqrun
#O MinQueueAge=30m
# how many jobs can you process in the queue?
#O MaxQueueRunSize=10000
#O MaxQueueRunSize=0
# perform initial split of envelope without checking MX records
#O FastSplit=1
@@ -260,10 +260,11 @@ O PrivacyOptions=goaway,noetrn,restrictqrun
# queue directory
O QueueDirectory=/var/spool/clientmqueue
# key for shared memory; 0 to turn off
# key for shared memory; 0 to turn off, -1 to auto-select
#O SharedMemoryKey=0
# file to store auto-selected key for shared memory (SharedMemoryKey = -1)
#O SharedMemoryKeyFile
# timeouts (many of these)
#O Timeout.initial=5m
@@ -371,7 +372,7 @@ O TimeZoneSpec=
#O RetryFactor=90000
# default character set
#O DefaultCharSet=iso-8859-1
#O DefaultCharSet=unknown-8bit
# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
#O ServiceSwitchFile=/etc/mail/service.switch
@@ -380,13 +381,13 @@ O TimeZoneSpec=
#O HostsFile=/etc/hosts
# dialup line delay on connection failure
#O DialDelay=10s
#O DialDelay=0s
# action to take if there are no recipients in the message
#O NoRecipientAction=add-to-undisclosed
#O NoRecipientAction=none
# chrooted environment for writing to files
#O SafeFileEnvironment=/arch
#O SafeFileEnvironment
# are colons OK in addresses?
#O ColonOkInAddr=True
@@ -423,6 +424,9 @@ O DontInitGroups=True
# where do errors that occur when sending errors get sent?
#O DoubleBounceAddress=postmaster
# issue temporary errors (4xy) instead of permanent errors (5xy)?
#O SoftBounce=False
# where to save bounces if all else fails
#O DeadLetterDrop=/var/tmp/dead.letter
@@ -519,6 +523,12 @@ O PidFile=/var/spool/clientmqueue/sm-client.pid
# Random data source (required for systems without /dev/urandom under OpenSSL)
#O RandFile
# Maximum number of "useless" commands before slowing down
#O MaxNOOPCommands=20
# Name to use for EHLO (defaults to $j)
#O HeloName
############################
# QUEUE GROUP DEFINITIONS #
############################
@@ -1042,10 +1052,12 @@ R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required for sender address " $
...remote is not
# check results
R<?> $* $: @ $1 mark address: nothing known about it
R<$={ResOk}> $* $@ <OKR> domain ok: stop
R<$={ResOk}> $* $: @ $2 domain ok
R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
R<PERM> $* $#error $@ 5.1.8 $: "553 Domain of sender address " $&f " does not exist"
######################################################################
### check_rcpt -- check SMTP `RCPT TO:' command argument
######################################################################
@@ -1148,6 +1160,7 @@ R<?> $* $=R $@ RELAY
######################################################################
### trust_auth: is user trusted to authenticate as someone else?
###
@@ -1283,7 +1296,7 @@ R$* $#relay $@ ${MTAHost} $: $1 < @ $j >
### Local and Program Mailer specification ###
##################################################
##### $Id: local.m4,v 8.58 2000/10/26 01:58:29 ca Exp $ #####
##### $Id: local.m4,v 8.59 2004/11/23 00:37:25 ca Exp $ #####
#
# Envelope sender rewriting
@@ -1335,7 +1348,7 @@ Mprog, P=[IPC], F=lmDFMuXk5, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=$z:/,
### SMTP Mailer specification ###
#####################################
##### $Id: smtp.m4,v 8.64 2001/04/03 01:52:54 gshapiro Exp $ #####
##### $Id: smtp.m4,v 8.65 2006/07/12 21:08:10 ca Exp $ #####
#
# common sender and masquerading recipient rewriting
@@ -1441,7 +1454,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=
# #
#
# divert(0)dnl
# VERSIONID(`$Id: submit.mc,v 8.13 2003/09/10 22:12:48 ca Exp $')
# VERSIONID(`$Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $')
# define(`confCF_VERSION', `Submit')dnl
# define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
# define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
+1 -1
View File
@@ -15,7 +15,7 @@ divert(-1)
#
divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.13 2003/09/10 22:12:48 ca Exp $')
VERSIONID(`$Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
+7 -2
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2002, 2004, 2006 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@@ -10,15 +10,20 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: access_db.m4,v 8.26 2004/06/24 18:10:02 ca Exp $')
VERSIONID(`$Id: access_db.m4,v 8.27 2006/07/06 21:10:10 ca Exp $')
divert(-1)
define(`_ACCESS_TABLE_', `')
define(`_TAG_DELIM_', `:')dnl should be in OperatorChars
ifelse(lower(_ARG2_),`skip',`define(`_ACCESS_SKIP_', `1')')
ifelse(lower(_ARG2_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
ifelse(lower(_ARG2_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
ifelse(lower(_ARG3_),`skip',`define(`_ACCESS_SKIP_', `1')')
ifelse(lower(_ARG3_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
ifelse(lower(_ARG3_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
ifelse(lower(_ARG4_),`skip',`define(`_ACCESS_SKIP_', `1')')
ifelse(lower(_ARG4_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
ifelse(lower(_ARG4_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
define(`_ATMPF_', `<TMPF>')dnl
dnl check whether arg contains -T`'_ATMPF_
dnl unless it is a sequence map
+22
View File
@@ -0,0 +1,22 @@
divert(-1)
#
# Copyright (c) 2006 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: badmx.m4,v 1.1 2006/12/16 00:56:32 ca Exp $')
divert(-1)
define(`_BADMX_CHK_', 1)
LOCAL_CONFIG
Kmxlist bestmx -z: -T<TEMP>
Kbadmx regex -a<BADMX> ^(([0-9]{1,3}\.){3}[0-9]){0,1}\.$
KdnsA dns -R A -a. -T<TEMP>
KBadMXIP regex -a<BADMXIP> ifelse(defn(`_ARG_'), `', `^(127\.|10\.|0\.0\.0\.0)', `_ARG_')
@@ -0,0 +1,18 @@
divert(-1)
#
# Copyright (c) 2006 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)dnl
VERSIONID(`$Id: block_bad_helo.m4,v 1.1 2006/06/15 22:49:30 ca Exp $')
divert(-1)
define(`_BLOCK_BAD_HELO_', `')dnl
RELAY_DOMAIN(`127.0.0.1')dnl
LOCAL_DOMAIN(`[127.0.0.1]')dnl
+11 -5
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2002, 2005-2007 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@@ -12,13 +12,15 @@ divert(-1)
ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')')
divert(0)
ifdef(`_DNSBL_R_',`dnl',`dnl
VERSIONID(`$Id: dnsbl.m4,v 8.29 2002/08/09 21:02:08 ca Exp $')
VERSIONID(`$Id: dnsbl.m4,v 8.33 2007/01/05 18:49:29 ca Exp $')
define(`_DNSBL_R_',`')
ifelse(defn(`_ARG_'), `',
`errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')')
LOCAL_CONFIG
# map for DNS based blacklist lookups
Kdnsbl DNSBL_MAP -T<TMP>ifdef(`DNSBL_MAP_OPT',` DNSBL_MAP_OPT')')
divert(-1)
define(`_DNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl
define(`_DNSBL_SRV_', `_ARG_')dnl
define(`_DNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_DNSBL_SRV_`"',`_ARG2_')')dnl
define(`_DNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_DNSBL_SRV_`"',`_ARG3_')')dnl
divert(8)
@@ -28,6 +30,10 @@ R$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1._DNSBL_SRV_. $: OK $)
R<?>OK $: OKSOFAR
ifelse(len(X`'_ARG3_),`1',
`R<?>$+<TMP> $: TMPOK',
`R<?>$+<TMP> $#error $@ 4.7.1 $: _DNSBL_MSG_TMP_')
R<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_
`R<?>$+<TMP> $#error $@ 4.4.3 $: _DNSBL_MSG_TMP_')
ifelse(`X'_ARG2_,`Xquarantine',
`R<?>$+ $#error $@ quarantine $: _DNSBL_SRV_',
`X'_ARG2_,`Xdiscard',
`R<?>$+ $#discard $: _DNSBL_SRV_',
`R<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_')
divert(-1)
+20 -11
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
# Copyright (c) 2000-2002, 2005-2007 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@@ -9,19 +9,28 @@ divert(-1)
#
#
ifelse(defn(`_ARG_'), `',
`errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')')
divert(0)
ifdef(`_EDNSBL_R_',`dnl',`dnl
VERSIONID(`$Id: enhdnsbl.m4,v 1.9 2002/05/19 21:27:29 gshapiro Exp $')
VERSIONID(`$Id: enhdnsbl.m4,v 1.12 2007/01/08 18:22:05 ca Exp $')
LOCAL_CONFIG
define(`_EDNSBL_R_',`')dnl
# map for enhanced DNS based blacklist lookups
Kednsbl dns -R A -a. -T<TMP> -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5')
')
divert(-1)
define(`_EDNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl
define(`_EDNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_EDNSBL_SRV_`"',`_ARG2_')')dnl
define(`_EDNSBL_SRV_', `_ARG_')dnl
define(`_EDNSBL_MSG_',
`ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_EDNSBL_SRV_`"',
X`'_ARG2_,`Xquarantine',`_EDNSBL_SRV_',
`_ARG2_')')dnl
define(`_EDNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_EDNSBL_SRV_`"',`_ARG3_')')dnl
define(`_EDNSBL_MATCH_', `ifelse(len(X`'_ARG4_),`1',`$`'+',_ARG4_)')dnl
define(`_EDNSBL_ACTION_',
`ifelse(X`'_ARG2_,`Xquarantine',`$`'#error $`'@ quarantine',
X`'_ARG2_,`Xdiscard',`$`'#discard',
`$`'#error $`'@ 5.7.1')')dnl
divert(8)
# DNS based IP address spam list _EDNSBL_SRV_
R$* $: $&{client_addr}
@@ -29,16 +38,16 @@ R$-.$-.$-.$- $: <?> $(ednsbl $4.$3.$2.$1._EDNSBL_SRV_. $: OK $)
R<?>OK $: OKSOFAR
ifelse(len(X`'_ARG3_),`1',
`R<?>$+<TMP> $: TMPOK',
`R<?>$+<TMP> $#error $@ 4.7.1 $: _EDNSBL_MSG_TMP_')
R<?>_EDNSBL_MATCH_ $#error $@ 5.7.1 $: _EDNSBL_MSG_
`R<?>$+<TMP> $#error $@ 4.4.3 $: _EDNSBL_MSG_TMP_')
R<?>_EDNSBL_MATCH_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_
ifelse(len(X`'_ARG5_),`1',`dnl',
`R<?>_ARG5_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
`R<?>_ARG5_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
ifelse(len(X`'_ARG6_),`1',`dnl',
`R<?>_ARG6_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
`R<?>_ARG6_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
ifelse(len(X`'_ARG7_),`1',`dnl',
`R<?>_ARG7_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
`R<?>_ARG7_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
ifelse(len(X`'_ARG8_),`1',`dnl',
`R<?>_ARG8_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
`R<?>_ARG8_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
ifelse(len(X`'_ARG9_),`1',`dnl',
`R<?>_ARG9_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
`R<?>_ARG9_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
divert(-1)
+2 -2
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1999-2002, 2004 Sendmail, Inc. and its suppliers.
# Copyright (c) 1999-2002, 2004, 2007 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@@ -10,7 +10,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: ldap_routing.m4,v 8.14 2004/02/18 02:45:11 gshapiro Exp $')
VERSIONID(`$Id: ldap_routing.m4,v 8.15 2007/05/01 17:38:25 ca Exp $')
divert(-1)
# Check first two arguments. If they aren't set, may need to warn in proto.m4
+3 -3
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 2004 Sendmail, Inc. and its suppliers.
# Copyright (c) 2004, 2005 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@@ -11,7 +11,7 @@ divert(-1)
divert(0)
ifdef(`_MTAMARK_R',`dnl',`dnl
VERSIONID(`$Id: mtamark.m4,v 1.1 2004/03/22 19:22:40 ca Exp $')
VERSIONID(`$Id: mtamark.m4,v 1.2 2005/07/25 20:56:53 ca Exp $')
LOCAL_CONFIG
define(`_MTAMARK_R',`')dnl
# map for MTA mark
@@ -29,5 +29,5 @@ R<?>1. $: OKSOFAR
R<?>0. $#error $@ 5.7.1 $: _MTAMARK_MSG_
ifelse(len(X`'_ARG2_),`1',
`R<?>$+<TMP> $: TMPOK',
`R<?>$+<TMP> $#error $@ 4.7.1 $: _MTAMARK_MSG_TMP_')
`R<?>$+<TMP> $#error $@ 4.4.3 $: _MTAMARK_MSG_TMP_')
divert(-1)
@@ -0,0 +1,16 @@
divert(-1)
#
# Copyright (c) 2006 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)dnl
VERSIONID(`$Id: require_rdns.m4,v 1.1 2006/06/15 22:49:30 ca Exp $')
divert(-1)
define(`_REQUIRE_RDNS_', `')
+92 -19
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: proto.m4,v 8.710 2004/07/27 17:32:48 ca Exp $')
VERSIONID(`$Id: proto.m4,v 8.732 2007/04/20 00:53:30 ca Exp $')
# level CF_LEVEL config file format
V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
@@ -388,7 +388,7 @@ _OPTION(QueueSortOrder, `confQUEUE_SORT_ORDER', `priority')
_OPTION(MinQueueAge, `confMIN_QUEUE_AGE', `30m')
# how many jobs can you process in the queue?
_OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', `10000')
_OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', `0')
# perform initial split of envelope without checking MX records
_OPTION(FastSplit, `confFAST_SPLIT', `1')
@@ -396,12 +396,11 @@ _OPTION(FastSplit, `confFAST_SPLIT', `1')
# queue directory
O QueueDirectory=ifdef(`QUEUE_DIR', QUEUE_DIR, `/var/spool/mqueue')
# key for shared memory; 0 to turn off
# key for shared memory; 0 to turn off, -1 to auto-select
_OPTION(SharedMemoryKey, `confSHARED_MEMORY_KEY', `0')
ifdef(`confSHARED_MEMORY_KEY_FILE', `dnl
# file to store key for shared memory (if SharedMemoryKey = -1)
O SharedMemoryKeyFile=confSHARED_MEMORY_KEY_FILE')
# file to store auto-selected key for shared memory (SharedMemoryKey = -1)
_OPTION(SharedMemoryKeyFile, `confSHARED_MEMORY_KEY_FILE', `')
# timeouts (many of these)
_OPTION(Timeout.initial, `confTO_INITIAL', `5m')
@@ -452,7 +451,7 @@ _OPTION(DontPruneRoutes, `confDONT_PRUNE_ROUTES', `False')
_OPTION(SuperSafe, `confSAFE_QUEUE', `True')
# status file
O StatusFile=ifdef(`STATUS_FILE', `STATUS_FILE', `MAIL_SETTINGS_DIR`'statistics')
_OPTION(StatusFile, `STATUS_FILE')
# time zone handling:
# if undefined, use system default
@@ -511,7 +510,7 @@ _OPTION(ClassFactor, `confWORK_CLASS_FACTOR', `1800')
_OPTION(RetryFactor, `confWORK_TIME_FACTOR', `90000')
# default character set
_OPTION(DefaultCharSet, `confDEF_CHAR_SET', `iso-8859-1')
_OPTION(DefaultCharSet, `confDEF_CHAR_SET', `unknown-8bit')
# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
_OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', `MAIL_SETTINGS_DIR`'service.switch')
@@ -520,13 +519,13 @@ _OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', `MAIL_SETTINGS_DIR`'servic
_OPTION(HostsFile, `confHOSTS_FILE', `/etc/hosts')
# dialup line delay on connection failure
_OPTION(DialDelay, `confDIAL_DELAY', `10s')
_OPTION(DialDelay, `confDIAL_DELAY', `0s')
# action to take if there are no recipients in the message
_OPTION(NoRecipientAction, `confNO_RCPT_ACTION', `add-to-undisclosed')
_OPTION(NoRecipientAction, `confNO_RCPT_ACTION', `none')
# chrooted environment for writing to files
_OPTION(SafeFileEnvironment, `confSAFE_FILE_ENV', `/arch')
_OPTION(SafeFileEnvironment, `confSAFE_FILE_ENV', `')
# are colons OK in addresses?
_OPTION(ColonOkInAddr, `confCOLON_OK_IN_ADDR', `True')
@@ -565,6 +564,9 @@ ifdef(`confUNSAFE_GROUP_WRITES',
# where do errors that occur when sending errors get sent?
_OPTION(DoubleBounceAddress, `confDOUBLE_BOUNCE_ADDRESS', `postmaster')
# issue temporary errors (4xy) instead of permanent errors (5xy)?
_OPTION(SoftBounce, `confSOFT_BOUNCE', `False')
# where to save bounces if all else fails
_OPTION(DeadLetterDrop, `confDEAD_LETTER_DROP', `/var/tmp/dead.letter')
@@ -648,7 +650,9 @@ _OPTION(Milter.macros.connect, `confMILTER_MACROS_CONNECT', `')
_OPTION(Milter.macros.helo, `confMILTER_MACROS_HELO', `')
_OPTION(Milter.macros.envfrom, `confMILTER_MACROS_ENVFROM', `')
_OPTION(Milter.macros.envrcpt, `confMILTER_MACROS_ENVRCPT', `')
_OPTION(Milter.macros.eom, `confMILTER_MACROS_EOM', `')')
_OPTION(Milter.macros.eom, `confMILTER_MACROS_EOM', `')
_OPTION(Milter.macros.eoh, `confMILTER_MACROS_EOH', `')
_OPTION(Milter.macros.data, `confMILTER_MACROS_DATA', `')')
# CA directory
_OPTION(CACertPath, `confCACERT_PATH', `')
@@ -669,6 +673,12 @@ _OPTION(DHParameters, `confDH_PARAMETERS', `')
# Random data source (required for systems without /dev/urandom under OpenSSL)
_OPTION(RandFile, `confRAND_FILE', `')
# Maximum number of "useless" commands before slowing down
_OPTION(MaxNOOPCommands, `confMAX_NOOP_COMMANDS', `20')
# Name to use for EHLO (defaults to $j)
_OPTION(HeloName, `confHELO_NAME')
############################
`# QUEUE GROUP DEFINITIONS #'
############################
@@ -1782,6 +1792,14 @@ ifdef(`_CONN_CONTROL_IMMEDIATE_',`',`dnl
dnl workspace: ignored...
R$* $: $>"ConnControl" dummy')', `dnl')
undivert(8)
ifdef(`_REQUIRE_RDNS_', `dnl
R$* $: $&{client_addr} $| $&{client_resolve}
R$=R $* $@ RELAY We relay for these
R$* $| OK $@ OK Resolves.
R$* $| FAIL $#error $@ 5.7.1 $: 550 Fix reverse DNS for $1
R$* $| TEMP $#error $@ 4.1.8 $: 451 Client IP address $1 does not resolve
R$* $| FORGED $#error $@ 4.1.8 $: 451 Possibly forged hostname for $1
', `dnl')
######################################################################
### check_mail -- check SMTP ``MAIL FROM:'' command argument
@@ -1907,7 +1925,7 @@ R<? $+> $* $#error $@ 5.5.4 $: "_CODE553 Domain name required for sender addres
...remote is not')
# check results
R<?> $* $: @ $1 mark address: nothing known about it
R<$={ResOk}> $* $@ <_RES_OK_> domain ok: stop
R<$={ResOk}> $* $: @ $2 domain ok
R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
R<PERM> $* $#error $@ 5.1.8 $: "_CODE553 Domain of sender address " $&f " does not exist"
ifdef(`_ACCESS_TABLE_', `dnl
@@ -1922,6 +1940,34 @@ ifdef(`_ATMPF_', `R<_ATMPF_> $* $#error $@ 4.3.0 $: "451 Temporary system failu
dnl generic error from access map
R<$+> $* $#error $: $1 error from access db',
`dnl')
dnl workspace: @ CanonicalAddress (i.e. address in canonical form localpart<@host>)
ifdef(`_BADMX_CHK_', `dnl
R@ $*<@$+>$* $: $1<@$2>$3 $| $>BadMX $2
R$* $| $#$* $#$2
SBadMX
# Look up MX records and ferret away a copy of the original address.
# input: domain part of address to check
R$+ $:<MX><$1><:$(mxlist $1$):><:>
# workspace: <MX><domain><: mxlist-result $><:>
R<MX><$+><:$*<TEMP>:><$*> $#error $@ 4.1.2 $: "450 MX lookup failure for "$1
# workspace: <MX> <original destination> <unchecked mxlist> <checked mxlist>
# Recursively run badmx check on each mx.
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><: $4 $(badmx $2 $):>
# See if any of them fail.
R<MX><$*><$*><$*<BADMX>:$*> $#error $@ 5.1.2 $:"550 Illegal MX record for recipient host "$1
# Reverse the mxlists so we can use the same argument order again.
R<MX><$*><$*><$*> $:<MX><$1><$3><$2>
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><:$4 $(dnsA $2 $) :>
# Reverse the lists so we can use the same argument order again.
R<MX><$*><$*><$*> $:<MX><$1><$3><$2>
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><:$4 $(BadMXIP $2 $) :>
R<MX><$*><$*><$*<BADMXIP>:$*> $#error $@ 5.1.2 $:"550 Invalid MX record for recipient host "$1',
`dnl')
######################################################################
### check_rcpt -- check SMTP ``RCPT TO:'' command argument
@@ -1959,7 +2005,7 @@ R<@> < $* @ $+ . $+ > $: < $1 @ $2 . $3 >
dnl prepend daemon_flags
R<@> $* $: $&{daemon_flags} $| <@> $1
dnl workspace: ${daemon_flags} $| <@> <address>
dnl 'r'equire qual.rcpt: ok
dnl _r_equire qual.rcpt: ok
R$* r $* $| <@> < $+ @ $+ > $: < $3 @ $4 >
dnl do not allow these at all or only from local systems?
R$* r $* $| <@> < $* > $: < ? $&{client_name} > < $3 >
@@ -2312,6 +2358,7 @@ ifdef(`_SPAM_HATER_',
R<HATER> $+ $: $1 spam hater: continue checks
R<$*> $+ $@ $>"Delay_TLS_Clt2" NOSPAMHATER everyone else: stop
dnl',`dnl')
dnl run further checks: check_mail
dnl should we "clean up" $&f?
ifdef(`_FFR_MAIL_MACRO',
@@ -2325,6 +2372,27 @@ R$* $| $#$* $#$2
R$* $| $* $: $1
', `dnl')
ifdef(`_BLOCK_BAD_HELO_', `dnl
R$* $: $1 $| <$&{auth_authen}> Get auth info
dnl Bypass the test for users who have authenticated.
R$* $| <$+> $: $1 skip if auth
R$* $| <$*> $: $1 $| <$&{client_addr}> [$&s] Get connection info
dnl Bypass for local clients -- IP address starts with $=R
R$* $| <$=R $*> [$*] $: $1 skip if local client
dnl Bypass a "sendmail -bs" session, which use 0 for client ip address
R$* $| <0> [$*] $: $1 skip if sendmail -bs
dnl Reject our IP - assumes "[ip]" is in class $=w
R$* $| <$*> $=w $#error $@ 5.7.1 $:"550 bogus HELO name used: " $&s
dnl Reject our hostname
R$* $| <$*> [$=w] $#error $@ 5.7.1 $:"550 bogus HELO name used: " $&s
dnl Pass anything else with a "." in the domain parameter
R$* $| <$*> [$+.$+] $: $1 qualified domain ok
dnl Reject if there was no "." or only an initial or final "."
R$* $| <$*> [$*] $#error $@ 5.7.1 $:"550 bogus HELO name used: " $&s
dnl Clean up the workspace
R$* $| $* $: $1
', `dnl')
ifdef(`_ACCESS_TABLE_', `dnl', `divert(-1)')
######################################################################
### F: LookUpFull -- search for an entry in access database
@@ -2698,6 +2766,11 @@ RSOFTWARE $| <$-:$+> $* $#error $@ $2 $: $1 " TLS handshake failed."
dnl no <reply:dns> i.e. not requirements in the access map
dnl use default error
RSOFTWARE $| $* $#error $@ ifdef(`TLS_PERM_ERR', `5.7.0', `4.7.0') $: "ifdef(`TLS_PERM_ERR', `503', `403') TLS handshake failed."
# deal with TLS protocol errors: abort
RPROTOCOL $| <$-:$+> $* $#error $@ $2 $: $1 " STARTTLS failed."
dnl no <reply:dns> i.e. not requirements in the access map
dnl use default error
RPROTOCOL $| $* $#error $@ ifdef(`TLS_PERM_ERR', `5.7.0', `4.7.0') $: "ifdef(`TLS_PERM_ERR', `503', `403') STARTTLS failed."
R$* $| <$*> <VERIFY> $: <$2> <VERIFY> <> $1
dnl separate optional requirements
R$* $| <$*> <VERIFY + $+> $: <$2> <VERIFY> <$3> $1
@@ -2889,9 +2962,9 @@ ifdef(`_ATMPF_', `dnl tempfail?
R<$* _ATMPF_> $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."', `dnl')
dnl use the generic routine (for now)
R<0> $@ OK no limit
R<$+> $: <$1> $| $(arith l $@ $&{client_rate} $@ $1 $)
R<$+> $: <$1> $| $(arith l $@ $1 $@ $&{client_rate} $)
dnl log this? Connection rate $&{client_rate} exceeds limit $1.
R<$+> $| FALSE $#error $@ 4.3.2 $: _RATE_CONTROL_REPLY Connection rate limit exceeded.
R<$+> $| TRUE $#error $@ 4.3.2 $: _RATE_CONTROL_REPLY Connection rate limit exceeded.
')')
ifdef(`_CONN_CONTROL_',`dnl
@@ -2911,9 +2984,9 @@ ifdef(`_ATMPF_', `dnl tempfail?
R<$* _ATMPF_> $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."', `dnl')
dnl use the generic routine (for now)
R<0> $@ OK no limit
R<$+> $: <$1> $| $(arith l $@ $&{client_connections} $@ $1 $)
R<$+> $: <$1> $| $(arith l $@ $1 $@ $&{client_connections} $)
dnl log this: Open connections $&{client_connections} exceeds limit $1.
R<$+> $| FALSE $#error $@ 4.3.2 $: _CONN_CONTROL_REPLY Too many open connections.
R<$+> $| TRUE $#error $@ 4.3.2 $: _CONN_CONTROL_REPLY Too many open connections.
')')
undivert(9)dnl LOCAL_RULESETS
+3 -3
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -11,8 +11,8 @@ divert(-1)
# the sendmail distribution.
#
#
VERSIONID(`$Id: version.m4,v 8.117 2004/07/30 18:03:07 ca Exp $')
VERSIONID(`$Id: version.m4,v 8.186 2007/10/31 16:04:13 ca Exp $')
#
divert(0)
# Configuration version number
DZ8.13.1`'ifdef(`confCF_VERSION', `/confCF_VERSION')
DZ8.14.2`'ifdef(`confCF_VERSION', `/confCF_VERSION')
+3 -3
View File
@@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2000, 2004 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -32,7 +32,7 @@ POPDIVERT
### Local and Program Mailer specification ###
##################################################
VERSIONID(`$Id: local.m4,v 8.58 2000/10/26 01:58:29 ca Exp $')
VERSIONID(`$Id: local.m4,v 8.59 2004/11/23 00:37:25 ca Exp $')
#
# Envelope sender rewriting
@@ -88,6 +88,6 @@ R$+ $@ $1 < @ *LOCAL* > add local qualification',
Mlocal, P=LOCAL_MAILER_PATH, F=_MODMF_(CONCAT(_DEF_LOCAL_MAILER_FLAGS, LOCAL_MAILER_FLAGS), `LOCAL'), LOCAL_RWR,_OPTINS(`LOCAL_MAILER_EOL', ` E=', `, ')
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`LOCAL_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/LOCAL_MAILER_DSN_DIAGNOSTIC_CODE,_LOCAL_QGRP
A=LOCAL_MAILER_ARGS
Mprog, P=LOCAL_SHELL_PATH, F=CONCAT(_DEF_LOCAL_SHELL_FLAGS, LOCAL_SHELL_FLAGS), S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=LOCAL_SHELL_DIR,
Mprog, P=LOCAL_SHELL_PATH, F=_MODMF_(CONCAT(_DEF_LOCAL_SHELL_FLAGS, LOCAL_SHELL_FLAGS), `SHELL'), S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=LOCAL_SHELL_DIR,
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')T=X-Unix/X-Unix/X-Unix,_PROG_QGRP
A=LOCAL_SHELL_ARGS
+9 -7
View File
@@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001, 2006 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -13,6 +13,8 @@ PUSHDIVERT(-1)
#
_DEFIFNOT(`_DEF_SMTP_MAILER_FLAGS', `mDFMuX')
_DEFIFNOT(`SMTP_MAILER_FLAGS',`')
_DEFIFNOT(`SMTP_MAILER_LL',`990')
_DEFIFNOT(`RELAY_MAILER_LL',`2040')
_DEFIFNOT(`RELAY_MAILER_FLAGS', `SMTP_MAILER_FLAGS')
ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `TCP $h')')
ifdef(`ESMTP_MAILER_ARGS',, `define(`ESMTP_MAILER_ARGS', `TCP $h')')
@@ -29,7 +31,7 @@ POPDIVERT
### SMTP Mailer specification ###
#####################################
VERSIONID(`$Id: smtp.m4,v 8.64 2001/04/03 01:52:54 gshapiro Exp $')
VERSIONID(`$Id: smtp.m4,v 8.65 2006/07/12 21:08:10 ca Exp $')
#
# common sender and masquerading recipient rewriting
@@ -105,18 +107,18 @@ SMasqRelay
R$+ $: $>MasqSMTP $1
R$+ $: $>MasqHdr $1
Msmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, SMTP_MAILER_FLAGS), `SMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
Msmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, SMTP_MAILER_FLAGS), `SMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_SMTP_QGRP
A=SMTP_MAILER_ARGS
Mesmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a', SMTP_MAILER_FLAGS), `ESMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
Mesmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a', SMTP_MAILER_FLAGS), `ESMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_ESMTP_QGRP
A=ESMTP_MAILER_ARGS
Msmtp8, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `8', SMTP_MAILER_FLAGS), `SMTP8'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
Msmtp8, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `8', SMTP_MAILER_FLAGS), `SMTP8'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_SMTP8_QGRP
A=SMTP8_MAILER_ARGS
Mdsmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a%', SMTP_MAILER_FLAGS), `DSMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
Mdsmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a%', SMTP_MAILER_FLAGS), `DSMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_DSMTP_QGRP
A=DSMTP_MAILER_ARGS
Mrelay, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a8', RELAY_MAILER_FLAGS), `RELAY'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `MasqSMTP/MasqRelay', `MasqSMTP'), E=\r\n, L=2040,
Mrelay, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a8', RELAY_MAILER_FLAGS), `RELAY'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `MasqSMTP/MasqRelay', `MasqSMTP'), E=\r\n, L=RELAY_MAILER_LL,
_OPTINS(`RELAY_MAILER_CHARSET', `C=', `, ')_OPTINS(`RELAY_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')T=DNS/RFC822/SMTP,_RELAY_QGRP
A=RELAY_MAILER_ARGS
+2 -1
View File
@@ -10,9 +10,10 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: darwin.m4,v 8.3 2002/03/05 01:55:40 ca Exp $')
VERSIONID(`$Id: darwin.m4,v 8.4 2005/06/30 01:16:04 ca Exp $')
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
dnl turn on S flag for local mailer
MODIFY_MAILER_FLAGS(`LOCAL', `+S')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
define(`confDONT_BLAME_SENDMAIL', `AssumeSafeChown,GroupWritableDirPathSafe')dnl
+20
View File
@@ -0,0 +1,20 @@
divert(-1)
#
# Copyright (c) 2001, 2004 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: dragonfly.m4,v 1.1 2004/08/06 03:54:05 gshapiro Exp $')
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
dnl turn on S flag for local mailer
MODIFY_MAILER_FLAGS(`LOCAL', `+S')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail $u')')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', `/usr/local/bin/uux')')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
+20
View File
@@ -0,0 +1,20 @@
divert(-1)
#
# Copyright (c) 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: freebsd6.m4,v 1.1 2005/06/14 02:16:35 gshapiro Exp $')
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
dnl turn on S flag for local mailer
MODIFY_MAILER_FLAGS(`LOCAL', `+S')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail $u')')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', `/usr/local/bin/uux')')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
+4 -3
View File
@@ -1,15 +1,16 @@
# Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
# Copyright (c) 2000-2002, 2005 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
# $Id: sendmail.schema,v 8.21 2002/11/20 23:13:50 gshapiro Exp $
# $Id: sendmail.schema,v 8.22 2005/09/16 20:18:14 ca Exp $
# Note that this schema is experimental at this point as it has had little
# public review. Therefore, it may change in future versions. Feedback
# via sendmail@sendmail.org is encouraged.
# via sendmail-YYYY@support.sendmail.org is encouraged (replace YYYY with
# the current year, e.g., 2005).
# OID arcs for Sendmail
# enterprise: 1.3.6.1.4.1
+33 -21
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
# Copyright (c) 1999-2003 Gregory Neil Shapiro. All Rights Reserved.
# Copyright (c) 1999-2004, 2007 Gregory Neil Shapiro. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -27,7 +27,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# $Id: buildvirtuser,v 1.6 2003/03/15 23:30:09 gshapiro Exp $
# $Id: buildvirtuser,v 1.8 2007/10/08 18:44:15 gshapiro Exp $
=head1 NAME
@@ -70,30 +70,21 @@ to take affect.
=head1 EXAMPLES
Here are some example files from the /etc/mail/virtusers/ directory:
Here is an example file from the /etc/mail/virtusers/ directory:
=head2 /etc/mail/virtusers/bsdunix.org:
=head2 /etc/mail/virtusers/example.org:
# Services
MAILER-DAEMON gshapiro+bounce.$DOMAIN@gshapiro.net
postmaster gshapiro+$LHS.$DOMAIN@gshapiro.net
webmaster gshapiro+$LHS.$DOMAIN@gshapiro.net
MAILER-DAEMON gshapiro+bounce.$DOMAIN@example.net
postmaster gshapiro+$LHS.$DOMAIN@example.net
webmaster gshapiro+$LHS.$DOMAIN@example.net
# Defaults
error:nouser No such user
# Users
gshapiro gshapiro+$DOMAIN@gshapiro.net
bob [email protected]
=head2 /etc/mail/virtusers/smtp.org:
# Defaults
[email protected]
# Users
john [email protected]
nancy [email protected]
gshapiro gshapiro+$DOMAIN@example.net
zoe [email protected]
=head1 AUTHOR
@@ -102,6 +93,7 @@ Gregory Neil Shapiro E<lt>F<[email protected]>E<gt>
=cut
use strict;
use File::stat;
use Getopt::Std;
my $makemap = "/usr/sbin/makemap";
@@ -117,6 +109,18 @@ my $newest = 0;
my ($lhs, $domain, $key, $value);
my $opts = {};
sub preserve_perms ($$)
{
my $old = shift;
my $new = shift;
my $st;
$st = stat($old);
return if (!defined($st));
chmod($st->mode, $new) || warn "Could not chmod($st->mode, $new): $!\n";
chown($st->uid, $st->gid, $new) || warn "Could not chmod($st->uid, $st->gid, $new): $!\n";
}
getopts('ft', $opts) || die "Usage: $0 [-f] [-t]\n";
if ($opts->{t})
@@ -131,9 +135,12 @@ closedir(VIRTS) || die "Could not close directory $virts: $!\n";
foreach $domain (@virts)
{
next if ($domain =~ m/^\./);
open(DOMAIN, "$virts/$domain") || die "Could not open file $virts/$domain: $!\n";
my $line = 0;
my $mtime = (stat(DOMAIN))[9] || 0;
my $mtime = 0;
my $st = stat("$virts/$domain");
$mtime = $st->mtime if (defined($st));
if ($mtime > $newest)
{
$newest = $mtime;
@@ -160,7 +167,7 @@ LINE: while (<DOMAIN>)
}
else
{
die "Bogus line $line in $virts/$domain\n";
warn "Bogus line $line in $virts/$domain\n";
}
# Variable subsitution
@@ -172,7 +179,9 @@ LINE: while (<DOMAIN>)
close(DOMAIN) || die "Could not close $virts/$domain: $!\n";
}
my $virtmtime = (stat($virt))[9] || 0;
my $virtmtime = 0;
my $st = stat($virt);
$virtmtime = $st->mtime if (defined($st));
if ($opts->{f} || $virtmtime < $newest)
{
print STDOUT "Rebuilding $virt\n";
@@ -191,14 +200,17 @@ if ($opts->{f} || $virtmtime < $newest)
print MAKEMAP "$key\t\t$virt{$key}\n";
}
close(MAKEMAP) || die "Could not close makemap ($?): $!\n";
preserve_perms($virt, $newvirt);
rename($newvirt, $virt) || die "Could not rename $newvirt to $virt: $!\n";
open(VIRTHOST, ">$newvirthosts") || die "Could not open file $newvirthosts: $!\n";
foreach $domain (sort @virts)
{
next if ($domain =~ m/^\./);
print VIRTHOST "$domain\n";
}
close(VIRTHOST) || die "Could not close $newvirthosts: $!\n";
preserve_perms($virthosts, $newvirthosts);
rename($newvirthosts, $virthosts) || die "Could not rename $newvirthosts to $virthosts: $!\n";
}
exit 0;
+57 -13
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
# $Id: cidrexpand,v 8.4 2002/11/22 21:13:14 ca Exp $
# $Id: cidrexpand,v 8.8 2006/08/07 17:18:37 ca Exp $
#
# v 0.4
#
@@ -28,6 +28,21 @@
# Added clarification in the notes for what to do if you have
# exceptions to a larger CIDR block.
#
# 26 Jul 2006 Richard Rognlie ([email protected]>
# Added code to strip "comments" (anything after a non-escaped #)
# # characters after a \ or within quotes (single and double) are
# left intact.
#
# e.g.
# From:1.2.3.4 550 Die spammer # spammed us 2006.07.26
# becomes
# From:1.2.3.4 550 Die spammer
#
# 3 August 2006
#
# Corrected a bug to have it handle the special case of "0.0.0.0/0"
# since Net::CIDR doesn't handle it properly.
#
# usage:
# cidrexpand < /etc/mail/access | makemap -r hash /etc/mail/access
#
@@ -38,32 +53,59 @@
use strict;
use Net::CIDR;
use Getopt::Std;
our ($opt_c,$opt_t);
getopts('ct:');
my $spaceregex = '\s+';
while (my $arg = shift @ARGV)
if ($opt_t)
{
if ($arg eq '-t')
{
$spaceregex = shift;
}
$spaceregex = $opt_t;
}
use strict;
my $SENDMAIL = 1;
while (<>)
{
chomp;
my ($prefix,$left,$right,$space);
if ( (/\#/) && $opt_c )
{
# print "checking...\n";
my $i;
my $qtype='';
for ($i=0 ; $i<length($_) ; $i++)
{
my $ch = substr($_,$i,1);
if ($ch eq '\\')
{
$i++;
next;
}
elsif ($qtype eq '' && $ch eq '#')
{
substr($_,$i) = '';
last;
}
elsif ($qtype ne '' && $ch eq $qtype)
{
$qtype = '';
}
elsif ($qtype eq '' && $ch =~ /[\'\"]/)
{
$qtype = $ch;
}
}
}
if (! /^(|\S\S*:)(\d+\.){3}\d+\/\d\d?$spaceregex.*/ )
{
print;
print "$_\n";
}
else
{
($prefix,$left,$space,$right) = /^(|\S\S*:)((?:\d+\.){3}\d+\/\d\d?)($spaceregex)(.*)$/;
($prefix,$left,$space,$right) =
/^(|\S\S*:)((?:\d+\.){3}\d+\/\d\d?)($spaceregex)(.*)$/;
my @new_lefts = expand_network($left);
foreach my $nl (@new_lefts)
@@ -80,6 +122,8 @@ sub expand_network
my ($network,$mask) = split /\//, $left_input;
if (defined $mask)
{
return (0..255) if $mask == 0;
my @parts = split /\./, $network;
while ($#parts < 3)
{
+3 -3
View File
@@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
# Copyright (c) 2001-2002, 2005 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@@ -59,7 +59,7 @@ dnl ## address returned does not begin 127, then the mail is
dnl ## processed as if the HACK line were not present.
divert(0)
VERSIONID(`$Id: dnsblaccess.m4,v 1.5 2002/05/19 21:30:06 gshapiro Exp $')
VERSIONID(`$Id: dnsblaccess.m4,v 1.6 2005/07/25 23:32:05 ca Exp $')
ifdef(`_ACCESS_TABLE_', `dnl',
`errprint(`*** ERROR: dnsblaccess requires FEATURE(`access_db')
')')
@@ -85,7 +85,7 @@ R<?>$* $- .<>$* <$(access _EDNSBL_KEY_`:'$1$2 $@$3 $@`'_EDNSBL_SRV_ $: ? $)> $1
R<?>$* <>$* $:<$(access _EDNSBL_KEY_`:' $@$2 $@`'_EDNSBL_SRV_ $: ? $)> <>$2
ifelse(len(X`'_ARG3_),`1',
`R<$*<TMPF>>$* $: TMPOK',
`R<$*<TMPF>>$* $#error $@ 4.7.1 $: _EDNSBL_MSG_TMP_')
`R<$*<TMPF>>$* $#error $@ 4.4.3 $: _EDNSBL_MSG_TMP_')
R<$={Accept}>$* $: OKSOFAR
R<ERROR:$-.$-.$-:$+> $* $#error $@ $1.$2.$3 $: $4
R<ERROR:$+> $* $#error $: $1
+45 -2
View File
@@ -3,7 +3,7 @@
## Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
## All rights reserved.
##
## $Id: qtool.pl,v 8.28 2002/06/27 23:06:16 gshapiro Exp $
## $Id: qtool.pl,v 8.29 2007/02/16 01:12:08 ca Exp $
##
use strict;
use File::Basename;
@@ -69,6 +69,12 @@ my $new_condition;
my $qprefix;
my $queuegroups = 0;
my $conditions = new Compound();
my $fcntl_struct = 's H60';
my $fcntl_structlockp = pack($fcntl_struct, Fcntl::F_WRLCK,
"000000000000000000000000000000000000000000000000000000000000");
my $fcntl_structunlockp = pack($fcntl_struct, Fcntl::F_UNLCK,
"000000000000000000000000000000000000000000000000000000000000");
my $lock_both = -1;
Getopt::Std::getopts('bC:de:Qs:', \%opts);
@@ -340,7 +346,9 @@ sub add_source
## Opens a file for read/write and uses flock to obtain a lock on the
## file. The flock is Perl's flock which defaults to flock on systems
## that support it. On systems without flock it falls back to fcntl
## locking.
## locking. This script will also call fcntl explicitly if flock
## uses BSD semantics (i.e. if both flock() and fcntl() can successfully
## lock the file at the same time)
##
## Parameters:
## file_name -- The name of the file to open and lock.
@@ -358,6 +366,24 @@ sub lock_file
my $file_name = shift;
my $result;
if ($lock_both == -1)
{
if (open(DEVNULL, '>/dev/null'))
{
my $flock_status = flock(DEVNULL, Fcntl::LOCK_EX | Fcntl::LOCK_NB);
my $fcntl_status = fcntl (DEVNULL, Fcntl::F_SETLK, $fcntl_structlockp);
close(DEVNULL);
$lock_both = ($flock_status && $fcntl_status);
}
else
{
# Couldn't open /dev/null. Windows system?
$lock_both = 0;
}
}
$result = sysopen(FILE_TO_LOCK, $file_name, Fcntl::O_RDWR);
if (!$result)
{
@@ -370,6 +396,15 @@ sub lock_file
return (undef, "Could not obtain lock on '$file_name': $!");
}
if ($lock_both)
{
my $result2 = fcntl (FILE_TO_LOCK, Fcntl::F_SETLK, $fcntl_structlockp);
if (!$result2)
{
return (undef, "Could not obtain fcntl lock on '$file_name': $!");
}
}
return (\*FILE_TO_LOCK, undef);
}
@@ -396,6 +431,14 @@ sub unlock_file
{
return "Unlock failed on '$result': $!";
}
if ($lock_both)
{
my $result2 = fcntl ($file, Fcntl::F_SETLK, $fcntl_structunlockp);
if (!$result2)
{
return (undef, "Fcntl unlock failed on '$result': $!");
}
}
return undef;
}
+2 -1
View File
@@ -1,4 +1,4 @@
# $Id: Makefile,v 8.15 2004/07/20 20:25:10 ca Exp $
# $Id: Makefile,v 8.16 2006/01/05 22:03:31 ca Exp $
DIR= smm/08.sendmailop
SRCS= op.me
@@ -22,6 +22,7 @@ all: ${OBJS}
op.ps: ${SRCS}
rm -f $@
${PIC} ${SRCS} | ${EQNPS} | ${ROFFPS} > $@
test -s $@ || ${ROFFPS} -p -e ${SRCS} > $@
op.txt: ${SRCS}
rm -f $@
+172 -47
View File
@@ -1,4 +1,4 @@
.\" Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
.\" Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers.
.\" All rights reserved.
.\" Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
.\" Copyright (c) 1983, 1993
@@ -9,7 +9,7 @@
.\" the sendmail distribution.
.\"
.\"
.\" $Id: op.me,v 8.699 2004/06/03 18:29:01 ca Exp $
.\" $Id: op.me,v 8.741 2007/06/22 23:08:59 ca Exp $
.\"
.\" eqn op.me | pic | troff -me
.\"
@@ -90,10 +90,10 @@ Sendmail, Inc.
.de Ve
Version \\$2
..
.Ve $Revision: 8.699 $
.Ve $Revision: 8.741 $
.rm Ve
.sp
For Sendmail Version 8.13
For Sendmail Version 8.14
.)l
.(f
Sendmail is a trademark of Sendmail, Inc.
@@ -982,7 +982,7 @@ This should be a link to /usr/\*(SD/sendmail.
.sh 3 "sendmail.pid"
.pp
.i sendmail
stores its current pid in the file specifed by the
stores its current pid in the file specified by the
.b PidFile
option (default is _PATH_SENDMAILPID).
.i sendmail
@@ -1475,6 +1475,18 @@ option, so that it may be shared between several invocations of
.i sendmail .
This allows mail to be queued immediately or skipped during a queue run if
there has been a recent failure in connecting to a remote machine.
Note: information about a remote system is stored in a file
whose pathname consists of the components of the hostname in reverse order.
For example, the information for
.b host.example.com
is stored in
.b com./example./host .
For top-level domains like
.b com
this can create a large number of subdirectories
which on some filesystems can exhaust some limits.
Moreover, the performance of lookups in directory with thousands of entries
can be fairly slow depending on the filesystem implementation.
.pp
Additionally enabling
.b SingleThreadDelivery
@@ -1621,7 +1633,7 @@ the
.i address
part of the triple is looked up as the key
(i.e., the left hand side)
into the alias database.
in the alias database.
If there is a match, the address is deleted from the send queue
and all addresses on the right hand side of the alias
are added in place of the alias that was found.
@@ -3916,6 +3928,11 @@ The complete syntax for ruleset 0 is:
This specifies the
{mailer, host, user}
3-tuple necessary to direct the mailer.
Note: the third element (
.i user
) is often also called
.i address
part.
If the mailer is local
the host part may be omitted\**.
.(f
@@ -4242,6 +4259,13 @@ It can accept or reject mail transfer between these two addresses
much like the
.i checkcompat()
function.
Note:
while other
.i check_*
rulesets are invoked during the SMTP mail receiption stage
(i.e., in the SMTP server),
.i check_compat
is invoked during the mail delivery stage.
.sh 4 "check_eoh"
.pp
The
@@ -4293,6 +4317,13 @@ Keep in mind the Message-Id: header is not a required header and
is not a guaranteed spam indicator.
This ruleset is an example and
should probably not be used in production.
.sh 4 "check_eom"
.pp
The
.i check_eom
ruleset is called after the end of a message,
its parameter is the message size.
It can accept or reject the message.
.sh 4 "check_etrn"
.pp
The
@@ -4781,7 +4812,8 @@ command line flag or by the SMTP server code.
Sender's host name.
Set from the
.b \-p
command line flag or by the SMTP server code.
command line flag or by the SMTP server code
(in which case it is set to the EHLO/HELO parameter).
.ip $t
A numeric representation of the current time in the format YYYYMMDDHHmm
(4 digit year 1900-9999, 2 digit month 01-12, 2 digit day 01-31,
@@ -4809,9 +4841,6 @@ This macro contains up to three characters, the first
is either `e' or `h' for envelope/header address,
the second is a space,
and the third is either `s' or `r' for sender/recipient address.
Notice: for header addresses no distinction is currently made
between sender and recipient addresses, i.e., the macro contains
only `h'.
.ip ${alg_bits}
The maximum keylength (in bits) of the symmetric encryption algorithm
used for a TLS connection.
@@ -4860,6 +4889,18 @@ IPv6 addresses are tagged with "IPv6:" before the address.
Defined in the SMTP server only.
.ip ${client_connections}
The number of open connections in the SMTP server for the client IP address.
.ip ${client_flags}
The flags specified by the
Modifier= part of
.b ClientPortOptions
where flags are separated from each other by spaces
and upper case flags are doubled.
That is,
Modifier=hA
will be represented as
"h AA" in
.b ${client_flags} ,
which is required for testing the flags in rulesets.
.ip ${client_name}
The host name of the SMTP client.
This may be the client's bracketed IP address
@@ -5514,7 +5555,7 @@ set to be the set of all names
this host is known by.
This can be used to match local hostnames.
.ip $={persistentMacros}
set to the macros would should be saved across queue runs.
set to the macros that should be saved across queue runs.
Care should be taken when adding macro names to this class.
.pp
.i Sendmail
@@ -5596,7 +5637,8 @@ Run Extended SMTP (ESMTP) protocol (defined in RFCs 1869, 1652, and 1870).
This flag defaults on if the SMTP greeting message includes the word
.q ESMTP .
.ip A
Look up the user part of the address in the alias database.
Look up the user (address) part of the resolved mailer triple,
in the alias database.
Normally this is only set for local mailers.
.ip b
Force a blank line on the end of a message.
@@ -6647,6 +6689,7 @@ A running
daemon can be controlled through this named socket.
Available commands are:
.i help,
.i mstat,
.i restart,
.i shutdown,
and
@@ -6692,6 +6735,11 @@ Listen Size of listen queue (defaults to 10)
Modifier Options (flags) for the daemon
SndBufSize Size of TCP send buffer
RcvBufSize Size of TCP receive buffer
children maximum number of children per daemon, see \fBMaxDaemonChildren\fP.
DeliveryMode Delivery mode per daemon, see \fBDeliveryMode\fP.
refuseLA RefuseLA per daemon
delayLA DelayLA per daemon
queueLA QueueLA per daemon
.)b
The
.i Name
@@ -6891,6 +6939,10 @@ The
.b \-v
command line flag sets this to
.b i .
Note: for internal reasons,
``i'' does not work
if a milter is enabled which can reject or delete recipients.
In that case the mode will be changed to ``b''.
.ip DialDelay=\fIsleeptime\fP
[no short name]
Dial-on-demand network connections can see timeouts
@@ -7157,11 +7209,9 @@ will search first in /var/forward/\c
and then in
.i ~username /.forward
(but only if the first file does not exist).
.ip HelpFile=\fIfile\fP
[H]
Specify the help file
for SMTP.
If no file name is specified, "helpfile" is used.
.ip HeloName=\fIname\fP
[no short name]
Set the name to be used for HELO/EHLO (instead of $j).
.ip HoldExpensive
[c]
If an outgoing mailer is marked as being expensive,
@@ -7275,8 +7325,18 @@ will refuse connections when it has more than
.i N
children processing incoming mail or automatic queue runs.
This does not limit the number of outgoing connections.
If the default
.b DeliveryMode
(background) is used, then
.i sendmail
may create an almost unlimited number of children
(depending on the number of transactions and the
relative execution times of mail receiption and mail delivery).
If the limit should be enforced, then a
.b DeliveryMode
other than background must be used.
If not set, there is no limit to the number of children --
that is, the system load averaging controls this.
that is, the system load average controls this.
.ip MaxHeadersLength=\fIN\fP
[no short name]
The maximum length of the sum of all headers.
@@ -7317,6 +7377,13 @@ will be used.
By default,
these values are 2048 and 1024, respectively.
To allow any length, a value of 0 can be specified.
.ip MaxNOOPCommands=\fIN\fP
Override the default of
.b MAXNOOPCOMMANDS
for the number of
.i useless
commands, see Section
"Measures against Denial of Service Attacks".
.ip MaxQueueChildren=\fIN\fP
[no short name]
When set, this limits the number of concurrent queue runner processes to
@@ -7356,6 +7423,16 @@ highest priority jobs)
this should be set as high as possible to avoid
.q losing
jobs that happen to fall late in the queue directory.
Note: this option also restricts the number of entries printed by
.i mailq .
That is, if
.i MaxQueueRunSize
is set to a value
.b N
larger than zero,
then only
.b N
entries are printed per queue group.
.ip MaxRecipientsPerMessage=\fIN\fP
[no short name]
The maximum number of recipients that will be accepted per message
@@ -7399,9 +7476,11 @@ after a certain event occurred.
.(b
.ta \w'envfrom'u+3n
connect After session connection start
helo After HELO command
envfrom After MAIL FROM command
envrcpt After RCPT TO command
helo After EHLO/HELO command
envfrom After MAIL From command
envrcpt After RCPT To command
data After DATA command.
eoh After DATA command and header
eom After DATA command and terminating ``.''
.)b
By default the lists of macros are empty.
@@ -7531,7 +7610,7 @@ The
.i opt ions
can be selected from:
.(b
.ta \w'needvrfyhelo'u+3n
.ta \w'noactualrecipient'u+3n
public Allow open access
needmailhelo Insist on HELO or EHLO command before MAIL
needexpnhelo Insist on HELO or EHLO command before EXPN
@@ -7548,6 +7627,8 @@ nobodyreturn Don't return the body of a message with DSNs
goaway Disallow essentially all SMTP status queries
authwarnings Put X-Authentication-Warning: headers in messages
and log warnings
noactualrecipient Don't put X-Actual-Recipient lines in DSNs
which reveal the actual account that addresses map to.
.)b
.(f
\**N.B.:
@@ -7885,20 +7966,6 @@ UNIX-style
lines at the front of headers.
Normally they are assumed redundant
and discarded.
.ip SharedMemoryKey
[no short name]
Key to use for shared memory segment;
if not set (or 0), shared memory will not be used.
Requires support for shared memory to be compiled into
.i sendmail .
If this option is set,
.i sendmail
can share some data between different instances.
For example, the number of entries in a queue directory
or the available space in a file system.
This allows for more efficient program execution, since only
one process needs to update the data instead of each individual
process gathering the data each time it is required.
.ip SendMimeErrors
[j]
If set, send error messages in MIME format
@@ -7957,6 +8024,34 @@ The default file is
[7]
Strip input to seven bits for compatibility with old systems.
This shouldn't be necessary.
.ip SharedMemoryKey
[no short name]
Key to use for shared memory segment;
if not set (or 0), shared memory will not be used.
If set to
-1
.i sendmail
can select a key itself provided that also
.b SharedMemoryKeyFile
is set.
Requires support for shared memory to be compiled into
.i sendmail .
If this option is set,
.i sendmail
can share some data between different instances.
For example, the number of entries in a queue directory
or the available space in a file system.
This allows for more efficient program execution, since only
one process needs to update the data instead of each individual
process gathering the data each time it is required.
.ip SharedMemoryKeyFile
[no short name]
If
.b SharedMemoryKey
is set to
-1
then the automatically selected shared memory key will be stored
in the specified file.
.ip SingleLineFromHeader
[no short name]
If set, From: lines that have embedded newlines are unwrapped
@@ -7994,6 +8089,10 @@ option.
The message printed when the SMTP server starts up.
Defaults to
.q "$j Sendmail $v ready at $b".
.ip SoftBounce
If set, issue temporary errors (4xy) instead of permanent errors (5xy).
This can be useful during testing of a new configuration to avoid
erroneous bouncing of mails.
.ip StatusFile=\fIfile\fP
[S]
Log summary statistics in the named
@@ -8788,16 +8887,21 @@ R$\- $: $(storage {MyMacro} $) $1
.)b
.ip arith
Perform simple arithmetic operations.
The operation is given as key, currently +, -, *, /, %,
The operation is given as key, currently
+, -, *, /, %,
|, & (bitwise OR, AND),
l (for less than), and = are supported.
l (for less than), =,
and r (for random) are supported.
The two operands are given as arguments.
The lookup returns the result of the computation,
i.e.
i.e.,
.sm TRUE
or
.sm FALSE
for comparisons, integer values otherwise.
The r operator returns a pseudo-random number whose value
lies between the first and second operand
(which requires that the first operand is smaller than the second).
All options which are possible for maps are ignored.
A simple example is:
.(b
@@ -8832,7 +8936,8 @@ The server responds with a status indicator and the result (if any):
<status> ' ' <result>
.)b
The status indicator is one of the following upper case words:
The status indicator specifies the result of the lookup operation itself
and is one of the following upper case words:
.(b
.ta 9n
OK the key was found, result contains the looked up value
@@ -8844,13 +8949,19 @@ PERM a permanent failure occured
In case of errors (status TEMP, TIMEOUT or PERM) the result field may
contain an explanatory message.
However, the explanatory message is not used any further by
.i sendmail .
Example replies:
.(b
31:OK [email protected],
.)b
in case of a successful lookup, or:
.(b
56:OK error:550 5.7.1 User does not accept mail from sender,
.)b
in case of successful lookups, or:
.(b
8:NOTFOUND,
.)b
@@ -8860,7 +8971,7 @@ in case the key was not found, or:
55:TEMP this text explains that we had a temporary failure,
.)b
in case of a failure.
in case of a temporary map lookup failure.
The socket map uses the same syntax as milters
(see Section "X \*- Mail Filter (Milter) Definitions")
@@ -8954,6 +9065,10 @@ For LDAP maps this is an LDAP filter string
in which %s is replaced with the literal contents of the lookup key
and %0 is replaced with the LDAP escaped contents of the lookup key
according to RFC 2254.
If the flag
.b \-K
is used, then %1 through %9 are replaced with the LDAP escaped contents
of the arguments specified in the map lookup.
.ip "\-v\fIvalcol\fP"
The value column name (for NIS+) or number
(for text lookups).
@@ -8978,6 +9093,8 @@ to combine multiple values
into a single return string.
If not set,
the LDAP lookup will only return the first match found.
For DNS maps this is the separator character at which
the result of a query is cut off if is too long.
.ip "\-t"
Normally, when a map attempts to do a lookup
and the server fails
@@ -9043,6 +9160,10 @@ delay: specify the resolver's retransmission time interval (in seconds).
.ip "\-r"
retry: specify the number of times to retransmit a resolver query.
.pp
The dns map has another flag:
.ip "\-B"
basedomain: specify a domain that is always appended to queries.
.pp
The following additional flags are present in the ldap map only:
.ip "\-R"
Do not auto chase referrals. sendmail must be compiled with
@@ -9079,7 +9200,7 @@ For example,
.)b
is equivalent to
.(b
-H ldap://server.example.com:389/dc=example,dc=com
-H ldap://server.example.com:389 -b dc=example,dc=com
.)b
If the LDAP library supports it,
the LDAP URI format however can also request LDAP over SSL by using
@@ -9088,20 +9209,20 @@ instead of
.b ldap:// .
For example:
.(b
O LDAPDefaultSpec=-H ldaps://ldap.example.com/dc=example,dc=com
O LDAPDefaultSpec=-H ldaps://ldap.example.com -b dc=example,dc=com
.)b
Similarly, if the LDAP library supports it,
It can also be used to specify a UNIX domain socket using
.b ldapi:// :
.(b
O LDAPDefaultSpec=-H ldapi://socketfile/dc=example,dc=com
O LDAPDefaultSpec=-H ldapi://socketfile -b dc=example,dc=com
.)b
.ip "\-b\fIbase\fP"
LDAP search base.
.ip "\-l\fItimelimit\fP"
Time limit for LDAP queries.
.ip "\-Z\fIsizelimit\fP"
Size (number of matches) limit for LDAP queries.
Size (number of matches) limit for LDAP or DNS queries.
.ip "\-d\fIdistinguished_name\fP"
The distinguished name to use to login to the LDAP server.
.ip "\-M\fImethod\fP"
@@ -9129,6 +9250,10 @@ For example,
will cause
.i sendmail
to use LDAPv3 when communicating with the LDAP server.
.ip "\-K"
Treat the LDAP search key as multi-argument and
replace %1 through %9 in the key with
the LDAP escaped contents of the lookup arguments specified in the map lookup.
.pp
The
.i dbm
@@ -11310,7 +11435,7 @@ replace it with a blank sheet for double-sided output.
.\".sz 10
.\"Eric Allman
.\".sp
.\"Version $Revision: 8.699 $
.\"Version $Revision: 8.741 $
.\".ce 0
.bp 3
.ce
+2 -1
View File
@@ -1,7 +1,8 @@
dnl $Id: Makefile.m4,v 1.5 2002/06/21 22:01:30 ca Exp $
dnl $Id: Makefile.m4,v 1.6 2006/06/28 21:08:01 ca Exp $
include(confBUILDTOOLSDIR`/M4/switch.m4')
define(`confREQUIRE_LIBSM', `true')
define(`confREQUIRE_SM_OS_H', `true')
# sendmail dir
SMSRCDIR= ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
PREPENDDEF(`confENVDEF', `confMAPDEF')
+5 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1992 Eric P. Allman. All rights reserved.
* Copyright (c) 1992, 1993
@@ -22,7 +22,7 @@ SM_UNUSED(static char copyright[]) =
#endif /* ! lint */
#ifndef lint
SM_UNUSED(static char id[]) = "@(#)$Id: editmap.c,v 1.23 2002/03/28 17:49:33 gshapiro Exp $";
SM_UNUSED(static char id[]) = "@(#)$Id: editmap.c,v 1.25 2007/05/11 18:50:35 ca Exp $";
#endif /* ! lint */
@@ -46,7 +46,7 @@ uid_t RealUid;
gid_t RealGid;
char *RealUserName;
uid_t RunAsUid;
uid_t RunAsGid;
gid_t RunAsGid;
char *RunAsUserName;
int Verbose = 2;
bool DontInitGroups = false;
@@ -57,6 +57,8 @@ BITMAP256 DontBlameSendmail;
#define ISSEP(c) (isascii(c) && isspace(c))
static void usage __P((char *));
static void
usage(progname)
char *progname;
+114 -14
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2004 Sendmail, Inc. and its suppliers.
* Copyright (c) 1999-2004, 2006 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -7,7 +7,7 @@
* the sendmail distribution.
*
*
* $Id: mfapi.h,v 8.59 2004/07/07 21:41:31 ca Exp $
* $Id: mfapi.h,v 8.77 2006/11/02 02:44:07 ca Exp $
*/
/*
@@ -18,9 +18,13 @@
# define _LIBMILTER_MFAPI_H 1
#ifndef SMFI_VERSION
# define SMFI_VERSION 2 /* version number */
# define SMFI_VERSION 0x01000000 /* libmilter version number */
#endif /* ! SMFI_VERSION */
#define SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24)
#define SM_LM_VRS_MINOR(v) (((v) & 0x007fff00) >> 8)
#define SM_LM_VRS_PLVL(v) ((v) & 0x0000007f)
# include <sys/types.h>
# include <sys/socket.h>
@@ -40,11 +44,14 @@ extern "C" {
/*
** libmilter functions return one of the following to indicate
** success/failure:
** success/failure(/continue):
*/
#define MI_SUCCESS 0
#define MI_FAILURE (-1)
#if _FFR_WORKERS_POOL
# define MI_CONTINUE 1
#endif /* _FFR_WORKERS_POOL */
/* "forward" declarations */
typedef struct smfi_str SMFICTX;
@@ -128,15 +135,24 @@ struct smfiDesc
/* connection cleanup */
sfsistat (*xxfi_close) SM__P((SMFICTX *));
#if SMFI_VERSION > 2
/* any unrecognized or unimplemented command filter */
sfsistat (*xxfi_unknown) SM__P((SMFICTX *, char *));
#endif /* SMFI_VERSION > 2 */
sfsistat (*xxfi_unknown) SM__P((SMFICTX *, const char *));
#if SMFI_VERSION > 3
/* any unrecognized or unimplemented command filter */
/* SMTP DATA command filter */
sfsistat (*xxfi_data) SM__P((SMFICTX *));
#endif /* SMFI_VERSION > 3 */
/* negotiation callback */
sfsistat (*xxfi_negotiate) SM__P((SMFICTX *,
unsigned long, unsigned long,
unsigned long, unsigned long,
unsigned long *, unsigned long *,
unsigned long *, unsigned long *));
#if 0
/* signal handler callback, not yet implemented. */
int (*xxfi_signal) SM__P((int));
#endif
};
LIBMILTER_API int smfi_opensocket __P((bool));
@@ -150,6 +166,7 @@ LIBMILTER_API int smfi_stop __P((void));
#if _FFR_MAXDATASIZE
LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t));
#endif /* _FFR_MAXDATASIZE */
LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int *));
/*
** What the filter might do -- values to be ORed together for
@@ -165,6 +182,33 @@ LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t));
#define SMFIF_CHGHDRS 0x00000010L /* filter may change/delete headers */
#define SMFIF_QUARANTINE 0x00000020L /* filter may quarantine envelope */
/* filter may change "from" (envelope sender) */
#define SMFIF_CHGFROM 0x00000040L
#define SMFIF_ADDRCPT_PAR 0x00000080L /* add recipients incl. args */
/* filter can send set of symbols (macros) that it wants */
#define SMFIF_SETSYMLIST 0x00000100L
/*
** Macro "places";
** Notes:
** - must be coordinated with libmilter/engine.c and sendmail/milter.c
** - the order MUST NOT be changed as it would break compatibility between
** different versions. It's ok to append new entries however
** (hence the list is not sorted by the SMT protocol steps).
*/
#define SMFIM_FIRST 0 /* Do NOT use, internal marker only */
#define SMFIM_CONNECT 0 /* connect */
#define SMFIM_HELO 1 /* HELO/EHLO */
#define SMFIM_ENVFROM 2 /* MAIL From */
#define SMFIM_ENVRCPT 3 /* RCPT To */
#define SMFIM_DATA 4 /* DATA */
#define SMFIM_EOM 5 /* end of message (final dot) */
#define SMFIM_EOH 6 /* end of header */
#define SMFIM_LAST 6 /* Do NOT use, internal marker only */
/*
** Continue processing message/connection.
*/
@@ -209,6 +253,21 @@ LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t));
#define SMFIS_TEMPFAIL 4
/*
** Do not send a reply to the MTA
*/
#define SMFIS_NOREPLY 7
/*
** Skip over rest of same callbacks, e.g., body.
*/
#define SMFIS_SKIP 8
/* xxfi_negotiate: use all existing protocol options/actions */
#define SMFIS_ALL_OPTS 10
#if 0
/*
** Filter Routine Details
@@ -261,12 +320,12 @@ extern sfsistat xxfi_envrcpt __P((SMFICTX *, char **));
/* unknown command filter */
extern sfsistat *xxfi_unknown __P((SMFICTX *, char *));
extern sfsistat *xxfi_unknown __P((SMFICTX *, const char *));
/*
** xxfi_unknown(ctx, arg) Invoked when SMTP command is not recognized or not
** implemented.
** char *arg; Null-terminated SMTP command
** const char *arg; Null-terminated SMTP command
*/
/* header filter */
@@ -414,6 +473,17 @@ LIBMILTER_API int smfi_insheader __P((SMFICTX *, int, char *, char *));
** char *headerv; Header field value
*/
LIBMILTER_API int smfi_chgfrom __P((SMFICTX *, char *, char *));
/*
** Modify envelope sender address
**
** SMFICTX *ctx; Opaque context structure
** char *mail; New envelope sender address
** char *args; ESMTP arguments
*/
LIBMILTER_API int smfi_addrcpt __P((SMFICTX *, char *));
/*
@@ -423,9 +493,19 @@ LIBMILTER_API int smfi_addrcpt __P((SMFICTX *, char *));
** char *rcpt; Recipient to be added
*/
LIBMILTER_API int smfi_addrcpt_par __P((SMFICTX *, char *, char *));
/*
** Add a recipient to the envelope
**
** SMFICTX *ctx; Opaque context structure
** char *rcpt; Recipient to be added
** char *args; ESMTP arguments
*/
LIBMILTER_API int smfi_delrcpt __P((SMFICTX *, char *));
#if _FFR_SMFI_PROGRESS
/*
** Send a "no-op" up to the MTA to tell it we're still alive, so long
** milter-side operations don't time out.
@@ -434,7 +514,6 @@ LIBMILTER_API int smfi_delrcpt __P((SMFICTX *, char *));
*/
LIBMILTER_API int smfi_progress __P((SMFICTX *));
#endif /* _FFR_SMFI_PROGRESS */
/*
** Delete a recipient from the envelope
@@ -488,6 +567,27 @@ LIBMILTER_API int smfi_setpriv __P((SMFICTX *, void *));
LIBMILTER_API void *smfi_getpriv __P((SMFICTX *));
/*
** Get the private data pointer
**
** SMFICTX *ctx; Opaque context structure
** void *privatedata; Pointer to private data area
*/
LIBMILTER_API int smfi_setsymlist __P((SMFICTX *, int, char *));
/*
** Set list of symbols (macros) to receive
**
** SMFICTX *ctx; Opaque context structure
** int where; where in the SMTP dialogue should the macros be sent
** char *macros; list of macros (space separated)
*/
#if _FFR_THREAD_MONITOR
LIBMILTER_API int smfi_set_max_exec_time __P((unsigned int));
#endif /* _FFR_THREAD_MONITOR */
#ifdef __cplusplus
}
#endif /* __cplusplus */
+77 -61
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2004 Sendmail, Inc. and its suppliers.
* Copyright (c) 1999-2007 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -7,7 +7,7 @@
* the sendmail distribution.
*
*
* $Id: mfdef.h,v 8.21 2004/07/07 21:41:31 ca Exp $
* $Id: mfdef.h,v 8.38 2007/03/27 18:53:48 ca Exp $
*/
/*
@@ -17,78 +17,94 @@
#ifndef _LIBMILTER_MFDEF_H
# define _LIBMILTER_MFDEF_H 1
#ifndef SMFI_PROT_VERSION
# define SMFI_PROT_VERSION 6 /* MTA - libmilter protocol version */
#endif /* SMFI_PROT_VERSION */
/* Shared protocol constants */
# define MILTER_LEN_BYTES 4 /* length of 32 bit integer in bytes */
# define MILTER_OPTLEN (MILTER_LEN_BYTES * 3) /* length of options */
# define MILTER_CHUNK_SIZE 65535 /* body chunk size */
# define MILTER_MAX_DATA_SIZE 65535 /* default milter command data limit */
#define MILTER_LEN_BYTES 4 /* length of 32 bit integer in bytes */
#define MILTER_OPTLEN (MILTER_LEN_BYTES * 3) /* length of options */
#define MILTER_CHUNK_SIZE 65535 /* body chunk size */
#define MILTER_MAX_DATA_SIZE 65535 /* default milter command data limit */
/* These apply to SMFIF_* flags */
#define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */
#define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */
#define SMFI_CURR_ACTS SMFI_V2_ACTS /* The current version */
#define SMFI_CURR_ACTS 0x000001FFL /* actions of current version */
/* address families */
# define SMFIA_UNKNOWN 'U' /* unknown */
# define SMFIA_UNIX 'L' /* unix/local */
# define SMFIA_INET '4' /* inet */
# define SMFIA_INET6 '6' /* inet6 */
#define SMFIA_UNKNOWN 'U' /* unknown */
#define SMFIA_UNIX 'L' /* unix/local */
#define SMFIA_INET '4' /* inet */
#define SMFIA_INET6 '6' /* inet6 */
/* commands: don't use anything smaller than ' ' */
# define SMFIC_ABORT 'A' /* Abort */
# define SMFIC_BODY 'B' /* Body chunk */
# define SMFIC_CONNECT 'C' /* Connection information */
# define SMFIC_MACRO 'D' /* Define macro */
# define SMFIC_BODYEOB 'E' /* final body chunk (End) */
# define SMFIC_HELO 'H' /* HELO/EHLO */
# define SMFIC_HEADER 'L' /* Header */
# define SMFIC_MAIL 'M' /* MAIL from */
# define SMFIC_EOH 'N' /* EOH */
# define SMFIC_OPTNEG 'O' /* Option negotiation */
# define SMFIC_QUIT 'Q' /* QUIT */
# define SMFIC_RCPT 'R' /* RCPT to */
# if SMFI_VERSION > 3
# define SMFIC_DATA 'T' /* DATA */
# endif /* SMFI_VERSION > 3 */
# if SMFI_VERSION > 2
# define SMFIC_UNKNOWN 'U' /* Any unknown command */
# endif /* SMFI_VERSION > 2 */
#define SMFIC_ABORT 'A' /* Abort */
#define SMFIC_BODY 'B' /* Body chunk */
#define SMFIC_CONNECT 'C' /* Connection information */
#define SMFIC_MACRO 'D' /* Define macro */
#define SMFIC_BODYEOB 'E' /* final body chunk (End) */
#define SMFIC_HELO 'H' /* HELO/EHLO */
#define SMFIC_QUIT_NC 'K' /* QUIT but new connection follows */
#define SMFIC_HEADER 'L' /* Header */
#define SMFIC_MAIL 'M' /* MAIL from */
#define SMFIC_EOH 'N' /* EOH */
#define SMFIC_OPTNEG 'O' /* Option negotiation */
#define SMFIC_QUIT 'Q' /* QUIT */
#define SMFIC_RCPT 'R' /* RCPT to */
#define SMFIC_DATA 'T' /* DATA */
#define SMFIC_UNKNOWN 'U' /* Any unknown command */
/* actions (replies) */
# define SMFIR_ADDRCPT '+' /* add recipient */
# define SMFIR_DELRCPT '-' /* remove recipient */
# define SMFIR_ACCEPT 'a' /* accept */
# define SMFIR_REPLBODY 'b' /* replace body (chunk) */
# define SMFIR_CONTINUE 'c' /* continue */
# define SMFIR_DISCARD 'd' /* discard */
# define SMFIR_CHGHEADER 'm' /* change header */
# define SMFIR_PROGRESS 'p' /* progress */
# define SMFIR_REJECT 'r' /* reject */
# define SMFIR_TEMPFAIL 't' /* tempfail */
# define SMFIR_SHUTDOWN '4' /* 421: shutdown (internal to MTA) */
# define SMFIR_ADDHEADER 'h' /* add header */
# define SMFIR_INSHEADER 'i' /* insert header */
# define SMFIR_REPLYCODE 'y' /* reply code etc */
# define SMFIR_QUARANTINE 'q' /* quarantine */
#define SMFIR_ADDRCPT '+' /* add recipient */
#define SMFIR_DELRCPT '-' /* remove recipient */
#define SMFIR_ADDRCPT_PAR '2' /* add recipient (incl. ESMTP args) */
#define SMFIR_SHUTDOWN '4' /* 421: shutdown (internal to MTA) */
#define SMFIR_ACCEPT 'a' /* accept */
#define SMFIR_REPLBODY 'b' /* replace body (chunk) */
#define SMFIR_CONTINUE 'c' /* continue */
#define SMFIR_DISCARD 'd' /* discard */
#define SMFIR_CHGFROM 'e' /* change envelope sender (from) */
#define SMFIR_CONN_FAIL 'f' /* cause a connection failure */
#define SMFIR_ADDHEADER 'h' /* add header */
#define SMFIR_INSHEADER 'i' /* insert header */
#define SMFIR_SETSYMLIST 'l' /* set list of symbols (macros) */
#define SMFIR_CHGHEADER 'm' /* change header */
#define SMFIR_PROGRESS 'p' /* progress */
#define SMFIR_QUARANTINE 'q' /* quarantine */
#define SMFIR_REJECT 'r' /* reject */
#define SMFIR_SKIP 's' /* skip */
#define SMFIR_TEMPFAIL 't' /* tempfail */
#define SMFIR_REPLYCODE 'y' /* reply code etc */
/* What the MTA can send/filter wants in protocol */
# define SMFIP_NOCONNECT 0x00000001L /* MTA should not send connect info */
# define SMFIP_NOHELO 0x00000002L /* MTA should not send HELO info */
# define SMFIP_NOMAIL 0x00000004L /* MTA should not send MAIL info */
# define SMFIP_NORCPT 0x00000008L /* MTA should not send RCPT info */
# define SMFIP_NOBODY 0x00000010L /* MTA should not send body */
# define SMFIP_NOHDRS 0x00000020L /* MTA should not send headers */
# define SMFIP_NOEOH 0x00000040L /* MTA should not send EOH */
# if _FFR_MILTER_NOHDR_RESP
# define SMFIP_NOHREPL 0x00000080L /* No reply for headers */
# endif /* _FFR_MILTER_NOHDR_RESP */
#define SMFIP_NOCONNECT 0x00000001L /* MTA should not send connect info */
#define SMFIP_NOHELO 0x00000002L /* MTA should not send HELO info */
#define SMFIP_NOMAIL 0x00000004L /* MTA should not send MAIL info */
#define SMFIP_NORCPT 0x00000008L /* MTA should not send RCPT info */
#define SMFIP_NOBODY 0x00000010L /* MTA should not send body */
#define SMFIP_NOHDRS 0x00000020L /* MTA should not send headers */
#define SMFIP_NOEOH 0x00000040L /* MTA should not send EOH */
#define SMFIP_NR_HDR 0x00000080L /* No reply for headers */
#define SMFIP_NOHREPL SMFIP_NR_HDR /* No reply for headers */
#define SMFIP_NOUNKNOWN 0x00000100L /* MTA should not send unknown commands */
#define SMFIP_NODATA 0x00000200L /* MTA should not send DATA */
#define SMFIP_SKIP 0x00000400L /* MTA understands SMFIS_SKIP */
#define SMFIP_RCPT_REJ 0x00000800L /* MTA should also send rejected RCPTs */
#define SMFIP_NR_CONN 0x00001000L /* No reply for connect */
#define SMFIP_NR_HELO 0x00002000L /* No reply for HELO */
#define SMFIP_NR_MAIL 0x00004000L /* No reply for MAIL */
#define SMFIP_NR_RCPT 0x00008000L /* No reply for RCPT */
#define SMFIP_NR_DATA 0x00010000L /* No reply for DATA */
#define SMFIP_NR_UNKN 0x00020000L /* No reply for UNKN */
#define SMFIP_NR_EOH 0x00040000L /* No reply for eoh */
#define SMFIP_NR_BODY 0x00080000L /* No reply for body chunk */
#define SMFIP_HDR_LEADSPC 0x00100000L /* header value leading space */
# define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */
# define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */
# if _FFR_MILTER_NOHDR_RESP
# define SMFI_CURR_PROT 0x000000FFL /* The current version */
# else /* _FFR_MILTER_NOHDR_RESP */
# define SMFI_CURR_PROT SMFI_V2_PROT /* The current version */
# endif /* _FFR_MILTER_NOHDR_RESP */
#define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */
#define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */
/* all defined protocol bits */
#define SMFI_CURR_PROT 0x001FFFFFL
#endif /* !_LIBMILTER_MFDEF_H */
+2 -29
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers.
* Copyright (c) 1999-2003, 2006 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -7,7 +7,7 @@
* the sendmail distribution.
*
*
* $Id: milter.h,v 8.39 2003/12/02 00:21:42 msk Exp $
* $Id: milter.h,v 8.41 2006/05/22 23:23:55 ca Exp $
*/
/*
@@ -25,31 +25,4 @@
typedef pthread_t sthread_t;
typedef int socket_t;
# define MAX_MACROS_ENTRIES 5 /* max size of macro pointer array */
/*
** context for milter
** implementation hint:
** macros are stored in mac_buf[] as sequence of:
** macro_name \0 macro_value
** (just as read from the MTA)
** mac_ptr is a list of pointers into mac_buf to the beginning of each
** entry, i.e., macro_name, macro_value, ...
*/
struct smfi_str
{
sthread_t ctx_id; /* thread id */
socket_t ctx_sd; /* socket descriptor */
int ctx_dbg; /* debug level */
time_t ctx_timeout; /* timeout */
int ctx_state; /* state */
smfiDesc_ptr ctx_smfi; /* filter description */
unsigned long ctx_pflags; /* protocol flags */
char **ctx_mac_ptr[MAX_MACROS_ENTRIES];
char *ctx_mac_buf[MAX_MACROS_ENTRIES];
char *ctx_reply; /* reply code */
void *ctx_privdata; /* private data */
};
#endif /* ! _LIBMILTER_MILTER_H */
+4 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -9,7 +9,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: clock.h,v 1.11 2001/05/14 23:25:37 gshapiro Exp $
* $Id: clock.h,v 1.12 2004/08/03 19:57:21 ca Exp $
*/
/*
@@ -52,9 +52,8 @@ typedef struct sm_event SM_EVENT;
/* functions */
extern void sm_clrevent __P((SM_EVENT *));
extern void sm_clear_events __P((void));
extern SM_EVENT *sm_setevent __P((time_t, void(*)(), int));
extern SM_EVENT *sm_seteventm __P((int, void(*)(), int));
extern SM_EVENT *sm_sigsafe_seteventm __P((int, void(*)(), int));
extern SM_EVENT *sm_seteventm __P((int, void(*)__P((int)), int));
extern SM_EVENT *sm_sigsafe_seteventm __P((int, void(*)__P((int)), int));
extern SIGFUNC_DECL sm_tick __P((int));
/*
+127 -46
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -10,14 +10,16 @@
* the sendmail distribution.
*
*
* $Id: conf.h,v 1.116 2004/07/26 18:08:35 ca Exp $
* $Id: conf.h,v 1.134 2007/09/24 23:05:37 ca Exp $
*/
/*
** CONF.H -- All user-configurable parameters for sendmail
**
** Send updates to sendmail@Sendmail.ORG so they will be
** included in the next release.
** Send updates to Sendmail.ORG so they will be
** included in the next release; see
** http://www.sendmail.org/email-addresses.html
** for current e-mail address.
*/
#ifndef SM_CONF_H
@@ -160,7 +162,11 @@ extern void hard_syslog();
*/
# ifdef _AIX5
# include <sys/signal.h>
# include <sys/wait.h>
# define _AIX4 40300
# define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */
# define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */
# if _AIX5 >= 50200
# define HASUNSETENV 1 /* has unsetenv(3) call */
# endif /* _AIX5 >= 50200 */
@@ -175,10 +181,14 @@ extern void hard_syslog();
# define BSD4_4_SOCKADDR /* has sa_len */
# define USESETEUID 1 /* seteuid(2) works */
# define TZ_TYPE TZ_NAME /* use tzname[] vector */
# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
# ifndef SOCKOPT_LEN_T
# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
# endif /* SOCKOPT_LEN_T */
# if _AIX4 >= 40200
# define HASSETREUID 1 /* setreuid(2) works as of AIX 4.2 */
# define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */
# ifndef SOCKADDR_LEN_T
# define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */
# endif /* SOCKADDR_LEN_T */
# endif /* _AIX4 >= 40200 */
# if defined(_ILS_MACROS) /* IBM versions aren't side-effect clean */
# undef isascii
@@ -208,7 +218,9 @@ extern void hard_syslog();
# define GIDSET_T gid_t
# define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
# define SPT_PADCHAR '\0' /* pad process title with nulls */
# define LA_TYPE LA_INT
# ifndef LA_TYPE
# define LA_TYPE LA_INT
# endif /* LA_TYPE */
# define FSHIFT 16
# define LA_AVENRUN "avenrun"
# if !defined(_AIX4) || _AIX4 < 40300
@@ -398,6 +410,9 @@ typedef int pid_t;
# if SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205)
# define HASSETREUID 1 /* setreuid works as of 2.5 */
# define HASSETREGID 1 /* use setregid(2) to set saved gid */
# if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206)
# define HASSNPRINTF 1 /* has snprintf(3c) starting in 2.6 */
# endif /* SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) */
# if SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700)
# ifndef LA_TYPE
# define LA_TYPE LA_KSTAT /* use kstat(3k) -- may work in < 2.5 */
@@ -433,6 +448,7 @@ typedef int pid_t;
# define SMRSH_CMDDIR "/var/adm/sm.bin"
# endif /* ! SMRSH_CMDDIR */
# define SL_FUDGE 34 /* fudge offset for SyslogPrefixLen */
# define HASLDAPGETALIASBYNAME 1 /* added in S8 */
# endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */
# if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209)
# define HASURANDOMDEV 1 /* /dev/[u]random added in S9 */
@@ -442,6 +458,9 @@ typedef int pid_t;
# if SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210)
# define HASUNSETENV 1 /* unsetenv() added in S10 */
# endif /* SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) */
# if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211)
# define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */
# endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */
# ifndef HASGETUSERSHELL
# define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */
# endif /* ! HASGETUSERSHELL */
@@ -726,8 +745,8 @@ typedef int pid_t;
# define HASFLOCK 1 /* has flock(2) */
# define HASUNAME 1 /* has uname(2) */
# define HASUNSETENV 1 /* has unsetenv(3) */
# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) */
# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) */
# define HASSETVBUF 1 /* has setvbuf (3) */
# define HASSETREUID 0 /* setreuid(2) unusable */
# define HASSETEUID 1 /* has seteuid(2) */
@@ -740,13 +759,22 @@ typedef int pid_t;
# define HASWAITPID 1 /* has waitpid(2) */
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) */
# define HAS_ST_GEN 1 /* has st_gen field in struct stat */
# define HASURANDOMDEV 1 /* has urandom(4) */
# define HASURANDOMDEV 1 /* has urandom(4) */
# define HASSTRERROR 1 /* has strerror(3) */
# define HASGETUSERSHELL 1 /* had getusershell(3) */
# define GIDSET_T gid_t /* getgroups(2) takes gid_t */
# define LA_TYPE LA_SUBR /* use getloadavg(3) */
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
# define SPT_TYPE SPT_PSSTRINGS /* use magic PS_STRINGS pointer for setproctitle */
# if DARWIN >= 70000
# define SOCKADDR_LEN_T socklen_t
# endif
# if DARWIN >= 80000
# define SPT_TYPE SPT_REUSEARGV
# define SPT_PADCHAR '\0'
# define SOCKOPT_LEN_T socklen_t
# else
# define SPT_TYPE SPT_PSSTRINGS /* use magic PS_STRINGS pointer for setproctitle */
# endif
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
# define BSD4_4_SOCKADDR /* struct sockaddr has sa_len */
# define SAFENFSPATHCONF 0 /* unverified: pathconf(2) doesn't work on NFS */
@@ -765,7 +793,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
** See also BSD defines.
*/
# if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__)
# if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)
# include <paths.h>
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define USESETEUID 1 /* has usable seteuid(2) call */
@@ -783,7 +811,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
# endif /* ! LA_TYPE */
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
# define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */
# endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) */
# endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)*/
/*
@@ -832,41 +860,69 @@ extern unsigned int sleepX __P((unsigned int seconds));
# endif /* __bsdi__ */
# if defined(__QNX__)
# if defined(__QNXNTO__)
/* QNX 6 */
# include <unix.h>
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASSETSID 1 /* has POSIX setsid(2) call */
# define USESETEUID 1 /* has usable seteuid(2) call */
# define HASFCHMOD 1 /* has fchmod(2) syscall */
# define HASFCHOWN 1 /* has fchown(2) syscall */
# define HASUNAME 1 /* has uname(2) syscall */
# define HASSTRERROR 1 /* has strerror(3) */
# define BSD4_4_SOCKADDR /* has sa_len */
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
# define NETLINK 1 /* supports AF_LINK */
# define GIDSET_T gid_t
# define QUAD_T uint64_t
# define HASSNPRINTF 1 /* has snprintf(3) (all versions?) */
# define HASGETUSERSHELL 0
/*
** We have a strrev() that doesn't allocate anything.
** Make sure the one here is used.
*/
# define strrev strrev_sendmail
# else /* defined(__QNXNTO__) */
/*
** QNX 4.2x
** Contributed by Glen McCready <glen@qnx.com>.
**
** Should work with all versions of QNX.
** Should work with all versions of QNX 4.
*/
# if defined(__QNX__)
# include <unix.h>
# include <sys/select.h>
# undef NGROUPS_MAX
# define HASSETSID 1 /* has POSIX setsid(2) call */
# define USESETEUID 1 /* has usable seteuid(2) call */
# define HASFCHMOD 1 /* has fchmod(2) syscall */
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASSTRERROR 1 /* has strerror(3) */
# define HASFLOCK 0
# undef HASINITGROUPS /* has initgroups(3) call */
# define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
# define IP_SRCROUTE 1 /* can check IP source routing */
# define TZ_TYPE TZ_TMNAME /* use tmname variable */
# define GIDSET_T gid_t
# define LA_TYPE LA_ZERO
# define SFS_TYPE SFS_NONE
# define SPT_TYPE SPT_REUSEARGV
# define SPT_PADCHAR '\0' /* pad process title with nulls */
# define HASGETUSERSHELL 0
# define E_PSEUDOBASE 512
# define _FILE_H_INCLUDED
# include <unix.h>
# include <sys/select.h>
# undef NGROUPS_MAX
# define HASSETSID 1 /* has POSIX setsid(2) call */
# define USESETEUID 1 /* has usable seteuid(2) call */
# define HASFCHMOD 1 /* has fchmod(2) syscall */
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASSTRERROR 1 /* has strerror(3) */
# define HASFLOCK 0
# undef HASINITGROUPS /* has initgroups(3) call */
# define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
# define IP_SRCROUTE 1 /* can check IP source routing */
# define TZ_TYPE TZ_TMNAME /* use tmname variable */
# define GIDSET_T gid_t
# define LA_TYPE LA_ZERO
# define SFS_TYPE SFS_NONE
# define SPT_TYPE SPT_REUSEARGV
# define SPT_PADCHAR '\0' /* pad process title with nulls */
# define HASGETUSERSHELL 0
# define _FILE_H_INCLUDED
# endif /* defined(__QNXNTO__) */
# endif /* defined(__QNX__) */
/*
** FreeBSD / NetBSD / OpenBSD (all architectures, all versions)
** DragonFly BSD/ FreeBSD / NetBSD / OpenBSD (all architectures, all versions)
**
** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x
** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x
@@ -874,7 +930,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
** See also BSD defines.
*/
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# include <paths.h>
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define HASSETSID 1 /* has POSIX setsid(2) call */
@@ -891,11 +947,14 @@ extern unsigned int sleepX __P((unsigned int seconds));
# define NETLINK 1 /* supports AF_LINK */
# define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */
# define GIDSET_T gid_t
# define QUAD_T unsigned long long
# define QUAD_T unsigned long long
# define HASSNPRINTF 1 /* has snprintf(3) (all versions?) */
# ifndef LA_TYPE
# define LA_TYPE LA_SUBR
# endif /* ! LA_TYPE */
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200040000
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && \
((__NetBSD_Version__ >= 200040000 && __NetBSD_Version__ < 200090000) || \
(__NetBSD_Version__ >= 299000900))
# undef SFS_TYPE
# define SFS_TYPE SFS_STATVFS
# else
@@ -911,7 +970,9 @@ extern unsigned int sleepX __P((unsigned int seconds));
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104170000
# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
# endif
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200060000
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && \
((__NetBSD_Version__ >= 200060000 && __NetBSD_Version__ < 200090000) || \
(__NetBSD_Version__ >= 299000900))
# define HASCLOSEFROM 1 /* closefrom(3) added in 2.0F */
# endif
# if defined(__NetBSD__)
@@ -919,6 +980,23 @@ extern unsigned int sleepX __P((unsigned int seconds));
# include <sys/param.h>
# include <sys/sysctl.h>
# endif
# if defined(__DragonFly__)
# define HASSETLOGIN 1 /* has setlogin(2) */
# define HASSRANDOMDEV 1 /* has srandomdev(3) */
# define HASURANDOMDEV 1 /* has /dev/urandom(4) */
# undef SPT_TYPE
# include <libutil.h>
# define SPT_TYPE SPT_BUILTIN
# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
# ifndef SMRSH_CMDDIR
# define SMRSH_CMDDIR "/usr/libexec/sm.bin"
# endif /* ! SMRSH_CMDDIR */
# ifndef SMRSH_PATH
# define SMRSH_PATH "/bin:/usr/bin"
# endif /* ! SMRSH_PATH */
# define USESYSCTL 1 /* use sysctl(3) for getting ncpus */
# include <sys/sysctl.h>
# endif /* defined(__DragonFly__) */
# if defined(__FreeBSD__)
# define HASSETLOGIN 1 /* has setlogin(2) */
# if __FreeBSD_version >= 227001
@@ -969,8 +1047,11 @@ extern unsigned int sleepX __P((unsigned int seconds));
# if OpenBSD >= 200405
# define HASCLOSEFROM 1 /* closefrom(3) added in 3.5 */
# endif /* OpenBSD >= 200405 */
# if OpenBSD >= 200505
# undef NETISO /* iso.h removed in 3.7 */
# endif /* OpenBSD >= 200505 */
# endif /* defined(__OpenBSD__) */
# endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
# endif /* defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
/*
@@ -1108,7 +1189,7 @@ typedef short pid_t;
# define _SCO_unix_4_2
# else /* ! _SCO_unix_4_2 */
# define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */
# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
# endif /* ! _SCO_unix_4_2 */
# endif /* _SCO_DS >= 1 */
@@ -1802,7 +1883,7 @@ extern struct passwd * sendmail_mpe_getpwuid __P((uid_t));
# define HASWAITPID 1
# define HASGETDTABLESIZE 1
# define GIDSET_T gid_t
# define SOCKADDR_LEN_T size_t
# define SOCKADDR_LEN_T size_t
# define SOCKOPT_LEN_T size_t
# ifndef _PATH_UNIX
# define _PATH_UNIX "/stand/unix"
@@ -2924,7 +3005,7 @@ struct sm_align
long al_l;
void *al_p;
double al_d;
void (*al_f)();
void (*al_f) __P((void));
} al_u;
};
# define SM_ALIGN_SIZE offsetof(struct sm_align, al_u)
+2 -1
View File
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: config.h,v 1.46 2003/12/10 03:19:06 gshapiro Exp $
* $Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $
*/
/*
@@ -145,6 +145,7 @@
/* LDAP Checks */
# if LDAPMAP
# include <lber.h>
# include <ldap.h>
/* Does the LDAP library have ldap_memfree()? */
+5 -1
View File
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: errstring.h,v 1.9 2003/12/10 03:19:06 gshapiro Exp $
* $Id: errstring.h,v 1.10 2007/03/21 23:56:19 ca Exp $
*/
/*
@@ -16,6 +16,10 @@
#ifndef SM_ERRSTRING_H
# define SM_ERRSTRING_H
#if defined(__QNX__)
# define E_PSEUDOBASE 512
#endif /* defined(__QNX__) */
#include <errno.h>
#if NEEDINTERRNO
extern int errno;
+12 -2
View File
@@ -1,12 +1,12 @@
/*
* Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
* Copyright (c) 2000-2001, 2006 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: heap.h,v 1.22 2001/09/04 22:41:55 ca Exp $
* $Id: heap.h,v 1.23 2006/08/15 00:53:46 ca Exp $
*/
/*
@@ -91,6 +91,16 @@ sm_fcalloc __P((
# define sm_heap_setgroup(g) (SmHeapGroup = (g))
# define sm_heap_newgroup() (SmHeapGroup = ++SmHeapMaxGroup)
#define SM_FREE(ptr) \
do \
{ \
if ((ptr) != NULL) \
{ \
sm_free(ptr); \
(ptr) = NULL; \
} \
} while (0)
extern int SmHeapGroup;
extern int SmHeapMaxGroup;
+25 -11
View File
@@ -1,12 +1,12 @@
/*
* Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
* Copyright (c) 2001-2003, 2005-2007 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: ldap.h,v 1.27 2003/12/20 09:23:47 gshapiro Exp $
* $Id: ldap.h,v 1.33 2007/10/10 00:06:44 ca Exp $
*/
#ifndef SM_LDAP_H
@@ -17,7 +17,7 @@
/*
** NOTE: These should be changed from LDAPMAP_* to SM_LDAP_*
** in the next major release (8.13) of sendmail.
** in the next major release (8.x+1) of sendmail.
*/
# ifndef LDAPMAP_MAX_ATTR
@@ -32,6 +32,13 @@
# if LDAPMAP
/* maximum number of arguments in a map lookup, see sendmail.h: MAX_MAP_ARGS */
# define SM_LDAP_ARGS 10
/* error codes from sm_ldap_search*() */
# define SM_LDAP_ERR (-1) /* generic error: ldap_search(3) */
# define SM_LDAP_ERR_ARG_MISS (-2) /* an argument is missing */
/* Attribute types */
# define SM_LDAP_ATTR_NONE (-1)
# define SM_LDAP_ATTR_OBJCLASS 0
@@ -44,6 +51,7 @@
# define SM_LDAP_SINGLEMATCH 0x0001
# define SM_LDAP_MATCHONLY 0x0002
# define SM_LDAP_USE_ALLATTR 0x0004
# define SM_LDAP_SINGLEDN 0x0008
struct sm_ldap_struct
{
@@ -74,6 +82,7 @@ struct sm_ldap_struct
int ldap_attr_type[LDAPMAP_MAX_ATTR + 1];
char *ldap_attr_needobjclass[LDAPMAP_MAX_ATTR + 1];
bool ldap_attrsonly;
bool ldap_multi_args;
/* args for ldap_result */
struct timeval ldap_timeout;
@@ -82,6 +91,10 @@ struct sm_ldap_struct
/* ldapmap_lookup options */
char ldap_attrsep;
# if _FFR_LDAP_NETWORK_TIMEOUT
struct timeval ldap_networktmo;
# endif /* _FFR_LDAP_NETWORK_TIMEOUT */
/* Linked list of maps sharing the same LDAP binding */
void *ldap_next;
};
@@ -90,18 +103,18 @@ typedef struct sm_ldap_struct SM_LDAP_STRUCT;
struct sm_ldap_recurse_entry
{
char *lr_search;
int lr_type;
LDAPURLDesc *lr_ludp;
char **lr_attrs;
bool lr_done;
char *lr_search;
int lr_type;
LDAPURLDesc *lr_ludp;
char **lr_attrs;
bool lr_done;
};
struct sm_ldap_recurse_list
{
int lr_size;
int lr_cnt;
struct sm_ldap_recurse_entry **lr_data;
int lrl_size;
int lrl_cnt;
struct sm_ldap_recurse_entry **lrl_data;
};
typedef struct sm_ldap_recurse_entry SM_LDAP_RECURSE_ENTRY;
@@ -111,6 +124,7 @@ typedef struct sm_ldap_recurse_list SM_LDAP_RECURSE_LIST;
extern void sm_ldap_clear __P((SM_LDAP_STRUCT *));
extern bool sm_ldap_start __P((char *, SM_LDAP_STRUCT *));
extern int sm_ldap_search __P((SM_LDAP_STRUCT *, char *));
extern int sm_ldap_search_m __P((SM_LDAP_STRUCT *, char **));
extern int sm_ldap_results __P((SM_LDAP_STRUCT *, int, int, int,
SM_RPOOL_T *, char **, int *, int *,
SM_LDAP_RECURSE_LIST *));
+19
View File
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2006 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: misc.h,v 1.1 2006/06/28 23:57:59 ca Exp $
*/
#ifndef SM_MISC_H
# define SM_MISC_H 1
int sm_memstat_open __P((void));
int sm_memstat_close __P((void));
int sm_memstat_get __P((char *, long *));
#endif /* ! SM_MISC_H */
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: sm_os_dragonfly.h,v 1.1 2004/08/06 03:54:07 gshapiro Exp $
*/
/*
** Platform definitions for DragonFly BSD
*/
#define SM_OS_NAME "dragonfly"
#define SM_CONF_SYS_CDEFS_H 1
#define MI_SOMAXCONN -1 /* listen() max backlog for milter */
#ifndef SM_CONF_STRL
# define SM_CONF_STRL 1
#endif /* SM_CONF_STRL */
#ifndef SM_CONF_SHM
# define SM_CONF_SHM 1
#endif /* SM_CONF_SHM */
#ifndef SM_CONF_SEM
# define SM_CONF_SEM 1
#endif /* SM_CONF_SEM */
#ifndef SM_CONF_MSG
# define SM_CONF_MSG 1
#endif /* SM_CONF_MSG */
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2007 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: sm_os_qnx.h,v 1.1 2007/03/21 23:56:20 ca Exp $
*/
/*
** sm_os_qnx.h -- platform definitions for QNX
*/
#define SM_CONF_SYS_CDEFS_H 1
#ifndef SM_CONF_SETITIMER
# define SM_CONF_SETITIMER 0
#endif /* SM_CONF_SETITIMER */
+59
View File
@@ -0,0 +1,59 @@
/*
* Copyright (c) 2000-2001, 2005 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: sem.h,v 1.9 2005/02/17 22:08:58 ca Exp $
*/
#ifndef SM_SEM_H
# define SM_SEM_H 1
#include <sm/gen.h>
/* key for semaphores */
# define SM_SEM_KEY (41L)
# define SM_SEM_NO_ID (-1)
# define SM_NO_SEM(id) ((id) < 0)
# if SM_CONF_SEM > 0
# include <sys/types.h>
# include <sys/ipc.h>
# include <sys/sem.h>
# if SM_CONF_SEM == 2
union semun
{
int val;
struct semid_ds *buf;
ushort *array;
};
# endif /* SM_CONF_SEM == 2 */
# ifndef SEM_A
# define SEM_A 0200
# endif /* SEM_A */
# ifndef SEM_R
# define SEM_R 0400
# endif /* SEM_R */
# define SM_NSEM 1
extern int sm_sem_start __P((key_t, int, int, bool));
extern int sm_sem_stop __P((int));
extern int sm_sem_acq __P((int, int, int));
extern int sm_sem_rel __P((int, int, int));
extern int sm_sem_get __P((int, int));
# else /* SM_CONF_SEM > 0 */
# define sm_sem_start(key, nsem, semflg, owner) 0
# define sm_sem_stop(semid) 0
# define sm_sem_acq(semid, semnum, timeout) 0
# define sm_sem_rel(semid, semnum, timeout) 0
# define sm_sem_get(semid, semnum) 0
# endif /* SM_CONF_SEM > 0 */
#endif /* ! SM_SEM_H */
+24
View File
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2006 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*/
/*
** SENDMAIL.H -- MTA-specific definitions for sendmail.
*/
#ifndef _SM_SENDMAIL_H
# define _SM_SENDMAIL_H 1
/* "out of band" indicator */
#define METAQUOTE ((unsigned char)0377) /* quotes the next octet */
extern int dequote_internal_chars __P((char *, char *, int));
extern char *quote_internal_chars __P((char *, char *, int *));
extern char *str2prt __P((char *));
#endif /* ! _SM_SENDMAIL_H */
+3 -2
View File
@@ -1,12 +1,12 @@
/*
* Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
* Copyright (c) 2000-2003, 2005 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: shm.h,v 1.10 2003/05/17 18:34:54 ca Exp $
* $Id: shm.h,v 1.11 2005/01/13 22:57:04 ca Exp $
*/
#ifndef SM_SHM_H
@@ -28,6 +28,7 @@
extern void *sm_shmstart __P((key_t, int , int , int *, bool));
extern int sm_shmstop __P((void *, int, bool));
extern int sm_shmsetowner __P((int, uid_t, gid_t, mode_t));
/* for those braindead systems... (e.g., SunOS 4) */
+157
View File
@@ -0,0 +1,157 @@
/* $OpenBSD: queue.h,v 1.30 2005/10/25 06:37:47 otto Exp $ */
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)queue.h 8.5 (Berkeley) 8/20/94
*/
#ifndef SM_TAILQ_H_
#define SM_TAILQ_H_
/*
* $Id: tailq.h,v 1.2 2007/06/29 23:09:57 ca Exp $
*
* This file is a modified copy of queue.h from a BSD system:
* we only need tail queues here.
* We do not use queue.h directly because there is a conflict with
* some versions of that file on some OSs.
*
* A tail queue is headed by a pair of pointers, one to the head of the
* list and the other to the tail of the list. The elements are doubly
* linked so that an arbitrary element can be removed without a need to
* traverse the list. New elements can be added to the list before or
* after an existing element, at the head of the list, or at the end of
* the list. A tail queue may be traversed in either direction.
*/
/*
* Tail queue definitions.
*/
#define SM_TAILQ_HEAD(name, type) \
struct name { \
struct type *tqh_first; /* first element */ \
struct type **tqh_last; /* addr of last next element */ \
}
#define SM_TAILQ_HEAD_INITIALIZER(head) \
{ NULL, &(head).tqh_first }
#define SM_TAILQ_ENTRY(type) \
struct { \
struct type *tqe_next; /* next element */ \
struct type **tqe_prev; /* address of previous next element */ \
}
/*
* tail queue access methods
*/
#define SM_TAILQ_FIRST(head) ((head)->tqh_first)
#define SM_TAILQ_END(head) NULL
#define SM_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
#define SM_TAILQ_LAST(head, headname) \
(*(((struct headname *)((head)->tqh_last))->tqh_last))
/* XXX */
#define SM_TAILQ_PREV(elm, headname, field) \
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
#define SM_TAILQ_EMPTY(head) \
(SM_TAILQ_FIRST(head) == SM_TAILQ_END(head))
#define SM_TAILQ_FOREACH(var, head, field) \
for((var) = SM_TAILQ_FIRST(head); \
(var) != SM_TAILQ_END(head); \
(var) = SM_TAILQ_NEXT(var, field))
#define SM_TAILQ_FOREACH_REVERSE(var, head, headname, field) \
for((var) = SM_TAILQ_LAST(head, headname); \
(var) != SM_TAILQ_END(head); \
(var) = SM_TAILQ_PREV(var, headname, field))
/*
* Tail queue functions.
*/
#define SM_TAILQ_INIT(head) do { \
(head)->tqh_first = NULL; \
(head)->tqh_last = &(head)->tqh_first; \
} while (0)
#define SM_TAILQ_INSERT_HEAD(head, elm, field) do { \
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
(head)->tqh_first->field.tqe_prev = \
&(elm)->field.tqe_next; \
else \
(head)->tqh_last = &(elm)->field.tqe_next; \
(head)->tqh_first = (elm); \
(elm)->field.tqe_prev = &(head)->tqh_first; \
} while (0)
#define SM_TAILQ_INSERT_TAIL(head, elm, field) do { \
(elm)->field.tqe_next = NULL; \
(elm)->field.tqe_prev = (head)->tqh_last; \
*(head)->tqh_last = (elm); \
(head)->tqh_last = &(elm)->field.tqe_next; \
} while (0)
#define SM_TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
(elm)->field.tqe_next->field.tqe_prev = \
&(elm)->field.tqe_next; \
else \
(head)->tqh_last = &(elm)->field.tqe_next; \
(listelm)->field.tqe_next = (elm); \
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
} while (0)
#define SM_TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
(elm)->field.tqe_next = (listelm); \
*(listelm)->field.tqe_prev = (elm); \
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
} while (0)
#define SM_TAILQ_REMOVE(head, elm, field) do { \
if (((elm)->field.tqe_next) != NULL) \
(elm)->field.tqe_next->field.tqe_prev = \
(elm)->field.tqe_prev; \
else \
(head)->tqh_last = (elm)->field.tqe_prev; \
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
} while (0)
#define SM_TAILQ_REPLACE(head, elm, elm2, field) do { \
if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
(elm2)->field.tqe_next->field.tqe_prev = \
&(elm2)->field.tqe_next; \
else \
(head)->tqh_last = &(elm2)->field.tqe_next; \
(elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
*(elm2)->field.tqe_prev = (elm2); \
} while (0)
#endif /* !SM_TAILQ_H_ */
+56
View File
@@ -0,0 +1,56 @@
/*
* Copyright (c) 2005 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: time.h,v 1.1 2005/06/14 23:07:19 ca Exp $
*/
#ifndef SM_TIME_H
# define SM_TIME_H 1
# include <sm/config.h>
# include <sys/time.h>
/* should be defined in sys/time.h */
#ifndef timersub
# define timersub(tvp, uvp, vvp) \
do \
{ \
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
if ((vvp)->tv_usec < 0) \
{ \
(vvp)->tv_sec--; \
(vvp)->tv_usec += 1000000; \
} \
} while (0)
#endif /* !timersub */
#ifndef timeradd
# define timeradd(tvp, uvp, vvp) \
do \
{ \
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
if ((vvp)->tv_usec >= 1000000) \
{ \
(vvp)->tv_sec++; \
(vvp)->tv_usec -= 1000000; \
} \
} while (0)
#endif /* !timeradd */
#ifndef timercmp
# define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
((tvp)->tv_sec cmp (uvp)->tv_sec))
#endif /* !timercmp */
#endif /* ! SM_TIME_H */
+3 -1
View File
@@ -1,4 +1,4 @@
# $Id: Makefile,v 8.1 1999/11/04 00:03:40 ca Exp $
# $Id: Makefile,v 8.2 2006/05/23 21:55:55 ca Exp $
SHELL= /bin/sh
BUILD= ./Build
@@ -6,6 +6,8 @@ OPTIONS= $(CONFIG) $(FLAGS)
all: FRC
$(SHELL) $(BUILD) $(OPTIONS) $@
check: FRC
$(SHELL) $(BUILD) $(OPTIONS) $@
clean: FRC
$(SHELL) $(BUILD) $(OPTIONS) $@
install: FRC
+4 -4
View File
@@ -1,19 +1,19 @@
dnl $Id: Makefile.m4,v 8.31 2002/06/21 22:01:31 ca Exp $
dnl $Id: Makefile.m4,v 8.78 2007/02/05 19:21:29 ca Exp $
include(confBUILDTOOLSDIR`/M4/switch.m4')
dnl only required for compilation of EXTRAS
define(`confREQUIRE_LIBSM', `true')
define(`confREQUIRE_SM_OS_H', `true')
define(`confMT', `true')
# sendmail dir
SMSRCDIR= ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
bldPRODUCT_START(`library', `libmilter')
define(`bldINSTALLABLE', `true')
define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
define(`bldSOURCES', `main.c engine.c listener.c handler.c comm.c smfi.c signal.c sm_gethost.c LIBMILTER_EXTRAS ')
define(`bldSOURCES', `main.c engine.c listener.c worker.c handler.c comm.c smfi.c signal.c sm_gethost.c monitor.c LIBMILTER_EXTRAS ')
define(`confBEFORE', `LIBMILTER_EXTRAS')
bldPUSH_INSTALL_TARGET(`install-mfapi')
bldPRODUCT_END
+9 -244
View File
@@ -12,6 +12,9 @@ issuing the './Build' command in SRCDIR/libmilter .
Starting with 8.13 sendmail is compiled by default with support for
the milter API.
Note: if you want to write a milter in Java, then see
http://sendmail-jilter.sourceforge.net/
+----------------+
| SECURITY HINTS |
+----------------+
@@ -87,8 +90,10 @@ IPv4 socket on port 3333 of localhost. The current flags (F=) are:
R Reject connection if filter unavailable
T Temporary fail connection if filter unavailable
4 Shut down connection if filter unavailable
(with a 421 temporary error).
If neither F=R nor F=T is specified, the message is passed through sendmail
If none of these is specified, the message is passed through sendmail
in case of filter errors as if the failing filters were not present.
Finally, you can override the default timeouts used by sendmail when
@@ -161,7 +166,7 @@ connected via one of these options, the session can be continued through
the use of standard SMTP commands.
% sendmail -bs
220 test.sendmail.com ESMTP Sendmail 8.11.0/8.11.0; Tue, 10 Nov 1970 13:05:23 -0500 (EST)
220 test.sendmail.com ESMTP Sendmail 8.14.0/8.14.0; Thu, 22 Jun 2006 13:05:23 -0500 (EST)
HELO localhost
250 test.sendmail.com Hello testy@localhost, pleased to meet you
MAIL From:<testy>
@@ -222,248 +227,8 @@ Feedback about problems (and possible fixes) is welcome.
| SOURCE FOR SAMPLE FILTER |
+--------------------------+
Note that the filter below may not be thread safe on some operating
Note that the filter example.c may not be thread safe on some operating
systems. You should check your system man pages for the functions used
below to verify the functions are thread safe.
/* A trivial filter that logs all email to a file. */
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include <unistd.h>
#include "libmilter/mfapi.h"
#ifndef true
typedef int bool;
# define false 0
# define true 1
#endif /* ! true */
struct mlfiPriv
{
char *mlfi_fname;
FILE *mlfi_fp;
};
#define MLFIPRIV ((struct mlfiPriv *) smfi_getpriv(ctx))
extern sfsistat mlfi_cleanup(SMFICTX *, bool);
sfsistat
mlfi_envfrom(ctx, envfrom)
SMFICTX *ctx;
char **envfrom;
{
struct mlfiPriv *priv;
int fd = -1;
/* allocate some private memory */
priv = malloc(sizeof *priv);
if (priv == NULL)
{
/* can't accept this message right now */
return SMFIS_TEMPFAIL;
}
memset(priv, '\0', sizeof *priv);
/* open a file to store this message */
priv->mlfi_fname = strdup("/tmp/msg.XXXXXXXX");
if (priv->mlfi_fname == NULL)
{
free(priv);
return SMFIS_TEMPFAIL;
}
if ((fd = mkstemp(priv->mlfi_fname)) < 0 ||
(priv->mlfi_fp = fdopen(fd, "w+")) == NULL)
{
if (fd >= 0)
(void) close(fd);
free(priv->mlfi_fname);
free(priv);
return SMFIS_TEMPFAIL;
}
/* save the private data */
smfi_setpriv(ctx, priv);
/* continue processing */
return SMFIS_CONTINUE;
}
sfsistat
mlfi_header(ctx, headerf, headerv)
SMFICTX *ctx;
char *headerf;
char *headerv;
{
/* write the header to the log file */
fprintf(MLFIPRIV->mlfi_fp, "%s: %s\r\n", headerf, headerv);
/* continue processing */
return SMFIS_CONTINUE;
}
sfsistat
mlfi_eoh(ctx)
SMFICTX *ctx;
{
/* output the blank line between the header and the body */
fprintf(MLFIPRIV->mlfi_fp, "\r\n");
/* continue processing */
return SMFIS_CONTINUE;
}
sfsistat
mlfi_body(ctx, bodyp, bodylen)
SMFICTX *ctx;
u_char *bodyp;
size_t bodylen;
{
/* output body block to log file */
if (fwrite(bodyp, bodylen, 1, MLFIPRIV->mlfi_fp) <= 0)
{
/* write failed */
(void) mlfi_cleanup(ctx, false);
return SMFIS_TEMPFAIL;
}
/* continue processing */
return SMFIS_CONTINUE;
}
sfsistat
mlfi_eom(ctx)
SMFICTX *ctx;
{
return mlfi_cleanup(ctx, true);
}
sfsistat
mlfi_close(ctx)
SMFICTX *ctx;
{
return SMFIS_ACCEPT;
}
sfsistat
mlfi_abort(ctx)
SMFICTX *ctx;
{
return mlfi_cleanup(ctx, false);
}
sfsistat
mlfi_cleanup(ctx, ok)
SMFICTX *ctx;
bool ok;
{
sfsistat rstat = SMFIS_CONTINUE;
struct mlfiPriv *priv = MLFIPRIV;
char *p;
char host[512];
char hbuf[1024];
if (priv == NULL)
return rstat;
/* close the archive file */
if (priv->mlfi_fp != NULL && fclose(priv->mlfi_fp) == EOF)
{
/* failed; we have to wait until later */
rstat = SMFIS_TEMPFAIL;
(void) unlink(priv->mlfi_fname);
}
else if (ok)
{
/* add a header to the message announcing our presence */
if (gethostname(host, sizeof host) < 0)
snprintf(host, sizeof host, "localhost");
p = strrchr(priv->mlfi_fname, '/');
if (p == NULL)
p = priv->mlfi_fname;
else
p++;
snprintf(hbuf, sizeof hbuf, "%s@%s", p, host);
smfi_addheader(ctx, "X-Archived", hbuf);
}
else
{
/* message was aborted -- delete the archive file */
(void) unlink(priv->mlfi_fname);
}
/* release private memory */
free(priv->mlfi_fname);
free(priv);
smfi_setpriv(ctx, NULL);
/* return status */
return rstat;
}
struct smfiDesc smfilter =
{
"SampleFilter", /* filter name */
SMFI_VERSION, /* version code -- do not change */
SMFIF_ADDHDRS, /* flags */
NULL, /* connection info filter */
NULL, /* SMTP HELO command filter */
mlfi_envfrom, /* envelope sender filter */
NULL, /* envelope recipient filter */
mlfi_header, /* header filter */
mlfi_eoh, /* end of header */
mlfi_body, /* body block filter */
mlfi_eom, /* end of message */
mlfi_abort, /* message aborted */
mlfi_close /* connection cleanup */
};
int
main(argc, argv)
int argc;
char *argv[];
{
bool setconn = false;
int c;
const char *args = "p:";
/* Process command line options */
while ((c = getopt(argc, argv, args)) != -1)
{
switch (c)
{
case 'p':
if (optarg == NULL || *optarg == '\0')
{
(void) fprintf(stderr, "Illegal conn: %s\n",
optarg);
exit(EX_USAGE);
}
(void) smfi_setconn(optarg);
setconn = true;
break;
}
}
if (!setconn)
{
fprintf(stderr, "%s: Missing required -p argument\n", argv[0]);
exit(EX_USAGE);
}
if (smfi_register(smfilter) == MI_FAILURE)
{
fprintf(stderr, "smfi_register failed\n");
exit(EX_UNAVAILABLE);
}
return smfi_main();
}
/* eof */
$Revision: 8.40 $, Last updated $Date: 2003/12/11 18:14:34 $
$Revision: 8.42 $, Last updated $Date: 2006/06/29 17:10:16 $
+3 -2
View File
@@ -9,12 +9,13 @@
*/
#include <sm/gen.h>
SM_RCSID("@(#)$Id: comm.c,v 8.65 2004/07/07 21:41:30 ca Exp $")
SM_RCSID("@(#)$Id: comm.c,v 8.67 2006/11/02 17:54:44 ca Exp $")
#include "libmilter.h"
#include <sm/errstring.h>
#include <sys/uio.h>
static ssize_t retry_writev __P((socket_t, struct iovec *, int, struct timeval *));
static size_t Maxdatasize = MILTER_MAX_DATA_SIZE;
#if _FFR_MAXDATASIZE
@@ -351,7 +352,7 @@ mi_wr_cmd(sd, timeout, cmd, buf, len)
iov[1].iov_len = len;
iovcnt = 2;
}
l = retry_writev(sd, iov, iovcnt, timeout);
if (l == MI_FAILURE)
return MI_FAILURE;
+224 -137
View File
@@ -1,233 +1,320 @@
<html>
<head><title>Milter API</title></head>
<body>
<HTML>
<HEAD><TITLE>Milter API</TITLE></HEAD>
<BODY>
<!--
$Id: api.html,v 1.18 2004/04/28 23:26:51 msk Exp $
$Id: api.html,v 1.35 2006/11/30 23:09:23 ca Exp $
-->
<h1>Milter API</h1>
<H1>Milter API</H1>
<h2>Contents</h2>
<ul>
<li>Library Control Functions
<li>Data Access Functions
<li>Message Modification Functions
<li>Callbacks
</ul>
<H2>Contents</H2>
<UL>
<LI><A HREF="#LibraryControlFunctions">Library Control Functions</A>
<LI><A HREF="#DataAccessFunctions">Data Access Functions</A>
<LI><A HREF="#MessageModificationFunctions">Message Modification Functions</A>
<LI><A HREF="#Callbacks">Callbacks</A>
<LI><A HREF="#Miscellaneous">Miscellaneous</A>
</UL>
<h2>Library Control Functions</h2>
<H2><A NAME="LibraryControlFunctions">Library Control Functions</A></H2>
Before handing control to libmilter (by calling <a
href="smfi_main.html">smfi_main</a>), a filter may call the following
functions to set libmilter parameters. In particular, the filter must
call <a href="smfi_register.html">smfi_register</a> to register its
callbacks. Each function will return either MI_SUCCESS or MI_FAILURE to
Before handing control to libmilter (by calling
<A HREF="smfi_main.html">smfi_main</A>), a filter may call the following
functions to set libmilter parameters.
In particular, the filter must call
<A HREF="smfi_register.html">smfi_register</A> to register its callbacks.
Each function will return either MI_SUCCESS or MI_FAILURE to
indicate the status of the operation.
<p>
<P>
None of these functions communicate with the MTA. All alter the
library's state, some of which is communicated to the MTA inside <a
href="smfi_main.html">smfi_main</a>.
<p>
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th></tr>
library's state, some of which is communicated to the MTA inside
<A HREF="smfi_main.html">smfi_main</A>.
<tr><td><a href="smfi_opensocket.html">smfi_opensocket</a></td><td>Try to create the interface socket.</td></tr>
<P>
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
<tr><td><a href="smfi_register.html">smfi_register</a></td><td>Register a filter.</td></tr>
<TR><TD><A HREF="smfi_opensocket.html">smfi_opensocket</A></TD><TD>Try to create the interface socket.</TD></TR>
<tr><td><a href="smfi_setconn.html">smfi_setconn</a></td><td>Specify socket to use.</td></tr>
<TR><TD><A HREF="smfi_register.html">smfi_register</A></TD><TD>Register a filter.</TD></TR>
<tr><td><a href="smfi_settimeout.html">smfi_settimeout</a></td><td>Set timeout.</td></tr>
<TR><TD><A HREF="smfi_setconn.html">smfi_setconn</A></TD><TD>Specify socket to use.</TD></TR>
<tr><td><a href="smfi_setbacklog.html">smfi_setbacklog</a></td><td>Define the incoming <i>listen</i>(2) queue size.</td></tr>
<TR><TD><A HREF="smfi_settimeout.html">smfi_settimeout</A></TD><TD>Set timeout.</TD></TR>
<tr><td><a href="smfi_setdbg.html">smfi_setdbg</a></td><td>Set the milter library debugging (tracing) level.</td></tr>
<TR><TD><A HREF="smfi_setbacklog.html">smfi_setbacklog</A></TD><TD>Define the incoming <CODE>listen(2)</CODE> queue size.</TD></TR>
<tr><td><a href="smfi_stop.html">smfi_stop</a></td><td>Cause an orderly shutdown.</td></tr>
<TR><TD><A HREF="smfi_setdbg.html">smfi_setdbg</A></TD><TD>Set the milter library debugging (tracing) level.</TD></TR>
<tr><td><a href="smfi_main.html">smfi_main</a></td><td>Hand control to libmilter.</td></tr>
<TR><TD><A HREF="smfi_stop.html">smfi_stop</A></TD><TD>Cause an orderly shutdown.</TD></TR>
</table>
<TR><TD><A HREF="smfi_main.html">smfi_main</A></TD><TD>Hand control to libmilter.</TD></TR>
<h2>Data Access Functions</h2>
</TABLE>
<H2><A NAME="DataAccessFunctions">Data Access Functions</A></H2>
The following functions may be called from within the filter-defined callbacks
to access information about the current connection or message.
<p>
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th></tr>
<tr><td><a href="smfi_getsymval.html">smfi_getsymval</a></td><td>Return the value
of a symbol.</td></tr>
<P>
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR bgcolor="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
<TR><TD><A HREF="smfi_getsymval.html">smfi_getsymval</A></TD><TD>Return the value
of a symbol.</TD></TR>
<tr><td><a href="smfi_getpriv.html">smfi_getpriv</a></td><td>Get the private data
pointer.</td></tr>
<TR><TD><A HREF="smfi_getpriv.html">smfi_getpriv</A></TD><TD>Get the private data
pointer.</TD></TR>
<tr><td><a href="smfi_setpriv.html">smfi_setpriv</a></td><td>Set the private data
pointer.</td></tr>
<TR><TD><A HREF="smfi_setpriv.html">smfi_setpriv</A></TD><TD>Set the private data
pointer.</TD></TR>
<tr><td><a href="smfi_setreply.html">smfi_setreply</a></td><td>Set the specific
reply code to be used.</td></tr>
<TR><TD><A HREF="smfi_setreply.html">smfi_setreply</A></TD><TD>Set the specific
reply code to be used.</TD></TR>
<tr><td><a href="smfi_setmlreply.html">smfi_setmlreply</a></td><td>Set the
specific multi-line reply to be used.</td></tr>
<TR><TD><A HREF="smfi_setmlreply.html">smfi_setmlreply</A></TD><TD>Set the
specific multi-line reply to be used.</TD></TR>
</table>
</TABLE>
<h2>Message Modification Functions</h2>
<H2><A NAME="MessageModificationFunctions">Message Modification Functions</A></H2>
The following functions change a message's contents and attributes.
<b>They may only be called in <a href="xxfi_eom.html">xxfi_eom</a></b>.
<EM>They may only be called in <A HREF="xxfi_eom.html">xxfi_eom</A></EM>.
All of these functions may invoke additional communication with the MTA.
They will return either MI_SUCCESS or MI_FAILURE to indicate the status of
the operation.
<p>
<P>
A filter must have set the appropriate flag (listed below) in the
description passed to <a href="smfi_register.html">smfi_register</a>
description passed to <A HREF="smfi_register.html">smfi_register</A>
to call any message modification function. Failure to do so will
cause the MTA to treat a call to the function as a failure of the
filter, terminating its connection.
<p>
<P>
Note that the status returned indicates only whether or not the
filter's message was successfully sent to the MTA, not whether or not
the MTA performed the requested operation. For example, <a
href="smfi_addheader.html">smfi_addheader</a>, when called with an
the MTA performed the requested operation. For example,
<A HREF="smfi_addheader.html">smfi_addheader</A>, when called with an
illegal header name, will return MI_SUCCESS even though the MTA may
later refuse to add the illegal header.
<p>
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th><th>SMFIF_* flag</tr>
<tr><td><a href="smfi_addheader.html">smfi_addheader</a></td><td>Add a header to
the message.</td><td>SMFIF_ADDHDRS</td></tr>
<P>
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH><TH>SMFIF_* flag</TR>
<TR><TD><A HREF="smfi_addheader.html">smfi_addheader</A></TD><TD>Add a header to
the message.</TD><TD>SMFIF_ADDHDRS</TD></TR>
<tr><td><a href="smfi_chgheader.html">smfi_chgheader</a></td><td>Change or delete a header.</td><td>SMFIF_CHGHDRS</td></tr>
<TR><TD><A HREF="smfi_chgheader.html">smfi_chgheader</A></TD><TD>Change or delete a header.</TD><TD>SMFIF_CHGHDRS</TD></TR>
<tr><td><a href="smfi_insheader.html">smfi_insheader</a></td><td>Insert a
header into the message.</td><td>SMFIF_ADDHDRS</td></tr>
<TR><TD><A HREF="smfi_insheader.html">smfi_insheader</A></TD><TD>Insert a
header into the message.</TD><TD>SMFIF_ADDHDRS</TD></TR>
<tr><td><a href="smfi_addrcpt.html">smfi_addrcpt</a></td><td>Add a recipient to
the envelope.</td><td>SMFIF_ADDRCPT</td></tr>
<TR><TD><A HREF="smfi_chgfrom.html">smfi_chgfrom</A></TD><TD>Change the
envelope sender address.</TD><TD>SMFIF_CHGFROM</TD></TR>
<tr><td><a href="smfi_delrcpt.html">smfi_delrcpt</a></td><td>Delete a recipient
from the envelope.</td><td>SMFIF_DELRCPT</td></tr>
<TR><TD><A HREF="smfi_addrcpt.html">smfi_addrcpt</A></TD><TD>Add a recipient to
the envelope.</TD><TD>SMFIF_ADDRCPT</TD></TR>
<tr><td><a href="smfi_replacebody.html">smfi_replacebody</a></td><td>Replace the
body of the message.</td><td>SMFIF_CHGBODY</td></tr>
<TR><TD><A HREF="smfi_addrcpt_par.html">smfi_addrcpt_par</A></TD><TD>Add
a recipient including ESMTP parameter to the envelope.
</TD><TD>SMFIF_ADDRCPT_PAR</TD></TR>
</table>
<TR><TD><A HREF="smfi_delrcpt.html">smfi_delrcpt</A></TD><TD>Delete a recipient
from the envelope.</TD><TD>SMFIF_DELRCPT</TD></TR>
<h2>Other Message Handling Functions</h2>
<TR><TD><A HREF="smfi_replacebody.html">smfi_replacebody</A></TD><TD>Replace the
body of the message.</TD><TD>SMFIF_CHGBODY</TD></TR>
</TABLE>
<H2>Other Message Handling Functions</H2>
The following functions provide special case handling instructions for
milter or the MTA, without altering the content or status of the message.
<b>They too may only be called in <a href="xxfi_eom.html">xxfi_eom</a></b>.
<EM>They too may only be called in <A HREF="xxfi_eom.html">xxfi_eom</A></EM>.
All of these functions may invoke additional communication with the MTA.
They will return either MI_SUCCESS or MI_FAILURE to indicate the status of
the operation.
<p>
<P>
Note that the status returned indicates only whether or not the
filter's message was successfully sent to the MTA, not whether or not
the MTA performed the requested operation.
<p>
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th></tr>
<tr><td><a href="smfi_progress.html">smfi_progress</a></td><td>Report operation in progress.</td></tr>
<P>
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
<TR><TD><A HREF="smfi_progress.html">smfi_progress</A></TD><TD>Report operation in progress.</TD></TR>
<tr><td><a href="smfi_quarantine.html">smfi_quarantine</a></td><td>Quarantine a message.</td></tr>
<TR><TD><A HREF="smfi_quarantine.html">smfi_quarantine</A></TD><TD>Quarantine a message.</TD></TR>
</table>
</TABLE>
<h2><a name="callbacks">Callbacks</a></h2>
<H2><A NAME="Callbacks">Callbacks</A></H2>
The filter should implement one or more of the following callbacks,
which are registered via <a href="smfi_register.html">smfi_register</a>:
<p>
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th></tr>
which are registered via <A HREF="smfi_register.html">smfi_register</A>:
<tr><td><a href="xxfi_connect.html">xxfi_connect</a></td><td>connection info</td></tr>
<P>
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
<tr><td><a href="xxfi_helo.html">xxfi_helo</a></td><td>SMTP HELO/EHLO command</td></tr>
<TR><TD><A HREF="xxfi_connect.html">xxfi_connect</A></TD><TD>connection info</TD></TR>
<tr><td><a href="xxfi_envfrom.html">xxfi_envfrom</a></td><td>envelope sender</td></tr>
<TR><TD><A HREF="xxfi_helo.html">xxfi_helo</A></TD><TD>SMTP HELO/EHLO command</TD></TR>
<tr><td><a href="xxfi_envrcpt.html">xxfi_envrcpt</a></td><td>envelope recipient</td></tr>
<TR><TD><A HREF="xxfi_envfrom.html">xxfi_envfrom</A></TD><TD>envelope sender</TD></TR>
<tr><td><a href="xxfi_header.html">xxfi_header</a></td><td>header</td></tr>
<TR><TD><A HREF="xxfi_envrcpt.html">xxfi_envrcpt</A></TD><TD>envelope recipient</TD></TR>
<tr><td><a href="xxfi_eoh.html">xxfi_eoh</a></td><td>end of header</td></tr>
<TR><TD><A HREF="xxfi_data.html">xxfi_data</A></TD><TD>DATA command</TD></TR>
<tr><td><a href="xxfi_body.html">xxfi_body</a></td><td>body block</td></tr>
<TR><TD><A HREF="xxfi_unknown.html">xxfi_unknown</A></TD><TD>Unknown SMTP command</TD></TR>
<tr><td><a href="xxfi_eom.html">xxfi_eom</a></td><td>end of message</td></tr>
<TR><TD><A HREF="xxfi_header.html">xxfi_header</A></TD><TD>header</TD></TR>
<tr><td><a href="xxfi_abort.html">xxfi_abort</a></td><td>message aborted</td></tr>
<TR><TD><A HREF="xxfi_eoh.html">xxfi_eoh</A></TD><TD>end of header</TD></TR>
<tr><td><a href="xxfi_close.html">xxfi_close</a></td><td>connection cleanup</td></tr>
<TR><TD><A HREF="xxfi_body.html">xxfi_body</A></TD><TD>body block</TD></TR>
</table>
<TR><TD><A HREF="xxfi_eom.html">xxfi_eom</A></TD><TD>end of message</TD></TR>
<p>
<TR><TD><A HREF="xxfi_abort.html">xxfi_abort</A></TD><TD>message aborted</TD></TR>
<TR><TD><A HREF="xxfi_close.html">xxfi_close</A></TD><TD>connection cleanup</TD></TR>
<TR><TD><A HREF="xxfi_negotiate.html">xxfi_negotiate</A></TD><TD>option negotiattion</TD></TR>
</TABLE>
<P>
The above callbacks should all return one of the following return values,
having the indicated meanings. Any return other than one of the below
values constitutes an error, and will cause sendmail to terminate its
connection to the offending filter.
<p><a name="conn-spec">Milter</a> distinguishes between recipient-,
<P><A NAME="conn-spec">Milter</A> distinguishes between recipient-,
message-, and connection-oriented routines. Recipient-oriented
callbacks may affect the processing of a single message recipient;
message-oriented callbacks, a single message; connection-oriented
callbacks, an entire connection (during which multiple messages may be
delivered to multiple sets of recipients).
<a href="xxfi_envrcpt.html">xxfi_envrcpt</a> is recipient-oriented.
<a href="xxfi_connect.html">xxfi_connect</a>,
<a href="xxfi_helo.html">xxfi_helo</a> and
<a href="xxfi_close.html">xxfi_close</a> are connection-oriented. All
<A HREF="xxfi_envrcpt.html">xxfi_envrcpt</A> is recipient-oriented.
<A HREF="xxfi_connect.html">xxfi_connect</A>,
<A HREF="xxfi_helo.html">xxfi_helo</A> and
<A HREF="xxfi_close.html">xxfi_close</A> are connection-oriented. All
other callbacks are message-oriented.
<p>
<table border="1" cellspacing=0 cellpadding=2>
<tr bgcolor="#dddddd"><th>Return value</th><th>Description</th></tr>
<tr valign="top">
<td>SMFIS_CONTINUE</td>
<td>Continue processing the current connection, message, or recipient.
</td>
</tr>
<tr valign="top">
<td>SMFIS_REJECT</td>
<td>For a connection-oriented routine, reject this connection; call <a href="xxfi_close.html">xxfi_close</a>.<br>
<P>
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2>
<TR BGCOLOR="#dddddd"><TH>Return value</TH><TH>Description</TH></TR>
<TR VALIGN="TOP">
<TD>SMFIS_CONTINUE</TD>
<TD>Continue processing the current connection, message, or recipient.
</TD>
</TR>
<TR VALIGN="TOP">
<TD>SMFIS_REJECT</TD>
<TD>For a connection-oriented routine, reject this connection; call <A HREF="xxfi_close.html">xxfi_close</A>.<BR>
For a message-oriented routine (except
<a href="xxfi_eom.html">xxfi_eom</a> or
<a href="xxfi_abort.html">xxfi_abort</a>), reject this message.<br>
<A HREF="xxfi_eom.html">xxfi_eom</A> or
<A HREF="xxfi_abort.html">xxfi_abort</A>), reject this message.<BR>
For a recipient-oriented routine, reject the current recipient (but continue processing the current message).
</td>
</tr>
<tr valign="top">
<td>SMFIS_DISCARD</td>
<td>For a message- or recipient-oriented routine, accept this message, but silently discard it.<br>
</TD>
</TR>
<TR valign="top">
<TD>SMFIS_DISCARD</TD>
<TD>For a message- or recipient-oriented routine, accept this message, but silently discard it.<BR>
SMFIS_DISCARD should not be returned by a connection-oriented routine.
</td>
</tr>
<tr valign="top">
<td>SMFIS_ACCEPT</td>
<td>For a connection-oriented routine, accept this connection without further filter processing; call <a href="xxfi_close.html">xxfi_close</a>.<br>
For a message- or recipient-oriented routine, accept this message without further filtering.<br>
</td>
</tr>
<tr valign="top">
<td>SMFIS_TEMPFAIL</td>
<td>Return a temporary failure, i.e., the corresponding SMTP command will return an appropriate 4xx status code.
For a message-oriented routine (except <a href="xxfi_envfrom.html">xxfi_envfrom</a>), fail for this message. <br>
For a connection-oriented routine, fail for this connection; call <a href="xxfi_close.html">xxfi_close</a>. <br>
</TD>
</TR>
<TR valign="top">
<TD>SMFIS_ACCEPT</TD>
<TD>For a connection-oriented routine, accept this connection without further filter processing; call <A HREF="xxfi_close.html">xxfi_close</A>.<BR>
For a message- or recipient-oriented routine, accept this message without further filtering.<BR>
</TD>
</TR>
<TR valign="top">
<TD>SMFIS_TEMPFAIL</TD>
<TD>Return a temporary failure, i.e., the corresponding SMTP command will return an appropriate 4xx status code.
For a message-oriented routine (except <A HREF="xxfi_envfrom.html">xxfi_envfrom</A>), fail for this message. <BR>
For a connection-oriented routine, fail for this connection; call <A HREF="xxfi_close.html">xxfi_close</A>. <BR>
For a recipient-oriented routine, only fail for the current recipient; continue message processing.
</td>
</tr>
</table>
</TD>
</TR>
<hr size="1">
<font size="-1">
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
<TR valign="top">
<TD><A NAME="SMFIS_SKIP">SMFIS_SKIP</A></TD>
<TD>Skip further callbacks of the same type in this transaction.
Currently this return value is only allowed in
<A HREF="xxfi_body.html">xxfi_body()</A>.
It can be used if a milter has received sufficiently many
body chunks to make a decision, but still wants to invoke
message modification functions that are only allowed to be called from
<A HREF="xxfi_eom.html">xxfi_eom()</A>.
Note: the milter <EM>must</EM>
<A HREF="xxfi_negotiate.html">negotiate</A>
this behavior with the MTA, i.e., it must check whether
the protocol action
<A HREF="xxfi_negotiate.html#SMFIP_SKIP"><CODE>SMFIP_SKIP</CODE></A>
is available and if so, the milter must request it.
</TD>
</TR>
<TR valign="top">
<TD><A NAME="SMFIS_NOREPLY">SMFIS_NOREPLY</A></TD>
<TD>Do not send a reply back to the MTA.
The milter <EM>must</EM>
<A HREF="xxfi_negotiate.html">negotiate</A>
this behavior with the MTA, i.e., it must check whether
the appropriate protocol action
<A HREF="xxfi_negotiate.html#SMFIP_NR_"><CODE>SMFIP_NR_*</CODE></A>
is available and if so, the milter must request it.
If you set the
<A HREF="xxfi_negotiate.html#SMFIP_NR_"><CODE>SMFIP_NR_*</CODE></A>
protocol action for a callback, that callback <EM>must</EM>
always reply with
SMFIS_NOREPLY.
Using any other reply code is a violation of the API.
If in some cases your callback may return another value
(e.g., due to some resource shortages), then you
<EM>must not</EM> set
<A HREF="xxfi_negotiate.html#SMFIP_NR_"><CODE>SMFIP_NR_*</CODE></A>
and you must use
SMFIS_CONTINUE as the default return code.
(Alternatively you can try to delay reporting the problem to
a later callback for which
<A HREF="xxfi_negotiate.html#SMFIP_NR_"><CODE>SMFIP_NR_*</CODE></A>
is not set.)
</TD>
</TR>
</TABLE>
<H2><A NAME="Miscellaneous">Miscellaneous</A></H2>
<P>
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
<TR><TD><A HREF="smfi_version.html">smfi_version</A></TD><TD>libmilter (runtime) version info</TD></TR>
<TR><TD><A HREF="smfi_setsymlist.html">smfi_setsymlist</A></TD><TD>
Set the list of macros that the milter wants to receive from the MTA
for a protocol stage.
</TD></TR>
</TABLE>
<P>
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Constant</TH><TH>Description</TH></TR>
<TR><TD><A HREF="smfi_version.html">SMFI_VERSION</A></TD><TD>libmilter (compile time) version info</TD></TR>
</TABLE>
<HR SIZE="1">
<FONT SIZE="-1">
Copyright (c) 2000, 2003, 2006 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</font>
</body>
</html>
</FONT>
</BODY>
</HTML>
+45 -45
View File
@@ -1,23 +1,23 @@
<html>
<head>
<title>Architecture</title>
</head>
<body>
<HTML>
<HEAD>
<TITLE>Architecture</TITLE>
</HEAD>
<BODY>
<!--
$Id: design.html,v 1.11 2003/03/05 19:57:54 ca Exp $
$Id: design.html,v 1.12 2006/08/08 20:55:57 ca Exp $
-->
<h1>Architecture</h1>
<H1>Architecture</H1>
<h2>Contents</h2>
<H2>Contents</H2>
<ul>
<li>Design Goals
<li>Implementing Filtering Policies
<li>MTA - Filter Communication
</ul>
<UL>
<LI>Design Goals
<LI>Implementing Filtering Policies
<LI>MTA - Filter Communication
</UL>
<h2>Goals</h2>
<H2>Goals</H2>
The Sendmail Content Management API (Milter) provides an interface for
third-party software to validate and modify messages as they pass
@@ -28,7 +28,7 @@ recipients, headers, and body. The MTA configuration file specifies
which filters are to be applied, and in what order, allowing an
administrator to combine multiple independently-developed filters.
<p>
<P>
We expect to see both vendor-supplied, configurable mail filtering
applications and a multiplicity of script-like filters designed by and
for MTA administrators. A certain degree of coding sophistication and
@@ -37,7 +37,7 @@ allows filters to exercise fine-grained control at the SMTP level.
However, as will be seen in the example, many filtering applications
can be written with relatively little protocol knowledge.
<p>
<P>
Given these expectations, the API is designed to achieve the following
goals:
@@ -47,7 +47,7 @@ goals:
(of course, they can if required, but that is a local issue);
this will simplify coding
and limit the impact of security flaws in the filter program.
<p>
<P>
<LI>Reliability.
Coding failures in a Milter process that cause that process
to hang or core-dump
@@ -59,7 +59,7 @@ goals:
The latter failure mode will generally have sendmail return
a 4xx SMTP code (although in later phases of the SMTP protocol
it may cause the mail to be queued for later processing).
<p>
<P>
<LI>Simplicity.
The API should make implementation of a new filter
no more difficult than absolutely necessary.
@@ -70,12 +70,12 @@ goals:
<LI>Provide all interfaces required
while avoiding unnecessary pedanticism.
</UL>
<p>
<P>
<LI>Performance.
Simple filters should not seriously impact overall MTA performance.
</OL>
<h2>Implementing Filtering Policies</h2>
<H2>Implementing Filtering Policies</H2>
Milter is designed to allow a server administrator to combine
third-party filters to implement a desired mail filtering policy. For
@@ -87,16 +87,16 @@ engine, then via a large-scale spam-catching service, and finally
append the desired footer if the message still met requisite criteria.
Any of these filters could be added or changed independently.
<p>
<P>
Thus the site administrator, not the filter writer, controls the
overall mail filtering environment. In particular, he/she must decide
which filters are run, in what order they are run, and how they
communicate with the MTA. These parameters, as well as the
actions to be taken if a filter becomes unavailable, are selectable
during MTA configuration. <a href="installation.html">Further
details</a> are available later in this document.
during MTA configuration. <A href="installation.html">Further
details</A> are available later in this document.
<h2>MTA - Filter communication</h2>
<H2>MTA - Filter communication</H2>
Filters run as separate processes, outside of the sendmail address
space. The benefits of this are threefold:
@@ -112,36 +112,36 @@ space. The benefits of this are threefold:
the parallelism inherent in multiple processes.</LI>
</OL>
<p>
<P>
Each filter may communicate with multiple MTAs at the same time over
local or remote connections, using multiple threads of execution. <a
href="#figure-1">Figure 1</a> illustrates a possible network of
local or remote connections, using multiple threads of execution.
<A HREF="#figure-1">Figure 1</A> illustrates a possible network of
communication channels between a site's filters, its MTAs, and other
MTAs on the network:
</p>
<div align="center">
<a name="figure-1"><img src="figure1.jpg" ALT=""></A><br>
<b>Figure 1: A set of MTA's interacting with a set of filters.</b>
</div>
<p>
</P>
<DIV align="center">
<A name="figure-1"><IMG src="figure1.jpg" ALT=""></A><BR>
<B>Figure 1: A set of MTA's interacting with a set of filters.</B>
</DIV>
<P>
The Milter library (libmilter) implements the communication protocol.
It accepts connections from various MTAs, passes the relevant data to
the filter through callbacks, then makes appropriate responses based
on return codes. A filter may also send data to the MTA as a result
of library calls. <a href="#figure-2">Figure 2</a> shows a single
of library calls. <A href="#figure-2">Figure 2</A> shows a single
filter process processing messages from two MTAs:
</p>
<div align="center">
<img src="figure2.jpg" ALT=""><br>
<b>Figure 2: A filter handling simultaneous requests from two MTA's.</b>
</div>
<hr size="1">
<font size="-1">
</P>
<DIV align="center">
<IMG src="figure2.jpg" ALT=""><BR>
<B>Figure 2: A filter handling simultaneous requests from two MTA's.</B>
</DIV>
<HR size="1">
<FONT size="-1">
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</font>
</body>
</html>
</FONT>
</BODY>
</HTML>
+54 -54
View File
@@ -1,22 +1,22 @@
<html>
<head>
<title>Filtering Mail with Sendmail</title>
</head>
<body>
<HTML>
<HEAD>
<TITLE>Filtering Mail with Sendmail</TITLE>
</HEAD>
<BODY>
<!--
$Id: index.html,v 1.12 2003/03/05 19:57:54 ca Exp $
$Id: index.html,v 1.13 2006/08/08 20:55:57 ca Exp $
-->
<h1>Filtering Mail with Sendmail</h1>
<H1>Filtering Mail with Sendmail</H1>
<!--
<P><b>Disclaimer</b>:
<P><B>Disclaimer</B>:
This preliminary API description is provided for review only. This
specification may change based on feedback from reviewers, and does
not bind Sendmail to offer this functionality in any release.
-->
<h2>Introduction</h2>
<H2>Introduction</H2>
<P>
Sendmail's Content Management API (milter) provides third-party
@@ -26,67 +26,67 @@ content and meta-information. Filtering policies implemented by
Milter-conformant filters may then be centrally configured and
composed in an end-user's MTA configuration file.
<p>
<P>
Possible uses for filters include spam rejection, virus
filtering, and content control. In general, Milter seeks to address
site-wide filtering concerns in a scalable way. Individual users' mail
filtering needs (e.g. sorting messages by subject) are left to
client-level programs such as <a href="http://www.procmail.org">Procmail</a>.
client-level programs such as <A href="http://www.procmail.org">Procmail</A>.
<P>
This document is a technical introduction intended for those
interested in developing Milter filters. It includes:
<ul>
<li>A description of Milter's design goals.
<UL>
<LI>A description of Milter's design goals.
<li>An explanation of Milter application architecture, including
<LI>An explanation of Milter application architecture, including
interactions between the support library and user code, and between
filters and the MTA.
<li>A specification of the C application programming interface.
<li>An example of a simple Milter filter.
</ul>
<LI>A specification of the C application programming interface.
<LI>An example of a simple Milter filter.
</UL>
<h2>Contents</h2>
<H2>Contents</H2>
<ul>
<li><a href="design.html">Architecture</a>
<ul>
<li>Design Goals
<li>Implementing Filtering Policies
<li>MTA - Filter communication
</ul>
<li><a href="overview.html">Technical Overview</a>
<ul>
<li>Initialization
<li>Control flow
<li>Multithreading
<li>Resource Management
<li>Signal Handling
</ul>
<li><a href="api.html">API Documentation</a>
<ul>
<li>Library Control Functions
<li>Data Access Functions
<li>Message Modification Functions
<li>Callbacks
</ul>
<li><a href="installation.html">Installation and Configuration</a>
<ul>
<li>Compiling and Installing Your Filter
<li>Configuring Sendmail
</ul>
<li><a href="sample.html">A Sample Filter</a>
<!-- <li><a href="other.html">Other Sources of Information</a> -->
</ul>
<UL>
<LI><A href="design.html">Architecture</A>
<UL>
<LI>Design Goals
<LI>Implementing Filtering Policies
<LI>MTA - Filter communication
</UL>
<LI><A href="overview.html">Technical Overview</A>
<UL>
<LI>Initialization
<LI>Control flow
<LI>Multithreading
<LI>Resource Management
<LI>Signal Handling
</UL>
<LI><A href="api.html">API Documentation</A>
<UL>
<LI>Library Control Functions
<LI>Data Access Functions
<LI>Message Modification Functions
<LI>Callbacks
</UL>
<LI><A href="installation.html">Installation and Configuration</A>
<UL>
<LI>Compiling and Installing Your Filter
<LI>Configuring Sendmail
</UL>
<LI><A href="sample.html">A Sample Filter</A>
<!-- <LI><A href="other.html">Other Sources of Information</A> -->
</UL>
<hr size="1">
<font size="-1">
<HR size="1">
<FONT size="-1">
Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</font>
</body>
</html>
</FONT>
</BODY>
</HTML>
@@ -1,96 +1,90 @@
<html>
<head><title>Installation and Configuration</title>
</head>
<body>
<HTML>
<HEAD><TITLE>Installation and Configuration</TITLE>
</HEAD>
<BODY>
<!--
$Id: installation.html,v 1.20 2003/03/05 19:57:54 ca Exp $
$Id: installation.html,v 1.23 2006/08/31 17:16:03 ca Exp $
-->
<h1>Installation</h1>
<h2>Contents</h2>
<ul>
<li><a href="#compile">Compiling and Installing Your Filter</a>
<li><a href="#config">Configuring Sendmail</a>
</ul>
<H1>Installation</H1>
<H2>Contents</H2>
<UL>
<LI><A href="#compile">Compiling and Installing Your Filter</A>
<LI><A href="#config">Configuring Sendmail</A>
</UL>
<h2><a name="compile">Compiling and Installing Your Filter</A></h2>
<H2><A name="compile">Compiling and Installing Your Filter</A></H2>
To compile a filter, modify the Makefile provided with the sample program, or:
<ul>
<li>Put the include and Sendmail directories in your include path
<UL>
<LI>Put the include and Sendmail directories in your include path
(e.g. -I/path/to/include -I/path/to/sendmail).
<li>Make sure libmilter.a is in your library path, and link your
<LI>Make sure libmilter.a is in your library path, and link your
application with it (e.g. "-lmilter").
<li>Compile with pthreads, either by using -pthread for gcc, or
<LI>Compile with pthreads, either by using -pthread for gcc, or
linking with a pthreads support library (-lpthread).
</ul>
</UL>
Your compile command line will look like
<pre>
<PRE>
cc -I/path/to/include -I/path/to/sendmail -c myfile.c
</pre>
</PRE>
and your linking command line will look something like
<pre>
<PRE>
cc -o myfilter [object-files] -L[library-location] -lmilter -pthread
</pre>
</PRE>
<H2><a name="config">Configuring Sendmail</A></H2>
<H2><A name="config">Configuring Sendmail</A></H2>
First, you must compile sendmail with MILTER defined.
If you use a sendmail version older than 8.12 please see
If you use a sendmail version older than 8.13 please see
the instructions for your version.
To do this, add the following lines to your build
configuration file (devtools/Site/config.site.m4)
<pre>
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
</pre>
then type <code>./Build -c</code> in your sendmail directory.
The default compilation options for sendmail enable support
for milters since 8.13.
<P>
Next, you must add the desired filters to your sendmail configuration
(.mc) file.
Mail filters have three equates:
The required <code>S=</code> equate specifies the socket where
sendmail should look for the filter; The optional <code>F=</code> and
<code>T=</code> equates specify flags and timeouts, respectively. All
equates names, equate field names, and flag values are case sensitive.
The required <CODE>S=</CODE> equate specifies the socket where
sendmail should look for the filter; the optional <CODE>F=</CODE> and
<CODE>T=</CODE> equates specify flags and timeouts, respectively.
All equates names, equate field names, and flag values are case sensitive.
<P>
The current flags (<code>F=</code>) are:
<p>
<table cellspacing="1" cellpadding=4 border=1>
<tr bgcolor="#dddddd" align=left valign=top>
<th>Flag</TH> <th align="center">Meaning</TH>
The current flags (<CODE>F=</CODE>) are:
<P>
<TABLE cellspacing="1" cellpadding=4 border=1>
<TR bgcolor="#dddddd" align=left valign=top>
<TH>Flag</TH> <TH align="center">Meaning</TH>
</TR>
<tr align="left" valign=top>
<TR align="left" valign=top>
<TD>R</TD> <TD>Reject connection if filter unavailable</TD>
</TR>
<tr align="left" valign=top>
<TR align="left" valign=top>
<TD>T</TD> <TD>Temporary fail connection if filter unavailable</TD>
</TR>
</TABLE>
If a filter is unavailable or unresponsive and no flags have been
specified, the MTA will continue normal handling of the current
connection. The MTA will try to contact the filter again on each new
connection.
The MTA will try to contact the filter again on each new connection.
<P>
There are three fields inside of the <code>T=</code> equate: S, R, and
E. Note the separator between each is a ";" (semicolon), as ","
(comma) already separates equates. The value of each field is a
decimal number followed by a single letter designating the units ("s"
for seconds, "m" for minutes). The fields have the following
meanings:
<p>
There are three fields inside of the <CODE>T=</CODE> equate: S, R, and E.
Note the separator between each is a ";" (semicolon), as ","
(comma) already separates equates.
The value of each field is a decimal number followed by a single letter
designating the units ("s" for seconds, "m" for minutes).
The fields have the following meanings:
<P>
<TABLE cellspacing="1" cellpadding=4 border=1>
<TR bgcolor="#dddddd" align=left valign=top>
<TH>Flag</TH> <TH align="center">Meaning</TH>
</TR>
<TR align="left" valign=top>
<TD>C</TD> <TD>Timeout for connecting to a filter. If set to 0, the
system's <CODE>connect()</CODE> timeout will be used.
system's <CODE>connect(2)</CODE> timeout will be used.
Default: 5m</TD>
</TR>
<TR align="left" valign=top>
@@ -106,27 +100,28 @@ meanings:
</TR>
</TABLE>
<p>
The following sendmail.mc example specifies three filters. The first
two rendezvous on Unix-domain sockets in the /var/run directory; the
third uses an IP socket on port 999.
<pre>
<P>
The following sendmail.mc example specifies three filters.
The first two rendezvous on Unix-domain sockets in the /var/run directory;
the third uses an IP socket on port 999.
<PRE>
INPUT_MAIL_FILTER(`filter1', `S=unix:/var/run/f1.sock, F=R')
INPUT_MAIL_FILTER(`filter2', `S=unix:/var/run/f2.sock, F=T, T=S:1s;R:1s;E:5m')
INPUT_MAIL_FILTER(`filter3', `S=inet:999@localhost, T=C:2m')
define(`confINPUT_MAIL_FILTERS', `filter2,filter1,filter3')
<hr width="30%">
<HR width="30%">
m4 ../m4/cf.m4 myconfig.mc &gt; myconfig.cf
</pre>
</PRE>
By default, the filters would be run in the order declared,
i.e. "filter1, filter2, filter3"; however, since
<code>confINPUT_MAIL_FILTERS</code> is defined, the filters will be
run "filter2, filter1, filter3". Also note that a filter can be
defined without adding it to the input filter list by using
<CODE>confINPUT_MAIL_FILTERS</CODE> is defined, the filters will be
run "filter2, filter1, filter3".
Also note that a filter can be defined
without adding it to the input filter list by using
MAIL_FILTER() instead of INPUT_MAIL_FILTER().
<p>
<P>
The above macros will result in the following lines being added to
your .cf file:
<PRE>
@@ -136,34 +131,35 @@ your .cf file:
O InputMailFilters=filter2,filter1,filter3
</PRE>
<p>
Finally, the sendmail macros accessible via <a
href="smfi_getsymval.html">smfi_getsymval</a> can be configured by
<P>
Finally, the sendmail macros accessible via
<A HREF="smfi_getsymval.html">smfi_getsymval</A> can be configured by
defining the following m4 variables (or cf options):
<table cellspacing="1" cellpadding=4 border=1>
<tr bgcolor="#dddddd" align=left valign=top>
<th align="center">In .mc file</th> <th align="center">In .cf file</TH>
<th align="center">Default Value</th>
</tr>
<tr><td>confMILTER_MACROS_CONNECT</td><td>Milter.macros.connect</td>
<td><code>j, _, {daemon_name}, {if_name}, {if_addr}</code></td></tr>
<tr><td>confMILTER_MACROS_HELO</td><td>Milter.macros.helo</td>
<td><code>{tls_version}, {cipher}, {cipher_bits}, {cert_subject},
{cert_issuer}</code></td></tr>
<tr><td>confMILTER_MACROS_ENVFROM</td><td>Milter.macros.envfrom</td>
<td><code>i, {auth_type}, {auth_authen}, {auth_ssf}, {auth_author},
{mail_mailer}, {mail_host}, {mail_addr}</code></td></tr>
<tr><td>confMILTER_MACROS_ENVRCPT</td><td>Milter.macros.envrcpt</td>
<td><code>{rcpt_mailer}, {rcpt_host}, {rcpt_addr}</code></td></tr>
</table>
<TABLE cellspacing="1" cellpadding=4 border=1>
<TR bgcolor="#dddddd" align=left valign=top>
<TH align="center">In .mc file</TH> <TH align="center">In .cf file</TH>
<TH align="center">Default Value</TH>
</TR>
<TR><TD>confMILTER_MACROS_CONNECT</TD><TD>Milter.macros.connect</TD>
<TD><CODE>j, _, {daemon_name}, {if_name}, {if_addr}</CODE></TD></TR>
<TR><TD>confMILTER_MACROS_HELO</TD><TD>Milter.macros.helo</TD>
<TD><CODE>{tls_version}, {cipher}, {cipher_bits}, {cert_subject},
{cert_issuer}</CODE></TD></TR>
<TR><TD>confMILTER_MACROS_ENVFROM</TD><TD>Milter.macros.envfrom</TD>
<TD><CODE>i, {auth_type}, {auth_authen}, {auth_ssf}, {auth_author},
{mail_mailer}, {mail_host}, {mail_addr}</CODE></TD></TR>
<TR><TD>confMILTER_MACROS_ENVRCPT</TD><TD>Milter.macros.envrcpt</TD>
<TD><CODE>{rcpt_mailer}, {rcpt_host}, {rcpt_addr}</CODE></TD></TR>
</TABLE>
For information about available macros and their meanings, please
consult the sendmail documentation.
<hr size="1">
<font size="-1">
Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
<HR size="1">
<FONT size="-1">
Copyright (c) 2000-2003, 2006 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</font>
</body> </html>
</FONT>
</BODY>
</HTML>
+11 -11
View File
@@ -1,18 +1,18 @@
<html>
<head><title>Other Resources</title>
</head>
<body>
<HTML>
<HEAD><TITLE>Other Resources</TITLE>
</HEAD>
<BODY>
<!--
$Id: other.html,v 1.5 2003/03/05 19:57:54 ca Exp $
$Id: other.html,v 1.6 2006/08/08 20:55:57 ca Exp $
-->
FAQ? Mailing list? More sample filters?
<hr size="1">
<font size="-1">
<HR size="1">
<FONT size="-1">
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</font>
</body>
</html>
</FONT>
</BODY>
</HTML>
+157 -136
View File
@@ -1,194 +1,215 @@
<html>
<head>
<title>Technical Overview</title>
</head>
<body>
<HTML>
<HEAD>
<TITLE>Technical Overview</TITLE>
</HEAD>
<BODY>
<!--
$Id: overview.html,v 1.14 2003/03/05 19:57:54 ca Exp $
$Id: overview.html,v 1.19 2006/12/21 18:23:47 ca Exp $
-->
<h1>Technical Overview</h1>
<H1>Technical Overview</H1>
<h2>Contents</h2>
<H2>Contents</H2>
<ul>
<li>Initialization
<li>Control flow
<li>Multithreading
<li>Resource Management
<li>Signal Handling
</ul>
<UL>
<LI><A HREF="#Initialization">Initialization</A>
<LI><A HREF="#ControlFlow">Control Flow</A>
<LI><A HREF="#Multithreading">Multithreading</A>
<LI><A HREF="#ResourceManagement">Resource Management</A>
<LI><A HREF="#SignalHandling">Signal Handling</A>
</UL>
<h2>Initialization</h2>
<H2><A NAME="Initialization">Initialization</A></H2>
In addition to its own initialization, libmilter expects a filter to initialize several parameters before calling <a href="smfi_main.html">smfi_main</a>:
<ul>
<li>The callbacks the filter wishes to be called, and the types of
message modification it intends to perform (required, see <a
href="smfi_register.html">smfi_register</a>).
In addition to its own initialization,
libmilter expects a filter to initialize several parameters
before calling <A HREF="smfi_main.html">smfi_main</A>:
<UL>
<LI>The callbacks the filter wishes to be called, and the types of
message modification it intends to perform (required, see
<A HREF="smfi_register.html">smfi_register</A>).
<li>The socket address to be used when communicating with the MTA
(required, see <a href="smfi_setconn.html">smfi_setconn</a>).
<LI>The socket address to be used when communicating with the MTA
(required, see <A HREF="smfi_setconn.html">smfi_setconn</A>).
<li>The number of seconds to wait for MTA connections before
timing out (optional, see <a
href="smfi_settimeout.html">smfi_settimeout</a>).
</ul>
<p>
If the filter fails to initialize libmilter, or if one or more of the
parameters it has passed are invalid, a subsequent call to smfi_main
will fail.
<LI>The number of seconds to wait for MTA connections before
timing out (optional, see
<A HREF="smfi_settimeout.html">smfi_settimeout</A>).
</UL>
<P>
If the filter fails to initialize libmilter,
or if one or more of the parameters it has passed are invalid,
a subsequent call to smfi_main will fail.
<h2>Control flow</h2>
<H2><A NAME="ControlFlow">Control Flow</A></H2>
<p>
<P>
The following pseudocode describes the filtering process from the
perspective of a set of <code>N</code> MTA's, each corresponding to a
connection. Callbacks are shown beside the processing stages in which
they are invoked; if no callbacks are defined for a particular stage,
that stage may be bypassed. Though it is not shown, processing may be
aborted at any time during a message, in which case the <a
href="xxfi_abort.html">xxfi_abort</a> callback is invoked and control
returns to <code>MESSAGE</code>.
<p>
<pre>
perspective of a set of <CODE>N</CODE> MTA's,
each corresponding to a connection.
Callbacks are shown beside the processing stages in which they are invoked;
if no callbacks are defined for a particular stage,
that stage may be bypassed.
Though it is not shown,
processing may be aborted at any time during a message,
in which case the
<A HREF="xxfi_abort.html">xxfi_abort</A> callback is invoked and control
returns to <CODE>MESSAGE</CODE>.
<P>
<PRE>
For each of N connections
{
For each filter
process connection/helo (<a href="xxfi_connect.html">xxfi_connect</a>, <a href="xxfi_helo.html">xxfi_helo</a>)
process connection/helo (<A HREF="xxfi_connect.html">xxfi_connect</A>, <A HREF="xxfi_helo.html">xxfi_helo</A>)
MESSAGE:For each message in this connection (sequentially)
{
For each filter
process sender (<a href="xxfi_envfrom.html">xxfi_envfrom</a>)
process sender (<A HREF="xxfi_envfrom.html">xxfi_envfrom</A>)
For each recipient
{
For each filter
process recipient (<a href="xxfi_envrcpt.html">xxfi_envrcpt</a>)
process recipient (<A HREF="xxfi_envrcpt.html">xxfi_envrcpt</A>)
}
For each filter
{
process DATA (<A HREF="xxfi_data.html">xxfi_data</A>)
For each header
process header (<a href="xxfi_header.html">xxfi_header</a>)
process end of headers (<a href="xxfi_eoh.html">xxfi_eoh</a>)
process header (<A HREF="xxfi_header.html">xxfi_header</A>)
process end of headers (<A HREF="xxfi_eoh.html">xxfi_eoh</A>)
For each body block
process this body block (<a href="xxfi_body.html">xxfi_body</a>)
process end of message (<a href="xxfi_eom.html">xxfi_eom</a>)
process this body block (<A HREF="xxfi_body.html">xxfi_body</A>)
process end of message (<A HREF="xxfi_eom.html">xxfi_eom</A>)
}
}
For each filter
process end of connection (<a href="xxfi_close.html">xxfi_close</a>)
process end of connection (<A HREF="xxfi_close.html">xxfi_close</A>)
}
</pre>
</PRE>
<P>Note: Filters are contacted in order defined in config file.</P>
<P>
To write a filter, a vendor supplies callbacks to process relevant
parts of a message transaction. The library then controls all
sequencing, threading, and protocol exchange with the MTA. <a
href="#figure-3">Figure 3</a> outlines control flow for a filter
parts of a message transaction.
The library then controls all sequencing, threading,
and protocol exchange with the MTA.
<A HREF="#figure-3">Figure 3</A> outlines control flow for a filter
process, showing where different callbacks are invoked.
</p>
<div align="center"><a name="figure-3"></a>
<table border=1 cellspacing=0 cellpadding=2 width="70%">
<tr bgcolor="#dddddd"><th>SMTP Commands</th><th>Milter Callbacks</th></tr>
<tr><td>(open SMTP connection)</td><td>xxfi_connect</td></tr>
<tr><td>HELO ...</td><td>xxfi_helo</td></tr>
<tr><td>MAIL From: ...</td><td>xxfi_envfrom</td></tr>
<tr><td>RCPT To: ...</td><td>xxfi_envrcpt</td></tr>
<tr><td>[more RCPTs]</td><td>[xxfi_envrcpt]</td></tr>
<tr><td>DATA</td><td>&nbsp;</td></tr>
<tr><td>Header: ...</td><td>xxfi_header</td></tr>
<tr><td>[more headers]</td><td>[xxfi_header]</td></tr>
<tr><td>&nbsp;</td><td>xxfi_eoh</td></tr>
<tr><td>body... </td><td>xxfi_body</td></tr>
<tr><td>[more body...]</td><td>[xxfi_body]</td></tr>
<tr><td>.</td><td>xxfi_eom</td></tr>
<tr><td>QUIT</td><td>xxfi_close</td></tr>
<tr><td>(close SMTP connection)</td><td>&nbsp;</td></tr>
</table>
<b>Figure 3: Milter callbacks related to an SMTP transaction.</b>
</div>
<p>
</P>
<DIV ALIGN="center"><A NAME="figure-3"></A>
<TABLE border=1 cellspacing=0 cellpadding=2 width="70%">
<TR bgcolor="#dddddd"><TH>SMTP Commands</TH><TH>Milter Callbacks</TH></TR>
<TR><TD>(open SMTP connection)</TD><TD>xxfi_connect</TD></TR>
<TR><TD>HELO ...</TD><TD>xxfi_helo</TD></TR>
<TR><TD>MAIL From: ...</TD><TD>xxfi_envfrom</TD></TR>
<TR><TD>RCPT To: ...</TD><TD>xxfi_envrcpt</TD></TR>
<TR><TD>[more RCPTs]</TD><TD>[xxfi_envrcpt]</TD></TR>
<TR><TD>DATA</TD><TD>xxfi_data</TD></TR>
<TR><TD>Header: ...</TD><TD>xxfi_header</TD></TR>
<TR><TD>[more headers]</TD><TD>[xxfi_header]</TD></TR>
<TR><TD>&nbsp;</TD><TD>xxfi_eoh</TD></TR>
<TR><TD>body... </TD><TD>xxfi_body</TD></TR>
<TR><TD>[more body...]</TD><TD>[xxfi_body]</TD></TR>
<TR><TD>.</TD><TD>xxfi_eom</TD></TR>
<TR><TD>QUIT</TD><TD>xxfi_close</TD></TR>
<TR><TD>(close SMTP connection)</TD><TD>&nbsp;</TD></TR>
</TABLE>
<B>Figure 3: Milter callbacks related to an SMTP transaction.</B>
</DIV>
<P>
Note that although only a single message is shown above, multiple
messages may be sent in a single connection. Note also that a message
and/or connection may be aborted by either the remote host or the MTA
at any point during the SMTP transaction. If this occurs during a
message (between the MAIL command and the final "."), the filter's <a
href="xxfi_abort.html">xxfi_abort</a> routine will be called. <a
href="xxfi_close.html">xxfi_close</a> is called any time the
messages may be sent in a single connection.
Note also that a message or connection may be aborted by
either the remote host or the MTA
at any point during the SMTP transaction.
f this occurs during a message (between the MAIL command and the final "."),
the filter's
<A HREF="xxfi_abort.html">xxfi_abort</A> routine will be called.
<A HREF="xxfi_close.html">xxfi_close</A> is called any time the
connection closes.
<h2>Multithreading</h2>
<H2><A NAME="Multithreading">Multithreading</A></H2>
<p>
<P>
A single filter process may handle any number of connections
simultaneously. All filtering callbacks must therefore be reentrant,
simultaneously.
All filtering callbacks must therefore be reentrant,
and use some appropriate external synchronization methods to access
global data. Furthermore, since there is not a one-to-one
correspondence between threads and connections (N connections mapped
onto M threads, M &lt;= N), connection-specific data must be accessed
through the handles provided by the Milter library. The programmer
cannot rely on library-supplied thread-specific data blocks
(e.g. pthread_getspecific()) to store connection-specific data. See
the API documentation for <a
href="smfi_setpriv.html">smfi_setpriv</a> and <a
href="smfi_getpriv.html">smfi_getpriv</a> for details.
global data.
Furthermore, since there is not a one-to-one correspondence
between threads and connections
(N connections mapped onto M threads, M &lt;= N),
connection-specific data must be accessed
through the handles provided by the Milter library.
The programmer cannot rely on library-supplied thread-specific data blocks
(e.g., <CODE>pthread_getspecific(3)</CODE>) to store connection-specific data.
See the API documentation for
<A HREF="smfi_setpriv.html">smfi_setpriv</A> and
<A HREF="smfi_getpriv.html">smfi_getpriv</A> for details.
<h2>Resource management</h2>
<H2><A NAME="ResourceManagement">Resource Management</A></H2>
Since filters are likely to be long-lived, and to handle many
connections, proper deallocation of per-connection resources is
important. The lifetime of a connection is bracketed by calls to the
callbacks <a href="xxfi_connect.html">xxfi_connect</a> and <a
href="xxfi_close.html">xxfi_close</a>. Therefore connection-specific
resources (accessed via <a href="smfi_getpriv.html">smfi_getpriv</a>
and <a href="smfi_setpriv.html">smfi_setpriv</a>) may be allocated in
<a href="xxfi_connect.html">xxfi_connect</a>, and should be freed in
<a href="xxfi_close.html">xxfi_close</a>. For further information see
the <a href="api.html#conn-msg">discussion</a> of message- versus
connection-oriented routines. In particular, note that there is only
one connection-specific data pointer per connection.
<p>
Since filters are likely to be long-lived,
and to handle many connections,
proper deallocation of per-connection resources is important.
The lifetime of a connection is bracketed by calls to the
callbacks <A HREF="xxfi_connect.html">xxfi_connect</A> and
<A HREF="xxfi_close.html">xxfi_close</A>.
Therefore connection-specific
resources (accessed via <A HREF="smfi_getpriv.html">smfi_getpriv</A>
and <A HREF="smfi_setpriv.html">smfi_setpriv</A>) may be allocated in
<A HREF="xxfi_connect.html">xxfi_connect</A>,
and should be freed in
<A HREF="xxfi_close.html">xxfi_close</A>.
For further information see
the <A HREF="api.html#conn-msg">discussion</A> of message- versus
connection-oriented routines.
In particular,
note that there is only one connection-specific data pointer per connection.
<P>
Each message is bracketed by calls to <a
href="xxfi_envfrom.html">xxfi_envfrom</a> and <a
href="xxfi_eom.html">xxfi_eom</a> (or <a
href="xxfi_abort.html">xxfi_abort</a>), implying that message-specific
resources can be allocated and reclaimed in these routines. Since the
messages in a connection are processed sequentially by each filter,
Each message is bracketed by calls to
<A HREF="xxfi_envfrom.html">xxfi_envfrom</A> and
<A HREF="xxfi_eom.html">xxfi_eom</A> (or
<A HREF="xxfi_abort.html">xxfi_abort</A>),
implying that message-specific resources can be allocated
and reclaimed in these routines.
Since the messages in a connection are processed sequentially by each filter,
there will be only one active message associated with a given
connection and filter (and connection-private data block). These
resources must still be accessed through <a
href="smfi_getpriv.html">smfi_getpriv</a> and <a
href="smfi_setpriv.html">smfi_setpriv</a>, and must be reclaimed
in <a href="xxfi_abort.html">xxfi_abort</a>.
connection and filter (and connection-private data block).
These resources must still be accessed through
<A HREF="smfi_getpriv.html">smfi_getpriv</A> and
<A HREF="smfi_setpriv.html">smfi_setpriv</A>,
and must be reclaimed in
<A HREF="xxfi_abort.html">xxfi_abort</A>.
<h2>Signal Handling</h2>
<H2><A NAME="SignalHandling">Signal Handling</A></H2>
libmilter takes care of signal handling, the filters are
not influenced directly by signals.
libmilter takes care of signal handling,
the filters are not influenced directly by signals.
There are basically two types of signal handlers:
<ol>
<li><TT>Stop</TT>: no new connections from the MTA will be accepted,
<OL>
<LI><TT>Stop</TT>: no new connections from the MTA will be accepted,
but existing connections are allowed to continue.
<li><TT>Abort</TT>: all filters will be stopped as soon as the next
<LI><TT>Abort</TT>: all filters will be stopped as soon as the next
communication with the MTA happens.
</ol>
</OL>
Filters are not terminated asynchronously (except by
signals that can't be caught).
Filters are not terminated asynchronously
(except by signals that can't be caught).
In the case of <TT>Abort</TT> the
<a href="xxfi_abort.html">xxfi_abort</a> callback is invoked.
<A HREF="xxfi_abort.html">xxfi_abort</A> callback is invoked.
<hr size="1">
<font size="-1">
Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers.
<HR size="1">
<FONT size="-1">
Copyright (c) 2000, 2001, 2003, 2006 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</font>
</body>
</html>
</FONT>
</BODY>
</HTML>
+93 -60
View File
@@ -1,26 +1,26 @@
<html>
<head><title>A Sample Filter</title></head>
<body>
<HTML>
<HEAD><TITLE>A Sample Filter</TITLE></HEAD>
<BODY>
<!--
$Id: sample.html,v 1.18 2004/02/27 00:49:28 msk Exp $
$Id: sample.html,v 1.22 2006/10/09 23:14:51 ca Exp $
-->
<h1>A Sample Filter</h1>
<H1>A Sample Filter</H1>
The following sample logs each message to a separate temporary file,
adds a recipient given with the -a flag, and rejects a disallowed
recipient address given with the -r flag. It recognizes the following
options:
<p>
<center>
<table border="1" cellpadding=2 cellspacing=1>
<tr><td><code>-p port</code></td><td>The port through which the MTA will connect to the filter.</td></tr>
<tr><td><code>-t sec</code></td><td>The timeout value.</td></tr>
<tr><td><code>-r addr</code></td><td>A recipient to reject.</td></tr>
<tr><td><code>-a addr</code></td><td>A recipient to add.</td></tr>
</table>
</center>
<hr>
<pre>
adds a recipient given with the -a flag,
and rejects a disallowed recipient address given with the -r flag.
It recognizes the following options:
<P>
<CENTER>
<TABLE border="1" cellpadding=2 cellspacing=1>
<TR><TD><CODE>-p port</CODE></TD><TD>The port through which the MTA will connect to the filter.</TD></TR>
<TR><TD><CODE>-t sec</CODE></TD><TD>The timeout value.</TD></TR>
<TR><TD><CODE>-r addr</CODE></TD><TD>A recipient to reject.</TD></TR>
<TR><TD><CODE>-a addr</CODE></TD><TD>A recipient to add.</TD></TR>
</TABLE>
</CENTER>
<HR>
<PRE>
#include &lt;sys/types.h&gt;
#include &lt;sys/stat.h&gt;
#include &lt;errno.h&gt;
@@ -47,7 +47,7 @@ struct mlfiPriv
FILE *mlfi_fp;
};
#define MLFIPRIV ((struct mlfiPriv *) <a href="smfi_getpriv.html">smfi_getpriv</a>(ctx))
#define MLFIPRIV ((struct mlfiPriv *) <A href="smfi_getpriv.html">smfi_getpriv</A>(ctx))
extern sfsistat mlfi_cleanup(SMFICTX *, bool);
@@ -56,7 +56,7 @@ char *add = NULL;
char *reject = NULL;
sfsistat
<a href="xxfi_connect.html">mlfi_connect</a>(ctx, hostname, hostaddr)
<A href="xxfi_connect.html">mlfi_connect</A>(ctx, hostname, hostaddr)
SMFICTX *ctx;
char *hostname;
_SOCK_ADDR *hostaddr;
@@ -74,9 +74,9 @@ sfsistat
memset(priv, '\0', sizeof *priv);
/* save the private data */
<a href="smfi_setpriv.html">smfi_setpriv</a>(ctx, priv);
<A href="smfi_setpriv.html">smfi_setpriv</A>(ctx, priv);
ident = <a href="smfi_getsymval.html">smfi_getsymval</a>(ctx, "_");
ident = <A href="smfi_getsymval.html">smfi_getsymval</A>(ctx, "_");
if (ident == NULL)
ident = "???";
if ((priv-&gt;mlfi_connectfrom = strdup(ident)) == NULL)
@@ -90,7 +90,7 @@ sfsistat
}
sfsistat
<a href="xxfi_helo.html">mlfi_helo</a>(ctx, helohost)
<A href="xxfi_helo.html">mlfi_helo</A>(ctx, helohost)
SMFICTX *ctx;
char *helohost;
{
@@ -99,7 +99,7 @@ sfsistat
char *buf;
struct mlfiPriv *priv = MLFIPRIV;
tls = <a href="smfi_getsymval.html">smfi_getsymval</a>(ctx, "{tls_version}");
tls = <A href="smfi_getsymval.html">smfi_getsymval</A>(ctx, "{tls_version}");
if (tls == NULL)
tls = "No TLS";
if (helohost == NULL)
@@ -120,14 +120,14 @@ sfsistat
}
sfsistat
<a href="xxfi_envfrom.html">mlfi_envfrom</a>(ctx, argv)
<A href="xxfi_envfrom.html">mlfi_envfrom</A>(ctx, argv)
SMFICTX *ctx;
char **argv;
{
int fd = -1;
int argc = 0;
struct mlfiPriv *priv = MLFIPRIV;
char *mailaddr = <a href="smfi_getsymval.html">smfi_getsymval</a>(ctx, "{mail_addr}");
char *mailaddr = <A href="smfi_getsymval.html">smfi_getsymval</A>(ctx, "{mail_addr}");
/* open a file to store this message */
if ((priv-&gt;mlfi_fname = strdup("/tmp/msg.XXXXXX")) == NULL)
@@ -174,12 +174,12 @@ sfsistat
}
sfsistat
<a href="xxfi_envrcpt.html">mlfi_envrcpt</a>(ctx, argv)
<A href="xxfi_envrcpt.html">mlfi_envrcpt</A>(ctx, argv)
SMFICTX *ctx;
char **argv;
{
struct mlfiPriv *priv = MLFIPRIV;
char *rcptaddr = <a href="smfi_getsymval.html">smfi_getsymval</a>(ctx, "{rcpt_addr}");
char *rcptaddr = <A href="smfi_getsymval.html">smfi_getsymval</A>(ctx, "{rcpt_addr}");
int argc = 0;
/* count the arguments */
@@ -211,7 +211,7 @@ sfsistat
}
sfsistat
<a href="xxfi_header.html">mlfi_header</a>(ctx, headerf, headerv)
<A href="xxfi_header.html">mlfi_header</A>(ctx, headerf, headerv)
SMFICTX *ctx;
char *headerf;
unsigned char *headerv;
@@ -228,7 +228,7 @@ sfsistat
}
sfsistat
<a href="xxfi_eoh.html">mlfi_eoh</a>(ctx)
<A href="xxfi_eoh.html">mlfi_eoh</A>(ctx)
SMFICTX *ctx;
{
/* output the blank line between the header and the body */
@@ -243,7 +243,7 @@ sfsistat
}
sfsistat
<a href="xxfi_body.html">mlfi_body</a>(ctx, bodyp, bodylen)
<A href="xxfi_body.html">mlfi_body</A>(ctx, bodyp, bodylen)
SMFICTX *ctx;
unsigned char *bodyp;
size_t bodylen;
@@ -265,19 +265,19 @@ sfsistat
}
sfsistat
<a href="xxfi_eom.html">mlfi_eom</a>(ctx)
<A href="xxfi_eom.html">mlfi_eom</A>(ctx)
SMFICTX *ctx;
{
bool ok = TRUE;
/* change recipients, if requested */
if (add != NULL)
ok = (<a href="smfi_addrcpt.html">smfi_addrcpt</a>(ctx, add) == MI_SUCCESS);
ok = (<A href="smfi_addrcpt.html">smfi_addrcpt</A>(ctx, add) == MI_SUCCESS);
return mlfi_cleanup(ctx, ok);
}
sfsistat
<a href="xxfi_abort.html">mlfi_abort</a>(ctx)
<A href="xxfi_abort.html">mlfi_abort</A>(ctx)
SMFICTX *ctx;
{
return mlfi_cleanup(ctx, FALSE);
@@ -317,7 +317,7 @@ mlfi_cleanup(ctx, ok)
else
p++;
snprintf(hbuf, sizeof hbuf, "%s@%s", p, host);
if (<a href="smfi_addheader.html">smfi_addheader</a>(ctx, "X-Archived", hbuf) != MI_SUCCESS)
if (<A href="smfi_addheader.html">smfi_addheader</A>(ctx, "X-Archived", hbuf) != MI_SUCCESS)
{
/* failed; we have to wait until later */
fprintf(stderr,
@@ -346,7 +346,7 @@ mlfi_cleanup(ctx, ok)
}
sfsistat
<a href="xxfi_close.html">mlfi_close</a>(ctx)
<A href="xxfi_close.html">mlfi_close</A>(ctx)
SMFICTX *ctx;
{
struct mlfiPriv *priv = MLFIPRIV;
@@ -358,26 +358,59 @@ sfsistat
if (priv-&gt;mlfi_helofrom != NULL)
free(priv-&gt;mlfi_helofrom);
free(priv);
<a href="smfi_setpriv.html">smfi_setpriv</a>(ctx, NULL);
<A href="smfi_setpriv.html">smfi_setpriv</A>(ctx, NULL);
return SMFIS_CONTINUE;
}
sfsistat
<A href="xxfi_unknown.html">mlfi_unknown</A>(ctx, cmd)
SMFICTX *ctx;
char *cmd;
{
return SMFIS_CONTINUE;
}
sfsistat
<A href="xxfi_data.html">mlfi_data</A>(ctx)
SMFICTX *ctx;
{
return SMFIS_CONTINUE;
}
sfsistat
<A href="xxfi_negotiate.html">mlfi_negotiate</A>(ctx, f0, f1, f2, f3, pf0, pf1, pf2, pf3)
SMFICTX *ctx;
unsigned long f0;
unsigned long f1;
unsigned long f2;
unsigned long f3;
unsigned long *pf0;
unsigned long *pf1;
unsigned long *pf2;
unsigned long *pf3;
{
return SMFIS_ALL_OPTS;
}
struct smfiDesc smfilter =
{
"SampleFilter", /* filter name */
SMFI_VERSION, /* version code -- do not change */
SMFIF_ADDHDRS|SMFIF_ADDRCPT,
/* flags */
<a href="xxfi_connect.html">mlfi_connect</a>, /* connection info filter */
<a href="xxfi_helo.html">mlfi_helo</a>, /* SMTP HELO command filter */
<a href="xxfi_envfrom.html">mlfi_envfrom</a>, /* envelope sender filter */
<a href="xxfi_envrcpt.html">mlfi_envrcpt</a>, /* envelope recipient filter */
<a href="xxfi_header.html">mlfi_header</a>, /* header filter */
<a href="xxfi_eoh.html">mlfi_eoh</a>, /* end of header */
<a href="xxfi_body.html">mlfi_body</a>, /* body block filter */
<a href="xxfi_eom.html">mlfi_eom</a>, /* end of message */
<a href="xxfi_abort.html">mlfi_abort</a>, /* message aborted */
<a href="xxfi_close.html">mlfi_close</a>, /* connection cleanup */
<A href="xxfi_connect.html">mlfi_connect</A>, /* connection info filter */
<A href="xxfi_helo.html">mlfi_helo</A>, /* SMTP HELO command filter */
<A href="xxfi_envfrom.html">mlfi_envfrom</A>, /* envelope sender filter */
<A href="xxfi_envrcpt.html">mlfi_envrcpt</A>, /* envelope recipient filter */
<A href="xxfi_header.html">mlfi_header</A>, /* header filter */
<A href="xxfi_eoh.html">mlfi_eoh</A>, /* end of header */
<A href="xxfi_body.html">mlfi_body</A>, /* body block filter */
<A href="xxfi_eom.html">mlfi_eom</A>, /* end of message */
<A href="xxfi_abort.html">mlfi_abort</A>, /* message aborted */
<A href="xxfi_close.html">mlfi_close</A>, /* connection cleanup */
<A href="xxfi_unknown.html">mlfi_unknown</A>, /* unknown SMTP commands */
<A href="xxfi_data.html">mlfi_data</A>, /* DATA command */
<A href="xxfi_negotiate.html">mlfi_negotiate</A> /* Once, at the start of each SMTP connection */
};
static void
@@ -411,7 +444,7 @@ main(argc, argv)
optarg);
exit(EX_USAGE);
}
if (<a href="smfi_setconn.html">smfi_setconn</a>(optarg) == MI_FAILURE)
if (<A href="smfi_setconn.html">smfi_setconn</A>(optarg) == MI_FAILURE)
{
(void) fprintf(stderr,
"smfi_setconn failed\n");
@@ -438,7 +471,7 @@ main(argc, argv)
optarg);
exit(EX_USAGE);
}
if (<a href="smfi_settimeout.html">smfi_settimeout</a>(atoi(optarg)) == MI_FAILURE)
if (<A href="smfi_settimeout.html">smfi_settimeout</A>(atoi(optarg)) == MI_FAILURE)
{
(void) fprintf(stderr,
"smfi_settimeout failed\n");
@@ -481,24 +514,24 @@ main(argc, argv)
usage(argv[0]);
exit(EX_USAGE);
}
if (<a href="smfi_register.html">smfi_register</a>(smfilter) == MI_FAILURE)
if (<A href="smfi_register.html">smfi_register</A>(smfilter) == MI_FAILURE)
{
fprintf(stderr, "smfi_register failed\n");
exit(EX_UNAVAILABLE);
}
return <a href="smfi_main.html">smfi_main</a>();
return <A href="smfi_main.html">smfi_main</A>();
}
/* eof */
</pre>
<hr size="1">
<font size="-1">
Copyright (c) 2000-2004 Sendmail, Inc. and its suppliers.
</PRE>
<HR size="1">
<FONT size="-1">
Copyright (c) 2000-2004, 2006 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</font>
</body>
</html>
</FONT>
</BODY>
</HTML>
Loaded 100 of 733 files, more files were not shown because too many files have changed in this diff. Show more