summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authoratatat <atatat@NetBSD.org>2004-03-25 18:57:22 +0000
committeratatat <atatat@NetBSD.org>2004-03-25 18:57:22 +0000
commit8d2f43c39d67e8a64dfe068bb102054665f41cbb (patch)
treeace58bd013ba84dd647d9e6c40a28722ed005e25 /gnu
parent27b002601fb418612f49bfe8ee6330de97981985 (diff)
sendmail 8.12.11
Diffstat (limited to 'gnu')
-rw-r--r--gnu/dist/sendmail/cf/cf/generic-mpeix.cf18
-rw-r--r--gnu/dist/sendmail/cf/cf/generic-solaris.cf18
-rw-r--r--gnu/dist/sendmail/cf/cf/submit.cf18
-rw-r--r--gnu/dist/sendmail/cf/cf/submit.mc6
-rw-r--r--gnu/dist/sendmail/contrib/domainmap.m42
-rw-r--r--gnu/dist/sendmail/contrib/doublebounce.pl4
-rw-r--r--gnu/dist/sendmail/devtools/OS/AIX.5.221
-rw-r--r--gnu/dist/sendmail/devtools/OS/Darwin.7.023
-rw-r--r--gnu/dist/sendmail/editmap/editmap.0134
-rw-r--r--gnu/dist/sendmail/include/sm/errstring.h14
-rw-r--r--gnu/dist/sendmail/include/sm/io.h17
-rw-r--r--gnu/dist/sendmail/include/sm/os/sm_os_aix.h10
-rw-r--r--gnu/dist/sendmail/include/sm/shm.h7
-rw-r--r--gnu/dist/sendmail/libmilter/docs/sample.html10
-rw-r--r--gnu/dist/sendmail/libmilter/docs/smfi_addrcpt.html2
-rw-r--r--gnu/dist/sendmail/libmilter/docs/smfi_chgheader.html2
-rw-r--r--gnu/dist/sendmail/libmilter/docs/smfi_delrcpt.html2
-rw-r--r--gnu/dist/sendmail/libmilter/docs/smfi_register.html6
-rw-r--r--gnu/dist/sendmail/libmilter/docs/smfi_setconn.html6
-rw-r--r--gnu/dist/sendmail/libmilter/docs/smfi_setreply.html24
-rw-r--r--gnu/dist/sendmail/libmilter/docs/xxfi_connect.html24
-rw-r--r--gnu/dist/sendmail/libmilter/docs/xxfi_envrcpt.html4
-rw-r--r--gnu/dist/sendmail/libsm/assert.c10
-rw-r--r--gnu/dist/sendmail/libsm/clock.c120
-rw-r--r--gnu/dist/sendmail/libsm/errstring.c14
-rw-r--r--gnu/dist/sendmail/libsm/exc.c10
-rw-r--r--gnu/dist/sendmail/libsm/flags.c12
-rw-r--r--gnu/dist/sendmail/libsm/ldap.c16
-rw-r--r--gnu/dist/sendmail/libsm/local.h7
-rw-r--r--gnu/dist/sendmail/libsm/shm.c13
-rw-r--r--gnu/dist/sendmail/libsm/smstdio.c23
-rw-r--r--gnu/dist/sendmail/libsm/stdio.c20
-rw-r--r--gnu/dist/sendmail/libsm/vasprintf.c37
-rw-r--r--gnu/dist/sendmail/mailstats/mailstats.0117
-rw-r--r--gnu/dist/sendmail/makemap/makemap.0130
-rw-r--r--gnu/dist/sendmail/praliases/praliases.055
-rw-r--r--gnu/dist/sendmail/sendmail/bf.c8
-rw-r--r--gnu/dist/sendmail/sendmail/tls.c40
-rw-r--r--gnu/dist/sendmail/smrsh/smrsh.089
39 files changed, 563 insertions, 530 deletions
diff --git a/gnu/dist/sendmail/cf/cf/generic-mpeix.cf b/gnu/dist/sendmail/cf/cf/generic-mpeix.cf
index 109effe4528..746ecf16a9b 100644
--- a/gnu/dist/sendmail/cf/cf/generic-mpeix.cf
+++ b/gnu/dist/sendmail/cf/cf/generic-mpeix.cf
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -16,8 +16,8 @@
#####
##### SENDMAIL CONFIGURATION FILE
#####
-##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:51 PST 2003
-##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf
+##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:45 PST 2004
+##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf
##### using ../ as configuration include directory
#####
######################################################################
@@ -27,7 +27,7 @@
######################################################################
######################################################################
-##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp #####
+##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp #####
##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp #####
##### Id: generic-mpeix.mc,v 8.1 2001/12/13 23:56:37 gshapiro Exp #####
@@ -42,7 +42,7 @@
-##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp #####
+##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp #####
# level 10 config file format
V10/Berkeley
@@ -72,6 +72,7 @@ Fw/etc/mail/local-host-names
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
+# host/domain names ending with a token in class P are canonical
CP.
# "Smart" relay host (may be null)
@@ -122,7 +123,7 @@ DnMAILER-DAEMON
CPREDIRECT
# Configuration version number
-DZ8.12.9
+DZ8.12.11
###############
@@ -840,7 +841,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 >
SMailerToTriple=95
R< > $* $@ $1 strip off null relay
R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
-R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< error : $+ > $* $#error $: $1
R< local : $* > $* $>CanonLocal < $1 > $2
R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
@@ -1149,7 +1151,7 @@ R$* $: $&{auth_type} $| $1
R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated"
R$* $| $&{auth_authen} $@ identical
R$* $| <$&{auth_authen}> $@ identical
-R$* $| $* $: $1 $| $>"Local_trust_auth" $1
+R$* $| $* $: $1 $| $>"Local_trust_auth" $2
R$* $| $#$* $#$2
R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author}
diff --git a/gnu/dist/sendmail/cf/cf/generic-solaris.cf b/gnu/dist/sendmail/cf/cf/generic-solaris.cf
index 72d9815f489..d2ecba9c7c6 100644
--- a/gnu/dist/sendmail/cf/cf/generic-solaris.cf
+++ b/gnu/dist/sendmail/cf/cf/generic-solaris.cf
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -16,8 +16,8 @@
#####
##### SENDMAIL CONFIGURATION FILE
#####
-##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:51 PST 2003
-##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf
+##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:46 PST 2004
+##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf
##### using ../ as configuration include directory
#####
######################################################################
@@ -27,7 +27,7 @@
######################################################################
######################################################################
-##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp #####
+##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp #####
##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp #####
##### Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro Exp #####
@@ -41,7 +41,7 @@
-##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp #####
+##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp #####
# level 10 config file format
V10/Berkeley
@@ -71,6 +71,7 @@ Fw/etc/mail/local-host-names
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
+# host/domain names ending with a token in class P are canonical
CP.
# "Smart" relay host (may be null)
@@ -121,7 +122,7 @@ DnMAILER-DAEMON
CPREDIRECT
# Configuration version number
-DZ8.12.9
+DZ8.12.11
###############
@@ -839,7 +840,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 >
SMailerToTriple=95
R< > $* $@ $1 strip off null relay
R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
-R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< error : $+ > $* $#error $: $1
R< local : $* > $* $>CanonLocal < $1 > $2
R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
@@ -1148,7 +1150,7 @@ R$* $: $&{auth_type} $| $1
R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated"
R$* $| $&{auth_authen} $@ identical
R$* $| <$&{auth_authen}> $@ identical
-R$* $| $* $: $1 $| $>"Local_trust_auth" $1
+R$* $| $* $: $1 $| $>"Local_trust_auth" $2
R$* $| $#$* $#$2
R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author}
diff --git a/gnu/dist/sendmail/cf/cf/submit.cf b/gnu/dist/sendmail/cf/cf/submit.cf
index c5ec8f55954..359c7c67ab5 100644
--- a/gnu/dist/sendmail/cf/cf/submit.cf
+++ b/gnu/dist/sendmail/cf/cf/submit.cf
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -24,15 +24,15 @@
######################################################################
######################################################################
-##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp #####
+##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp #####
##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp #####
-##### Id: submit.mc,v 8.6.2.4 2002/12/29 03:54:34 ca Exp #####
+##### Id: submit.mc,v 8.6.2.7 2003/09/10 22:11:56 ca Exp #####
##### Id: msp.m4,v 1.32 2002/03/26 22:02:03 ca Exp #####
##### Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp #####
-##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp #####
+##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp #####
# level 10 config file format
V10/Berkeley
@@ -60,6 +60,7 @@ Cwlocalhost
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
+# host/domain names ending with a token in class P are canonical
CP.
# "Smart" relay host (may be null)
@@ -110,7 +111,7 @@ D{MTAHost}[127.0.0.1]
# Configuration version number
-DZ8.12.9/Submit
+DZ8.12.11/Submit
###############
@@ -276,7 +277,7 @@ O QueueDirectory=/var/spool/clientmqueue
#O Timeout.quit=2m
#O Timeout.misc=2m
#O Timeout.command=1h
-#O Timeout.ident=5s
+O Timeout.ident=0
#O Timeout.fileopen=60s
#O Timeout.control=2m
O Timeout.queuereturn=5d
@@ -834,7 +835,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 >
SMailerToTriple=95
R< > $* $@ $1 strip off null relay
R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
-R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< error : $+ > $* $#error $: $1
R< local : $* > $* $>CanonLocal < $1 > $2
R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
@@ -1137,7 +1139,7 @@ R$* $: $&{auth_type} $| $1
R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated"
R$* $| $&{auth_authen} $@ identical
R$* $| <$&{auth_authen}> $@ identical
-R$* $| $* $: $1 $| $>"Local_trust_auth" $1
+R$* $| $* $: $1 $| $>"Local_trust_auth" $2
R$* $| $#$* $#$2
R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author}
diff --git a/gnu/dist/sendmail/cf/cf/submit.mc b/gnu/dist/sendmail/cf/cf/submit.mc
index f1c5298a4c2..aa4a1fd0076 100644
--- a/gnu/dist/sendmail/cf/cf/submit.mc
+++ b/gnu/dist/sendmail/cf/cf/submit.mc
@@ -1,6 +1,6 @@
divert(-1)
#
-# Copyright (c) 2001, 2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@@ -15,8 +15,8 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`Id: submit.mc,v 8.6.2.4 2002/12/29 03:54:34 ca Exp')
-VERSIONID(`$NetBSD: submit.mc,v 1.1.1.2 2003/06/01 14:01:43 atatat Exp $')
+VERSIONID(`Id: submit.mc,v 8.6.2.7 2003/09/10 22:11:56 ca Exp')
+VERSIONID(`$NetBSD: submit.mc,v 1.1.1.3 2004/03/25 19:03:10 atatat 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
diff --git a/gnu/dist/sendmail/contrib/domainmap.m4 b/gnu/dist/sendmail/contrib/domainmap.m4
index 540beff43ef..6d56e8406e3 100644
--- a/gnu/dist/sendmail/contrib/domainmap.m4
+++ b/gnu/dist/sendmail/contrib/domainmap.m4
@@ -46,7 +46,7 @@ divert(-1)changequote(<<, >>)<<
in the sendmail source tree. For more information, please see the
following URL:
- http://www-dev.cso.uiuc.edu/sendmail/domainmap/
+ http://www-dev.cites.uiuc.edu/sendmail/domainmap/
Feedback is welcome.
diff --git a/gnu/dist/sendmail/contrib/doublebounce.pl b/gnu/dist/sendmail/contrib/doublebounce.pl
index 12601d33479..dc26ab84f1a 100644
--- a/gnu/dist/sendmail/contrib/doublebounce.pl
+++ b/gnu/dist/sendmail/contrib/doublebounce.pl
@@ -36,7 +36,7 @@
use Socket;
use Getopt::Std;
-use POSIX;
+use File::Temp;
use Sys::Syslog qw(:DEFAULT setlogsock);
use strict;
use vars qw( $opt_d $tmpfile);
@@ -125,7 +125,7 @@ sub main {
# The bounced e-mail may be large, so we'd better not try to buffer
# it in memory, get a temporary file.
- $tmpfile = POSIX::tmpnam();
+ $tmpfile = tmpnam();
if (!open(MSG, ">$tmpfile")) {
syslog('err', "Unable to open temporary file $tmpfile");
diff --git a/gnu/dist/sendmail/devtools/OS/AIX.5.2 b/gnu/dist/sendmail/devtools/OS/AIX.5.2
new file mode 100644
index 00000000000..acd48ad46f1
--- /dev/null
+++ b/gnu/dist/sendmail/devtools/OS/AIX.5.2
@@ -0,0 +1,21 @@
+# Id: AIX.5.2,v 1.1.2.1 2003/04/28 22:29:01 ca Exp
+# $NetBSD: AIX.5.2,v 1.1.1.1 2004/03/25 18:57:22 atatat Exp $
+
+dnl DO NOT EDIT THIS FILE.
+dnl Place personal settings in devtools/Site/site.config.m4
+
+define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
+define(`confENVDEF', `-D_AIX5=50200')
+define(`confOPTIMIZE', `-O3 -qstrict')
+define(`confCC', `/usr/vac/bin/xlc')
+define(`confLIBS', `-ldbm')
+define(`confINSTALL', `/usr/ucb/install')
+define(`confEBINDIR', `/usr/lib')
+define(`confSBINGRP', `system')
+define(`confDEPEND_TYPE', `AIX')
+define(`confLDOPTS', `-blibpath:/usr/lib:/lib')
+define(`confSM_OS_HEADER', `sm_os_aix')
+
+define(`confMTCCOPTS', `-D_THREAD_SAFE')
+define(`confMTLDOPTS', `-lpthread')
+define(`confLDOPTS_SO', `-Wl,-G -Wl,-bexpall')
diff --git a/gnu/dist/sendmail/devtools/OS/Darwin.7.0 b/gnu/dist/sendmail/devtools/OS/Darwin.7.0
new file mode 100644
index 00000000000..449ebe7cf55
--- /dev/null
+++ b/gnu/dist/sendmail/devtools/OS/Darwin.7.0
@@ -0,0 +1,23 @@
+# Id: Darwin.7.0,v 1.1.2.1 2003/12/01 17:04:24 ca Exp
+# $NetBSD: Darwin.7.0,v 1.1.1.1 2004/03/25 18:57:24 atatat Exp $
+
+dnl DO NOT EDIT THIS FILE.
+dnl Place personal settings in devtools/Site/site.config.m4
+
+#
+define(`confCC', `cc -pipe ${Extra_CC_Flags}')
+define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX')
+define(`confENVDEF', `-DDARWIN -DBIND_8_COMPAT')
+define(`confLDOPTS', `${Extra_LD_Flags}')
+define(`confMILTER_STATIC', `')
+define(`confDEPEND_TYPE', `CC-M')
+define(`confOPTIMIZE', `-O3')
+define(`confRANLIBOPTS', `-c')
+define(`confHFDIR', `/usr/share/sendmail')
+define(`confINSTALL_RAWMAN')
+define(`confMANOWN', `root')
+define(`confMANGRP', `wheel')
+define(`confUBINOWN', `root')
+define(`confUBINGRP', `wheel')
+define(`confSBINOWN', `root')
+define(`confSBINGRP', `wheel')
diff --git a/gnu/dist/sendmail/editmap/editmap.0 b/gnu/dist/sendmail/editmap/editmap.0
index 6280f26a878..4d87e4d307d 100644
--- a/gnu/dist/sendmail/editmap/editmap.0
+++ b/gnu/dist/sendmail/editmap/editmap.0
@@ -1,76 +1,54 @@
+EDITMAP(8) EDITMAP(8)
-EDITMAP(8) EDITMAP(8)
-
-
NNAAMMEE
- eeddiittmmaapp - query and edit single records in database maps
- for sendmail
+ eeddiittmmaapp - query and edit single records in database maps for sendmail
SSYYNNOOPPSSIISS
- eeddiittmmaapp [--CC _f_i_l_e] [--NN] [--ff] [--qq||--uu||--xx] maptype mapname key
- [ "value ..." ]
+ eeddiittmmaapp [--CC _f_i_l_e] [--NN] [--ff] [--qq||--uu||--xx] maptype mapname key [ "value
+ ..." ]
DDEESSCCRRIIPPTTIIOONN
- EEddiittmmaapp queries or edits one record in database maps used
- by the keyed map lookups in sendmail(8). Arguments are
- passed on the command line and output (for queries) is
- directed to standard output.
+ EEddiittmmaapp queries or edits one record in database maps used by the keyed
+ map lookups in sendmail(8). Arguments are passed on the command line
+ and output (for queries) is directed to standard output.
- Depending on how it is compiled, eeddiittmmaapp handles up to
- three different database formats, selected using the _m_a_p_-
- _t_y_p_e parameter. They may be
+ Depending on how it is compiled, eeddiittmmaapp handles up to three different
+ database formats, selected using the _m_a_p_t_y_p_e parameter. They may be
- dbm DBM format maps. This requires the ndbm(3)
- library.
+ dbm DBM format maps. This requires the ndbm(3) library.
- btree B-Tree format maps. This requires the new Berkeley
- DB library.
+ btree B-Tree format maps. This requires the new Berkeley DB library.
- hash Hash format maps. This also requires the Berkeley
- DB library.
+ hash Hash format maps. This also requires the Berkeley DB library.
- If the _T_r_u_s_t_e_d_U_s_e_r option is set in the sendmail configu-
- ration file and eeddiittmmaapp is invoked as root, the generated
- files will be owned by the specified _T_r_u_s_t_e_d_U_s_e_r_.
+ If the _T_r_u_s_t_e_d_U_s_e_r option is set in the sendmail configuration file and
+ eeddiittmmaapp is invoked as root, the generated files will be owned by the
+ specified _T_r_u_s_t_e_d_U_s_e_r_.
FFllaaggss
- --CC Use the specified sseennddmmaaiill configuration file for
- looking up the TrustedUser option.
-
- --NN Include the null byte that terminates strings in
- the map (for alias maps).
-
- --ff Normally all upper case letters in the key are
- folded to lower case. This flag disables that
- behaviour. This is intended to mesh with the -f
- flag in the KK line in sendmail.cf. The value is
- never case folded.
-
- --qq Query the map for the specified key. If found,
- print value to standard output and exit with 0. If
- not found then print an error message to stdout and
- exit with EX_UNAVAILABLE.
-
- --uu Update the record for _k_e_y with _v_a_l_u_e or inserts a
- new record if one doesn't exist. Exits with 0 on
- success or EX_IOERR on failure.
-
- --xx Deletes the specific key from the map. Exits with
-
+ --CC Use the specified sseennddmmaaiill configuration file for looking up the
+ TrustedUser option.
+ --NN Include the null byte that terminates strings in the map (for
+ alias maps).
- Date: 2003/03/15 23:38:57 1
+ --ff Normally all upper case letters in the key are folded to lower
+ case. This flag disables that behaviour. This is intended to
+ mesh with the -f flag in the KK line in sendmail.cf. The value
+ is never case folded.
+ --qq Query the map for the specified key. If found, print value to
+ standard output and exit with 0. If not found then print an
+ error message to stdout and exit with EX_UNAVAILABLE.
+ --uu Update the record for _k_e_y with _v_a_l_u_e or inserts a new record if
+ one doesn't exist. Exits with 0 on success or EX_IOERR on fail-
+ ure.
-
-
-EDITMAP(8) EDITMAP(8)
-
-
- 0 on success or EX_IOERR on failure.
+ --xx Deletes the specific key from the map. Exits with 0 on success
+ or EX_IOERR on failure.
SSEEEE AALLSSOO
@@ -81,52 +59,4 @@ HHIISSTTOORRYY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Date: 2003/03/15 23:38:57 2
-
-
+ Date: 2003/03/15 23:38:57 EDITMAP(8)
diff --git a/gnu/dist/sendmail/include/sm/errstring.h b/gnu/dist/sendmail/include/sm/errstring.h
index 5cead554728..4a77dcea0b1 100644
--- a/gnu/dist/sendmail/include/sm/errstring.h
+++ b/gnu/dist/sendmail/include/sm/errstring.h
@@ -1,14 +1,13 @@
-/* $NetBSD: errstring.h,v 1.1.1.2 2003/06/01 14:01:33 atatat Exp $ */
+/* $NetBSD: errstring.h,v 1.1.1.3 2004/03/25 19:01:45 atatat Exp $ */
/*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001, 2003 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: errstring.h,v 1.4 2001/06/07 20:04:53 ca Exp
+ * Id: errstring.h,v 1.4.4.3 2003/06/24 17:16:10 ca Exp
*/
/*
@@ -47,6 +46,7 @@ extern int errno;
#define E_SMDBBASE (E_PSEUDOBASE + 40) /* base for libsmdb errors */
#define E_LDAPBASE (E_PSEUDOBASE + 70) /* base for LDAP errors */
+
/* libsmdb */
#define SMDBE_OK 0
#define SMDBE_MALLOC (E_SMDBBASE + 1)
@@ -72,9 +72,9 @@ extern int errno;
#define SMDBE_NOT_A_VALID_CURSOR (E_SMDBBASE + 21)
#define SMDBE_LAST_ENTRY (E_SMDBBASE + 22)
#define SMDBE_OLD_VERSION (E_SMDBBASE + 23)
+#define SMDBE_VERSION_MISMATCH (E_SMDBBASE + 24)
+
+extern const char *sm_errstring __P((int _errno));
-extern const char *
-sm_errstring __P((
- int _errno));
#endif /* SM_ERRSTRING_H */
diff --git a/gnu/dist/sendmail/include/sm/io.h b/gnu/dist/sendmail/include/sm/io.h
index b24d809e8cc..48633de2b89 100644
--- a/gnu/dist/sendmail/include/sm/io.h
+++ b/gnu/dist/sendmail/include/sm/io.h
@@ -1,6 +1,6 @@
-/* $NetBSD: io.h,v 1.1.1.2 2003/06/01 14:01:33 atatat Exp $ */
+/* $NetBSD: io.h,v 1.1.1.3 2004/03/25 19:01:57 atatat Exp $ */
/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990
* The Regents of the University of California. All rights reserved.
@@ -12,7 +12,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * Id: io.h,v 1.23 2002/02/23 19:32:17 gshapiro Exp
+ * Id: io.h,v 1.23.2.2 2003/09/05 20:35:28 ca Exp
*/
/*-
@@ -34,6 +34,17 @@
#define SM_IO_APPENDRW 5 /* read-write from eof */
#define SM_IO_RDWRTR 6 /* read-write with truncation indicated */
+# define SM_IO_BINARY 0x0 /* binary mode: not used in Unix */
+#define SM_IS_BINARY(mode) ((mode) & SM_IO_BINARY != 0)
+#define SM_IO_MODE(mode) ((mode) & 0x0f)
+
+#define SM_IO_RDWR_B (SM_IO_RDWR|SM_IO_BINARY)
+#define SM_IO_RDONLY_B (SM_IO_RDONLY|SM_IO_BINARY)
+#define SM_IO_WRONLY_B (SM_IO_WRONLY|SM_IO_BINARY)
+#define SM_IO_APPEND_B (SM_IO_APPEND|SM_IO_BINARY)
+#define SM_IO_APPENDRW_B (SM_IO_APPENDRW|SM_IO_BINARY)
+#define SM_IO_RDWRTR_B (SM_IO_RDWRTR|SM_IO_BINARY)
+
/* for sm_io_fseek, et al api's (exposed) */
#define SM_IO_SEEK_SET 0
#define SM_IO_SEEK_CUR 1
diff --git a/gnu/dist/sendmail/include/sm/os/sm_os_aix.h b/gnu/dist/sendmail/include/sm/os/sm_os_aix.h
index 7af784645d3..435015ef4a2 100644
--- a/gnu/dist/sendmail/include/sm/os/sm_os_aix.h
+++ b/gnu/dist/sendmail/include/sm/os/sm_os_aix.h
@@ -1,13 +1,13 @@
-/* $NetBSD: sm_os_aix.h,v 1.1.1.2 2003/06/01 14:01:33 atatat Exp $ */
+/* $NetBSD: sm_os_aix.h,v 1.1.1.3 2004/03/25 19:01:58 atatat Exp $ */
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 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_aix.h,v 1.9 2001/10/09 23:12:13 ca Exp
+ * Id: sm_os_aix.h,v 1.9.2.1 2003/04/28 23:11:07 ca Exp
*/
/*
@@ -34,3 +34,7 @@
# endif /* SM_CONF_SYSLOG */
# endif /* ! _AIX4 */
#endif /* _AIX3 */
+
+#if _AIX5 >= 50200
+# define SM_CONF_LONGLONG 1
+#endif /* _AIX5 >= 50200 */
diff --git a/gnu/dist/sendmail/include/sm/shm.h b/gnu/dist/sendmail/include/sm/shm.h
index ece3afaffcd..b1a04c37b9a 100644
--- a/gnu/dist/sendmail/include/sm/shm.h
+++ b/gnu/dist/sendmail/include/sm/shm.h
@@ -1,13 +1,13 @@
-/* $NetBSD: shm.h,v 1.1.1.2 2003/06/01 14:01:33 atatat Exp $ */
+/* $NetBSD: shm.h,v 1.1.1.3 2004/03/25 19:01:57 atatat Exp $ */
/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2003 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.8 2002/04/10 23:11:35 ca Exp
+ * Id: shm.h,v 1.8.2.2 2003/05/17 18:34:16 ca Exp
*/
#ifndef SM_SHM_H
@@ -30,6 +30,7 @@
extern void *sm_shmstart __P((key_t, int , int , int *, bool));
extern int sm_shmstop __P((void *, int, bool));
+
/* for those braindead systems... (e.g., SunOS 4) */
# ifndef SHM_R
# define SHM_R 0400
diff --git a/gnu/dist/sendmail/libmilter/docs/sample.html b/gnu/dist/sendmail/libmilter/docs/sample.html
index 7f669b793de..2cc1948dd38 100644
--- a/gnu/dist/sendmail/libmilter/docs/sample.html
+++ b/gnu/dist/sendmail/libmilter/docs/sample.html
@@ -379,7 +379,7 @@ usage(prog)
char *prog;
{
fprintf(stderr,
- "Usage: %s [-p socket-addr] [-t timeout] [-r reject-addr] [-a add-addr]\n",
+ "Usage: %s -p socket-addr [-t timeout] [-r reject-addr] [-a add-addr]\n",
prog);
}
@@ -388,6 +388,7 @@ main(argc, argv)
int argc;
char **argv;
{
+ bool setconn = FALSE;
int c;
const char *args = "p:t:r:a:h";
extern char *optarg;
@@ -421,6 +422,7 @@ main(argc, argv)
unlink(optarg + 5);
else if (strncasecmp(optarg, "local:", 6) == 0)
unlink(optarg + 6);
+ setconn = TRUE;
break;
case 't':
@@ -467,6 +469,12 @@ main(argc, argv)
exit(EX_USAGE);
}
}
+ if (!setconn)
+ {
+ fprintf(stderr, "%s: Missing required -p argument\n", argv[0]);
+ usage(argv[0]);
+ exit(EX_USAGE);
+ }
if (<a href="smfi_register.html">smfi_register</a>(smfilter) == MI_FAILURE)
{
fprintf(stderr, "smfi_register failed\n");
diff --git a/gnu/dist/sendmail/libmilter/docs/smfi_addrcpt.html b/gnu/dist/sendmail/libmilter/docs/smfi_addrcpt.html
index 3b2eb56ccba..16f86c94977 100644
--- a/gnu/dist/sendmail/libmilter/docs/smfi_addrcpt.html
+++ b/gnu/dist/sendmail/libmilter/docs/smfi_addrcpt.html
@@ -48,7 +48,7 @@ Add a recipient for the current message.
<td>smfi_addrcpt will fail and return MI_FAILURE if:
<ul><li>rcpt is NULL.
- <li>Adding headers in the current connection state is invalid.
+ <li>Adding recipients in the current connection state is invalid.
<li>A network error occurs.
<li>SMFIF_ADDRCPT was not set when <a href="smfi_register.html">smfi_register</a> was called.
</ul>
diff --git a/gnu/dist/sendmail/libmilter/docs/smfi_chgheader.html b/gnu/dist/sendmail/libmilter/docs/smfi_chgheader.html
index fc7ba97bd42..53ad73ce3cd 100644
--- a/gnu/dist/sendmail/libmilter/docs/smfi_chgheader.html
+++ b/gnu/dist/sendmail/libmilter/docs/smfi_chgheader.html
@@ -97,7 +97,7 @@ Otherwise, it returns MI_SUCCESS.
...
- ret = smfi_chgheader(ctx, "Content-Type",
+ ret = smfi_chgheader(ctx, "Content-Type", 1,
"multipart/mixed;\n\tboundary=\"foobar\"");
</pre>
</td>
diff --git a/gnu/dist/sendmail/libmilter/docs/smfi_delrcpt.html b/gnu/dist/sendmail/libmilter/docs/smfi_delrcpt.html
index 451f36a6a94..9608e61eaef 100644
--- a/gnu/dist/sendmail/libmilter/docs/smfi_delrcpt.html
+++ b/gnu/dist/sendmail/libmilter/docs/smfi_delrcpt.html
@@ -49,7 +49,7 @@ Remove a recipient from the current message's envelope.
<td>smfi_delrcpt will fail and return MI_FAILURE if:
<ul>
<li>rcpt is NULL.
- <li>Adding headers in the current connection state is invalid.
+ <li>Deleting recipients in the current connection state is invalid.
<li>A network error occurs.
<li>SMFIF_DELRCPT was not set when <a href="smfi_register.html">smfi_register</a> was called.
</ul>
diff --git a/gnu/dist/sendmail/libmilter/docs/smfi_register.html b/gnu/dist/sendmail/libmilter/docs/smfi_register.html
index 2e9ee3dbc95..0aac254a6b4 100644
--- a/gnu/dist/sendmail/libmilter/docs/smfi_register.html
+++ b/gnu/dist/sendmail/libmilter/docs/smfi_register.html
@@ -9,7 +9,7 @@
<pre>
#include &lt;libmilter/mfapi.h&gt;
int smfi_register(
- smfiDesc_str descr
+ smfiDesc descr
);
</pre>
Register a set of filter callbacks.
@@ -25,7 +25,7 @@ Register a set of filter callbacks.
<tr align="left" valign=top>
<th width="80">Effects</th>
<td>smfi_register creates a filter using the information given in the
-smfiDesc_str argument. Multiple calls to smfi_register within a
+smfiDesc argument. Multiple calls to smfi_register within a
single process are not allowed.</td>
</tr>
</table>
@@ -36,7 +36,7 @@ single process are not allowed.</td>
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
<tr valign="top"><td>descr</td>
<td>
-A filter descriptor of type smfiDesc_str describing the filter's
+A filter descriptor of type smfiDesc describing the filter's
functions. The structure has the following members:
<pre>
struct smfiDesc
diff --git a/gnu/dist/sendmail/libmilter/docs/smfi_setconn.html b/gnu/dist/sendmail/libmilter/docs/smfi_setconn.html
index b0aed7c2a68..0f810b4b338 100644
--- a/gnu/dist/sendmail/libmilter/docs/smfi_setconn.html
+++ b/gnu/dist/sendmail/libmilter/docs/smfi_setconn.html
@@ -67,8 +67,10 @@ due to a lack of memory.
0660 (read/write permission for the socket's owner and group)
which is useful if the sendmail RunAsUser option is used.
The permissions for a unix/local domain socket are determined as
- usual by <code>umask</code>, which should be set to 007 or 077
- before calling <code>smfi_setconn()</code>.
+ usual by <code>umask</code>, which should be set to 007 or 077.
+ Note some operating systems (e.g, Solaris) don't use the
+ permissions of the socket. On those systems, place the socket in a
+ protected directory.
</ul>
</td>
</tr>
diff --git a/gnu/dist/sendmail/libmilter/docs/smfi_setreply.html b/gnu/dist/sendmail/libmilter/docs/smfi_setreply.html
index 87a47d7ad7a..d5b0e245330 100644
--- a/gnu/dist/sendmail/libmilter/docs/smfi_setreply.html
+++ b/gnu/dist/sendmail/libmilter/docs/smfi_setreply.html
@@ -15,7 +15,7 @@ int smfi_setreply(
char *message
);
</pre>
-Set the default SMTP error reply code.
+Set the default SMTP error reply code. Only 4XX and 5XX replies are accepted.
</td></tr>
<!----------- Description ---------->
@@ -42,10 +42,13 @@ this filter.</td>
<td>Opaque context structure.
</td></tr>
<tr valign="top"><td>rcode</td>
- <td>The three-digit (RFC 821) SMTP reply code, as a null-terminated string. rcode cannot be NULL, and must be a valid reply code.
- </td></tr>
+ <td>The three-digit (RFC 821/2821) SMTP reply code, as a
+ null-terminated string. rcode cannot be NULL, and must be a valid
+ 4XX or 5XX reply code.
+ </td></tr>
<tr valign="top"><td>xcode</td>
- <td>The extended (RFC 2034) reply code. If xcode is NULL, no extended code is used. Otherwise, xcode must conform to RFC 2034.
+ <td>The extended (RFC 1893/2034) reply code. If xcode is NULL, no
+ extended code is used. Otherwise, xcode must conform to RFC 1893/2034.
</td></tr>
<tr valign="top"><td>message</td>
<td>The text part of the SMTP reply. If message is NULL, an empty message is used.
@@ -72,9 +75,18 @@ Otherwise, it return MI_SUCCESS.
<td>
<ul>
<li>Values passed to smfi_setreply are not checked for standards compliance.
+<li>The message parameter should contain only printable characters,
+other characters may lead to undefined behavior.
+For example, CR or LF will cause the call to fail,
+single '%' characters will cause the text to be ignored
+(if there really should be a '%' in the string,
+use '%%' just like for <tt>printf(3)</tt>).
<li>For details about reply codes and their meanings, please see RFC's
-<a href="http://www.rfc-editor.org/rfc/rfc821.txt">821</a>
-and <a href="http://www.rfc-editor.org/rfc/rfc2034.txt">2034</a>.
+<a href="http://www.rfc-editor.org/rfc/rfc821.txt">821</a>/
+<a href="http://www.rfc-editor.org/rfc/rfc2821.txt">2821</a>
+and
+<a href="http://www.rfc-editor.org/rfc/rfc1893.txt">1893</a>/
+<a href="http://www.rfc-editor.org/rfc/rfc2034.txt">2034</a>.
<li>If the reply code (rcode) given is a '4XX' code but SMFI_REJECT is used
for the message, the custom reply is not used.
<li>Similarly, if the reply code (rcode) given is a '5XX' code but
diff --git a/gnu/dist/sendmail/libmilter/docs/xxfi_connect.html b/gnu/dist/sendmail/libmilter/docs/xxfi_connect.html
index af58bf9cba8..85d02e41266 100644
--- a/gnu/dist/sendmail/libmilter/docs/xxfi_connect.html
+++ b/gnu/dist/sendmail/libmilter/docs/xxfi_connect.html
@@ -62,11 +62,29 @@ is passed to smfi_register().
<td><table border="1" cellspacing=0>
<tr bgcolor="#dddddd"><th>Return value</th><th>Description</th></tr>
<tr valign="top">
- <td>SMFIS_DISCARD</td>
- <td>Not meaningful, as
- this is only meaningful from message-oriented routines.
+ <td>SMFIS_ACCEPT</td>
+ <td>Accept all commands and messages from this client without any
+ further contact with the filter. </td>
</td>
</tr>
+ <tr valign="top">
+ <td>SMFIS_CONTINUE</td>
+ <td>Continue normal processing. </td>
+ </tr>
+ <tr valign="top">
+ <td>SMFIS_DISCARD</td>
+ <td>Undefined behaviour; do not use. </td>
+ </tr>
+ <tr valign="top">
+ <td>SMFIS_TEMPFAIL</td>
+ <td>Reject all commands and messages from this client with a
+ temporary failure reply code. </td>
+ </tr>
+ <tr valign="top">
+ <td>SMFIS_REJECT</td>
+ <td>Reject all commands and messages from this client with a
+ permanent failure reply code. </td>
+ </tr>
</table>
</tr>
-->
diff --git a/gnu/dist/sendmail/libmilter/docs/xxfi_envrcpt.html b/gnu/dist/sendmail/libmilter/docs/xxfi_envrcpt.html
index 9d32e90962c..a96ac95f2e1 100644
--- a/gnu/dist/sendmail/libmilter/docs/xxfi_envrcpt.html
+++ b/gnu/dist/sendmail/libmilter/docs/xxfi_envrcpt.html
@@ -52,12 +52,12 @@ Handle the envelope RCPT command.
<tr valign="top">
<td>SMFIS_TEMPFAIL</td>
<td>Temporarily fail for this particular recipient; further recipients
- maystill be sent. <a href="xxfi_abort.html">xxfi_abort</a> is not called.
+ may still be sent. <a href="xxfi_abort.html">xxfi_abort</a> is not called.
</td>
</tr>
<tr valign="top">
<td>SMFIS_REJECT</td>
- <td>Reject this particular recipient; further recipients maystill be sent.
+ <td>Reject this particular recipient; further recipients may still be sent.
<a href="xxfi_abort.html">xxfi_abort</a> is not called.
</td>
</tr>
diff --git a/gnu/dist/sendmail/libsm/assert.c b/gnu/dist/sendmail/libsm/assert.c
index befd6cb9970..a85ca119a44 100644
--- a/gnu/dist/sendmail/libsm/assert.c
+++ b/gnu/dist/sendmail/libsm/assert.c
@@ -1,7 +1,7 @@
-/* $NetBSD: assert.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $ */
+/* $NetBSD: assert.c,v 1.1.1.3 2004/03/25 19:02:00 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: assert.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
+__RCSID("$NetBSD: assert.c,v 1.1.1.3 2004/03/25 19:02:00 atatat Exp $");
#endif
/*
@@ -15,7 +15,7 @@ __RCSID("$NetBSD: assert.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: assert.c,v 1.25 2001/09/11 04:04:47 gshapiro Exp")
+SM_RCSID("@(#)Id: assert.c,v 1.25.2.1 2003/12/05 22:44:17 ca Exp")
/*
** Abnormal program termination and assertion checking.
@@ -133,7 +133,7 @@ sm_abort_sethandler(f)
** doesn't.
*/
-void
+void SM_DEAD_D
#if SM_VA_STD
sm_abort(char *fmt, ...)
#else /* SM_VA_STD */
@@ -169,7 +169,7 @@ sm_abort(fmt, va_alist)
** doesn't.
*/
-void
+void SM_DEAD_D
sm_abort_at(filename, lineno, msg)
const char *filename;
int lineno;
diff --git a/gnu/dist/sendmail/libsm/clock.c b/gnu/dist/sendmail/libsm/clock.c
index 03a3d157f23..8a35347fbc4 100644
--- a/gnu/dist/sendmail/libsm/clock.c
+++ b/gnu/dist/sendmail/libsm/clock.c
@@ -1,7 +1,7 @@
-/* $NetBSD: clock.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $ */
+/* $NetBSD: clock.c,v 1.1.1.3 2004/03/25 19:02:01 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: clock.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
+__RCSID("$NetBSD: clock.c,v 1.1.1.3 2004/03/25 19:02:01 atatat Exp $");
#endif
/*
@@ -18,7 +18,7 @@ __RCSID("$NetBSD: clock.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: clock.c,v 1.35.2.3 2003/03/03 19:57:40 ca Exp")
+SM_RCSID("@(#)Id: clock.c,v 1.35.2.10 2003/06/26 16:36:49 ca Exp")
#include <unistd.h>
#include <time.h>
#include <errno.h>
@@ -30,13 +30,17 @@ SM_RCSID("@(#)Id: clock.c,v 1.35.2.3 2003/03/03 19:57:40 ca Exp")
#include <sm/bitops.h>
#include <sm/clock.h>
#include "local.h"
+#if _FFR_SLEEP_USE_SELECT > 0
+# include <sys/types.h>
+#endif /* _FFR_SLEEP_USE_SELECT > 0 */
+#if defined(_FFR_MAX_SLEEP_TIME) && _FFR_MAX_SLEEP_TIME > 2
+# include <syslog.h>
+#endif /* defined(_FFR_MAX_SLEEP_TIME) && _FFR_MAX_SLEEP_TIME > 2 */
#ifndef sigmask
# define sigmask(s) (1 << ((s) - 1))
#endif /* ! sigmask */
-static void sm_endsleep __P((void));
-
/*
** SM_SETEVENTM -- set an event to happen at a specific time in milliseconds.
@@ -142,6 +146,8 @@ sm_sigsafe_seteventm(intvl, func, arg)
*/
LEAVE_CRITICAL();
+ if (wasblocked == 0)
+ (void) sm_releasesignal(SIGALRM);
return NULL;
}
else
@@ -496,7 +502,10 @@ sm_tick(sig)
*/
+# if !HAVE_NANOSLEEP
+static void sm_endsleep __P((void));
static bool volatile SmSleepDone;
+# endif /* !HAVE_NANOSLEEP */
#ifndef SLEEP_T
# define SLEEP_T unsigned int
@@ -506,20 +515,118 @@ SLEEP_T
sleep(intvl)
unsigned int intvl;
{
+#if HAVE_NANOSLEEP
+ struct timespec rqtp;
+
+ if (intvl == 0)
+ return (SLEEP_T) 0;
+ rqtp.tv_sec = intvl;
+ rqtp.tv_nsec = 0;
+ nanosleep(&rqtp, NULL);
+ return (SLEEP_T) 0;
+#else /* HAVE_NANOSLEEP */
int was_held;
+ SM_EVENT *ev;
+#if _FFR_SLEEP_USE_SELECT > 0
+ int r;
+#endif /* _FFR_SLEEP_USE_SELECT > 0 */
+#if SM_CONF_SETITIMER
+ struct timeval now, begin, diff;
+# if _FFR_SLEEP_USE_SELECT > 0
+ struct timeval sm_io_to, slpv;
+# endif /* _FFR_SLEEP_USE_SELECT > 0 */
+#else /* SM_CONF_SETITIMER */
+ time_t begin, now;
+#endif /* SM_CONF_SETITIMER */
if (intvl == 0)
return (SLEEP_T) 0;
+#if defined(_FFR_MAX_SLEEP_TIME) && _FFR_MAX_SLEEP_TIME > 2
+ if (intvl > _FFR_MAX_SLEEP_TIME)
+ {
+ syslog(LOG_ERR, "sleep: interval=%u exceeds max value %d",
+ intvl, _FFR_MAX_SLEEP_TIME);
+# if 0
+ SM_ASSERT(intvl < (unsigned int) INT_MAX);
+# endif /* 0 */
+ intvl = _FFR_MAX_SLEEP_TIME;
+ }
+#endif /* defined(_FFR_MAX_SLEEP_TIME) && _FFR_MAX_SLEEP_TIME > 2 */
SmSleepDone = false;
- (void) sm_setevent((time_t) intvl, sm_endsleep, 0);
+
+#if SM_CONF_SETITIMER
+# if _FFR_SLEEP_USE_SELECT > 0
+ slpv.tv_sec = intvl;
+ slpv.tv_usec = 0;
+# endif /* _FFR_SLEEP_USE_SELECT > 0 */
+ (void) gettimeofday(&now, NULL);
+ begin = now;
+#else /* SM_CONF_SETITIMER */
+ now = begin = time(NULL);
+#endif /* SM_CONF_SETITIMER */
+
+ ev = sm_setevent((time_t) intvl, sm_endsleep, 0);
+ if (ev == NULL)
+ {
+ /* COMPLAIN */
+#if 0
+ syslog(LOG_ERR, "sleep: sm_setevent(%u) failed", intvl);
+#endif /* 0 */
+ SmSleepDone = true;
+ }
was_held = sm_releasesignal(SIGALRM);
+
while (!SmSleepDone)
+ {
+#if SM_CONF_SETITIMER
+ (void) gettimeofday(&now, NULL);
+ timersub(&now, &begin, &diff);
+ if (diff.tv_sec < 0 ||
+ (diff.tv_sec == 0 && diff.tv_usec == 0))
+ break;
+# if _FFR_SLEEP_USE_SELECT > 0
+ timersub(&slpv, &diff, &sm_io_to);
+# endif /* _FFR_SLEEP_USE_SELECT > 0 */
+#else /* SM_CONF_SETITIMER */
+ now = time(NULL);
+
+ /*
+ ** Check whether time expired before signal is released.
+ ** Due to the granularity of time() add 1 to be on the
+ ** safe side.
+ */
+
+ if (!(begin + (time_t) intvl + 1 > now))
+ break;
+# if _FFR_SLEEP_USE_SELECT > 0
+ sm_io_to.tv_sec = intvl - (now - begin);
+ if (sm_io_to.tv_sec <= 0)
+ sm_io_to.tv_sec = 1;
+ sm_io_to.utv_sec = 0;
+# endif /* _FFR_SLEEP_USE_SELECT > 0 */
+#endif /* SM_CONF_SETITIMER */
+#if _FFR_SLEEP_USE_SELECT > 0
+ if (intvl <= _FFR_SLEEP_USE_SELECT)
+ {
+ r = select(0, NULL, NULL, NULL, &sm_io_to);
+ if (r == 0)
+ break;
+ }
+ else
+#endif /* _FFR_SLEEP_USE_SELECT > 0 */
(void) pause();
+ }
+
+ /* if out of the loop without the event being triggered remove it */
+ if (!SmSleepDone)
+ sm_clrevent(ev);
if (was_held > 0)
(void) sm_blocksignal(SIGALRM);
return (SLEEP_T) 0;
+#endif /* HAVE_NANOSLEEP */
}
+#if !HAVE_NANOSLEEP
static void
sm_endsleep()
{
@@ -531,4 +638,5 @@ sm_endsleep()
SmSleepDone = true;
}
+#endif /* !HAVE_NANOSLEEP */
diff --git a/gnu/dist/sendmail/libsm/errstring.c b/gnu/dist/sendmail/libsm/errstring.c
index 7c7c288b7ac..25ab36634b8 100644
--- a/gnu/dist/sendmail/libsm/errstring.c
+++ b/gnu/dist/sendmail/libsm/errstring.c
@@ -1,11 +1,11 @@
-/* $NetBSD: errstring.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $ */
+/* $NetBSD: errstring.c,v 1.1.1.3 2004/03/25 19:02:03 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: errstring.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
+__RCSID("$NetBSD: errstring.c,v 1.1.1.3 2004/03/25 19:02:03 atatat Exp $");
#endif
/*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001, 2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -17,7 +17,7 @@ __RCSID("$NetBSD: errstring.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: errstring.c,v 1.12 2001/10/03 16:09:32 ca Exp")
+SM_RCSID("@(#)Id: errstring.c,v 1.12.2.4 2003/06/24 17:16:09 ca Exp")
#include <errno.h>
#include <stdio.h> /* sys_errlist, on some platforms */
@@ -48,6 +48,8 @@ SM_RCSID("@(#)Id: errstring.c,v 1.12 2001/10/03 16:09:32 ca Exp")
**
** Returns:
** A string description of errnum.
+**
+** Note: this may point to a local (static) buffer.
*/
const char *
@@ -56,6 +58,7 @@ sm_errstring(errnum)
{
char *ret;
+
switch (errnum)
{
case EPERM:
@@ -189,6 +192,9 @@ sm_errstring(errnum)
case SMDBE_OLD_VERSION:
return "Berkeley DB file is an old version, recreate it";
+
+ case SMDBE_VERSION_MISMATCH:
+ return "Berkeley DB version mismatch between include file and library";
}
/*
diff --git a/gnu/dist/sendmail/libsm/exc.c b/gnu/dist/sendmail/libsm/exc.c
index 2504ffe1d57..060802d12a6 100644
--- a/gnu/dist/sendmail/libsm/exc.c
+++ b/gnu/dist/sendmail/libsm/exc.c
@@ -1,7 +1,7 @@
-/* $NetBSD: exc.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $ */
+/* $NetBSD: exc.c,v 1.1.1.3 2004/03/25 19:02:03 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: exc.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
+__RCSID("$NetBSD: exc.c,v 1.1.1.3 2004/03/25 19:02:03 atatat Exp $");
#endif
/*
@@ -15,7 +15,7 @@ __RCSID("$NetBSD: exc.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: exc.c,v 1.47 2002/01/09 18:51:43 ca Exp")
+SM_RCSID("@(#)Id: exc.c,v 1.47.2.1 2003/12/05 22:44:17 ca Exp")
/*
** exception handling
@@ -593,7 +593,7 @@ sm_exc_newthread(h)
** doesn't.
*/
-void
+void SM_DEAD_D
sm_exc_raise_x(exc)
SM_EXC_T *exc;
{
@@ -654,7 +654,7 @@ sm_exc_raise_x(exc)
** none.
*/
-void
+void SM_DEAD_D
#if SM_VA_STD
sm_exc_raisenew_x(
const SM_EXC_TYPE_T *etype,
diff --git a/gnu/dist/sendmail/libsm/flags.c b/gnu/dist/sendmail/libsm/flags.c
index 1a15f2f535c..963292bd8d2 100644
--- a/gnu/dist/sendmail/libsm/flags.c
+++ b/gnu/dist/sendmail/libsm/flags.c
@@ -1,11 +1,11 @@
-/* $NetBSD: flags.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $ */
+/* $NetBSD: flags.c,v 1.1.1.3 2004/03/25 19:02:05 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: flags.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
+__RCSID("$NetBSD: flags.c,v 1.1.1.3 2004/03/25 19:02:05 atatat Exp $");
#endif
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -19,7 +19,7 @@ __RCSID("$NetBSD: flags.c,v 1.1.1.2 2003/06/01 14:01:34 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: flags.c,v 1.20 2001/09/11 04:04:48 gshapiro Exp")
+SM_RCSID("@(#)Id: flags.c,v 1.20.2.1 2003/09/03 18:51:56 ca Exp")
#include <sys/types.h>
#include <sys/file.h>
#include <errno.h>
@@ -41,7 +41,7 @@ sm_flags(flags)
{
register int ret;
- switch(flags)
+ switch(SM_IO_MODE(flags))
{
case SM_IO_RDONLY: /* open for reading */
ret = SMRD;
@@ -63,5 +63,7 @@ sm_flags(flags)
ret = 0;
break;
}
+ if (SM_IS_BINARY(flags))
+ ret |= SM_IO_BINARY;
return ret;
}
diff --git a/gnu/dist/sendmail/libsm/ldap.c b/gnu/dist/sendmail/libsm/ldap.c
index 69f25501255..e3bd0eb3ff1 100644
--- a/gnu/dist/sendmail/libsm/ldap.c
+++ b/gnu/dist/sendmail/libsm/ldap.c
@@ -1,11 +1,11 @@
-/* $NetBSD: ldap.c,v 1.1.1.2 2003/06/01 14:01:37 atatat Exp $ */
+/* $NetBSD: ldap.c,v 1.1.1.3 2004/03/25 19:02:09 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ldap.c,v 1.1.1.2 2003/06/01 14:01:37 atatat Exp $");
+__RCSID("$NetBSD: ldap.c,v 1.1.1.3 2004/03/25 19:02:09 atatat Exp $");
#endif
/*
- * Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -14,7 +14,7 @@ __RCSID("$NetBSD: ldap.c,v 1.1.1.2 2003/06/01 14:01:37 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: ldap.c,v 1.44.2.2 2002/08/09 22:23:12 gshapiro Exp")
+SM_RCSID("@(#)Id: ldap.c,v 1.44.2.5 2003/12/23 21:21:56 gshapiro Exp")
#if LDAPMAP
# include <sys/types.h>
@@ -576,9 +576,11 @@ sm_ldap_results(lmap, msgid, flags, delim, rpool, result,
** no need to spin through attributes
*/
- if (statp == EX_OK &&
- bitset(SM_LDAP_MATCHONLY, flags))
+ if (bitset(SM_LDAP_MATCHONLY, flags))
+ {
+ statp = EX_OK;
continue;
+ }
/* record completed DN's to prevent loops */
dn = ldap_get_dn(lmap->ldap_ld, entry);
@@ -588,7 +590,7 @@ sm_ldap_results(lmap, msgid, flags, delim, rpool, result,
save_errno += E_LDAPBASE;
SM_LDAP_ERROR_CLEANUP();
errno = save_errno;
- return EX_OSERR;
+ return EX_TEMPFAIL;
}
rl = sm_ldap_add_recurse(&recurse, dn,
diff --git a/gnu/dist/sendmail/libsm/local.h b/gnu/dist/sendmail/libsm/local.h
index 04e3fe80fab..c0610c4698d 100644
--- a/gnu/dist/sendmail/libsm/local.h
+++ b/gnu/dist/sendmail/libsm/local.h
@@ -1,6 +1,6 @@
-/* $NetBSD: local.h,v 1.1.1.2 2003/06/01 14:01:37 atatat Exp $ */
+/* $NetBSD: local.h,v 1.1.1.3 2004/03/25 19:02:09 atatat Exp $ */
/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -12,7 +12,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * Id: local.h,v 1.51.2.1 2002/09/09 21:38:08 gshapiro Exp
+ * Id: local.h,v 1.51.2.2 2004/01/09 18:32:44 ca Exp
*/
/*
@@ -38,7 +38,6 @@ int sm_wsetup __P((SM_FILE_T *));
int sm_flags __P((int));
SM_FILE_T *sm_fp __P((const SM_FILE_T *, const int, SM_FILE_T *));
int sm_vprintf __P((int, char const *, va_list));
-int sm_vfscanf __P((SM_FILE_T *, int, char const *, va_list));
/* std io functions */
ssize_t sm_stdread __P((SM_FILE_T *, char *, size_t));
diff --git a/gnu/dist/sendmail/libsm/shm.c b/gnu/dist/sendmail/libsm/shm.c
index b68d0937dd6..d9014196e3c 100644
--- a/gnu/dist/sendmail/libsm/shm.c
+++ b/gnu/dist/sendmail/libsm/shm.c
@@ -1,11 +1,11 @@
-/* $NetBSD: shm.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $ */
+/* $NetBSD: shm.c,v 1.1.1.3 2004/03/25 19:02:19 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: shm.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $");
+__RCSID("$NetBSD: shm.c,v 1.1.1.3 2004/03/25 19:02:19 atatat Exp $");
#endif
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -14,7 +14,7 @@ __RCSID("$NetBSD: shm.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: shm.c,v 1.10 2001/12/14 00:22:58 ca Exp")
+SM_RCSID("@(#)Id: shm.c,v 1.10.2.6 2003/06/13 21:17:48 ca Exp")
#if SM_CONF_SHM
# include <stdlib.h>
@@ -22,6 +22,7 @@ SM_RCSID("@(#)Id: shm.c,v 1.10 2001/12/14 00:22:58 ca Exp")
# include <errno.h>
# include <sm/shm.h>
+
/*
** SM_SHMSTART -- initialize shared memory segment.
**
@@ -75,6 +76,7 @@ sm_shmstart(key, size, shmflg, shmid, owner)
return (void *) 0;
}
+
/*
** SM_SHMSTOP -- stop using shared memory segment.
**
@@ -91,6 +93,7 @@ sm_shmstart(key, size, shmflg, shmid, owner)
** detaches (and maybe removes) shared memory segment.
*/
+
int
sm_shmstop(shm, shmid, owner)
void *shm;
@@ -105,4 +108,6 @@ sm_shmstop(shm, shmid, owner)
return r;
return 0;
}
+
+
#endif /* SM_CONF_SHM */
diff --git a/gnu/dist/sendmail/libsm/smstdio.c b/gnu/dist/sendmail/libsm/smstdio.c
index 072ba45f825..8d937b7caea 100644
--- a/gnu/dist/sendmail/libsm/smstdio.c
+++ b/gnu/dist/sendmail/libsm/smstdio.c
@@ -1,7 +1,7 @@
-/* $NetBSD: smstdio.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $ */
+/* $NetBSD: smstdio.c,v 1.1.1.3 2004/03/25 19:02:19 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: smstdio.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $");
+__RCSID("$NetBSD: smstdio.c,v 1.1.1.3 2004/03/25 19:02:19 atatat Exp $");
#endif
/*
@@ -14,7 +14,7 @@ __RCSID("$NetBSD: smstdio.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $");
*/
#include <sm/gen.h>
-SM_IDSTR(id, "@(#)Id: smstdio.c,v 1.32 2002/02/23 20:18:36 gshapiro Exp")
+SM_IDSTR(id, "@(#)Id: smstdio.c,v 1.32.2.2 2003/09/05 20:35:28 ca Exp")
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
@@ -74,6 +74,23 @@ sm_stdioopen(fp, info, flags, rpool)
case SM_IO_APPENDRW:
stdiomode = "a+";
break;
+#if SM_IO_BINARY != 0
+ case SM_IO_RDONLY_B:
+ stdiomode = "rb";
+ break;
+ case SM_IO_WRONLY_B:
+ stdiomode = "wb";
+ break;
+ case SM_IO_APPEND_B:
+ stdiomode = "ab";
+ break;
+ case SM_IO_APPENDRW_B:
+ stdiomode = "a+b";
+ break;
+ case SM_IO_RDWR_B:
+ stdiomode = "r+b";
+ break;
+#endif /* SM_IO_BINARY != 0 */
case SM_IO_RDWR:
default:
stdiomode = "r+";
diff --git a/gnu/dist/sendmail/libsm/stdio.c b/gnu/dist/sendmail/libsm/stdio.c
index 892f6258a59..9314a9259bf 100644
--- a/gnu/dist/sendmail/libsm/stdio.c
+++ b/gnu/dist/sendmail/libsm/stdio.c
@@ -1,7 +1,7 @@
-/* $NetBSD: stdio.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $ */
+/* $NetBSD: stdio.c,v 1.1.1.3 2004/03/25 19:02:20 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: stdio.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $");
+__RCSID("$NetBSD: stdio.c,v 1.1.1.3 2004/03/25 19:02:20 atatat Exp $");
#endif
/*
@@ -19,7 +19,7 @@ __RCSID("$NetBSD: stdio.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: stdio.c,v 1.56.2.10 2003/01/10 23:07:17 ca Exp")
+SM_RCSID("@(#)Id: stdio.c,v 1.56.2.13 2003/09/04 01:18:08 ca Exp")
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
@@ -69,7 +69,7 @@ sm_stdopen(fp, info, flags, rpool)
char *path = (char *) info;
int oflags;
- switch (flags)
+ switch (SM_IO_MODE(flags))
{
case SM_IO_RDWR:
oflags = O_RDWR;
@@ -93,6 +93,10 @@ sm_stdopen(fp, info, flags, rpool)
errno = EINVAL;
return -1;
}
+#ifdef O_BINARY
+ if (SM_IS_BINARY(flags))
+ oflags |= O_BINARY;
+#endif /* O_BINARY */
fp->f_file = open(path, oflags,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
if (fp->f_file < 0)
@@ -227,7 +231,7 @@ sm_stdsetmode(fp, mode)
{
int flags = 0;
- switch (*mode)
+ switch (SM_IO_MODE(*mode))
{
case SM_IO_RDWR:
flags |= SMRW;
@@ -408,7 +412,7 @@ sm_stdfdopen(fp, info, flags, rpool)
{
int oflags, tmp, fdflags, fd = *((int *) info);
- switch (flags)
+ switch (SM_IO_MODE(flags))
{
case SM_IO_RDWR:
oflags = O_RDWR | O_CREAT;
@@ -429,6 +433,10 @@ sm_stdfdopen(fp, info, flags, rpool)
errno = EINVAL;
return -1;
}
+#ifdef O_BINARY
+ if (SM_IS_BINARY(flags))
+ oflags |= O_BINARY;
+#endif /* O_BINARY */
/* Make sure the mode the user wants is a subset of the actual mode. */
if ((fdflags = fcntl(fd, F_GETFL, 0)) < 0)
diff --git a/gnu/dist/sendmail/libsm/vasprintf.c b/gnu/dist/sendmail/libsm/vasprintf.c
index dc36294f6d5..70248b854b3 100644
--- a/gnu/dist/sendmail/libsm/vasprintf.c
+++ b/gnu/dist/sendmail/libsm/vasprintf.c
@@ -1,7 +1,7 @@
-/* $NetBSD: vasprintf.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $ */
+/* $NetBSD: vasprintf.c,v 1.1.1.3 2004/03/25 19:02:30 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: vasprintf.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $");
+__RCSID("$NetBSD: vasprintf.c,v 1.1.1.3 2004/03/25 19:02:30 atatat Exp $");
#endif
/*
@@ -15,33 +15,22 @@ __RCSID("$NetBSD: vasprintf.c,v 1.1.1.2 2003/06/01 14:01:38 atatat Exp $");
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * THIS SOFTWARE IS PROVIDED ``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 AUTHOR 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.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
+ * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: vasprintf.c,v 1.26 2001/09/11 04:04:49 gshapiro Exp")
+SM_RCSID("@(#)Id: vasprintf.c,v 1.26.2.1 2003/06/03 02:14:09 ca Exp")
#include <stdlib.h>
#include <errno.h>
#include <sm/io.h>
diff --git a/gnu/dist/sendmail/mailstats/mailstats.0 b/gnu/dist/sendmail/mailstats/mailstats.0
index ba36e270cb5..246e4a65194 100644
--- a/gnu/dist/sendmail/mailstats/mailstats.0
+++ b/gnu/dist/sendmail/mailstats/mailstats.0
@@ -1,9 +1,7 @@
+MAILSTATS(8) MAILSTATS(8)
-MAILSTATS(8) MAILSTATS(8)
-
-
NNAAMMEE
mailstats - display mail statistics
@@ -11,13 +9,12 @@ SSYYNNOOPPSSIISS
mmaaiillssttaattss [--cc] [--oo] [--pp] [--PP] [--CC _c_f_f_i_l_e] [--ff _s_t_f_i_l_e]
DDEESSCCRRIIPPTTIIOONN
- The mmaaiillssttaattss utility displays the current mail statis-
- tics.
+ The mmaaiillssttaattss utility displays the current mail statistics.
- First, the time at which statistics started being kept is
- displayed, in the format specified by ctime(3). Then, the
- statistics for each mailer are displayed on a single line,
- each with the following white space separated fields:
+ First, the time at which statistics started being kept is displayed, in
+ the format specified by ctime(3). Then, the statistics for each mailer
+ are displayed on a single line, each with the following white space
+ separated fields:
MM The mailer number.
mmssggssffrr Number of messages from the mailer.
@@ -28,105 +25,39 @@ DDEESSCCRRIIPPTTIIOONN
mmssggssddiiss Number of messages discarded.
MMaaiilleerr The name of the mailer.
- After this display, a line totaling the values for all of
- the mailers is displayed (preceded with a ``T''), sepa-
- rated from the previous information by a line containing
- only equals (``='') characters. Another line preceded
- with a ``C'' lists the number of TCP connections.
+ After this display, a line totaling the values for all of the mailers
+ is displayed (preceded with a ``T''), separated from the previous
+ information by a line containing only equals (``='') characters.
+ Another line preceded with a ``C'' lists the number of TCP connections.
The options are as follows:
- --CC Read the specified file instead of the default
- sseennddmmaaiill configuration file.
-
- --cc Try to use submit.cf instead of the default sseenndd--
- mmaaiill configuration file.
-
- --ff Read the specified statistics file instead of the
- statistics file specified in the sseennddmmaaiill configu-
+ --CC Read the specified file instead of the default sseennddmmaaiill configu-
ration file.
- --PP Output information in program-readable mode without
- clearing statistics.
-
- --pp Output information in program-readable mode and
- clear statistics.
-
- --oo Don't display the name of the mailer in the output.
-
- The mmaaiillssttaattss utility exits 0 on success, and >0 if an
- error occurs.
+ --cc Try to use submit.cf instead of the default sseennddmmaaiill configura-
+ tion file.
+ --ff Read the specified statistics file instead of the statistics
+ file specified in the sseennddmmaaiill configuration file.
+ --PP Output information in program-readable mode without clearing
+ statistics.
+ --pp Output information in program-readable mode and clear statis-
+ tics.
+ --oo Don't display the name of the mailer in the output.
- Date: 2002/09/26 23:03:39 1
-
-
-
-
-
-MAILSTATS(8) MAILSTATS(8)
-
+ The mmaaiillssttaattss utility exits 0 on success, and >0 if an error occurs.
FFIILLEESS
- /etc/mail/sendmail.cf The default sseennddmmaaiill configura-
- tion file.
- /etc/mail/statistics The default sseennddmmaaiill statistics
- file.
+ /etc/mail/sendmail.cf The default sseennddmmaaiill configuration file.
+ /etc/mail/statistics The default sseennddmmaaiill statistics file.
SSEEEE AALLSSOO
mailq(1), sendmail(8)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Date: 2002/09/26 23:03:39 2
-
-
+ Date: 2002/09/26 23:03:39 MAILSTATS(8)
diff --git a/gnu/dist/sendmail/makemap/makemap.0 b/gnu/dist/sendmail/makemap/makemap.0
index f2cfff7d0d2..6fa0a18712c 100644
--- a/gnu/dist/sendmail/makemap/makemap.0
+++ b/gnu/dist/sendmail/makemap/makemap.0
@@ -1,102 +1,77 @@
+MAKEMAP(8) MAKEMAP(8)
-MAKEMAP(8) MAKEMAP(8)
-
-
NNAAMMEE
makemap - create database maps for sendmail
SSYYNNOOPPSSIISS
- mmaakkeemmaapp [--CC _f_i_l_e] [--NN] [--cc _c_a_c_h_e_s_i_z_e] [--dd] [--ee] [--ff] [--ll]
- [--oo] [--rr] [--ss] [--tt _d_e_l_i_m] [--uu] [--vv] _m_a_p_t_y_p_e _m_a_p_n_a_m
+ mmaakkeemmaapp [--CC _f_i_l_e] [--NN] [--cc _c_a_c_h_e_s_i_z_e] [--dd] [--ee] [--ff] [--ll] [--oo] [--rr]
+ [--ss] [--tt _d_e_l_i_m] [--uu] [--vv] _m_a_p_t_y_p_e _m_a_p_n_a_m
DDEESSCCRRIIPPTTIIOONN
- MMaakkeemmaapp creates the database maps used by the keyed map
- lookups in sendmail(8). It reads input from the standard
- input and outputs them to the indicated _m_a_p_n_a_m_e_.
+ MMaakkeemmaapp creates the database maps used by the keyed map lookups in
+ sendmail(8). It reads input from the standard input and outputs them
+ to the indicated _m_a_p_n_a_m_e_.
- Depending on how it is compiled, mmaakkeemmaapp handles up to
- three different database formats, selected using the _m_a_p_-
- _t_y_p_e parameter. They may be
+ Depending on how it is compiled, mmaakkeemmaapp handles up to three different
+ database formats, selected using the _m_a_p_t_y_p_e parameter. They may be
- dbm DBM format maps. This requires the ndbm(3)
- library.
+ dbm DBM format maps. This requires the ndbm(3) library.
- btree B-Tree format maps. This requires the new Berkeley
- DB library.
+ btree B-Tree format maps. This requires the new Berkeley DB library.
- hash Hash format maps. This also requires the Berkeley
- DB library.
+ hash Hash format maps. This also requires the Berkeley DB library.
- In all cases, mmaakkeemmaapp reads lines from the standard input
- consisting of two words separated by white space. The
- first is the database key, the second is the value. The
- value may contain ``%_n'' strings to indicate parameter
- substitution. Literal percents should be doubled
- (``%%''). Blank lines and lines beginning with ``#'' are
- ignored.
+ In all cases, mmaakkeemmaapp reads lines from the standard input consisting of
+ two words separated by white space. The first is the database key, the
+ second is the value. The value may contain ``%_n'' strings to indicate
+ parameter substitution. Literal percents should be doubled (``%%'').
+ Blank lines and lines beginning with ``#'' are ignored.
- Notice: do nnoott use mmaakkeemmaapp to create the aliases data
- base, but nneewwaalliiaasseess which puts a special token into the
- data base that is required by sseennddmmaaiill..
+ Notice: do nnoott use mmaakkeemmaapp to create the aliases data base, but
+ nneewwaalliiaasseess which puts a special token into the data base that is
+ required by sseennddmmaaiill..
- If the _T_r_u_s_t_e_d_U_s_e_r option is set in the sendmail configu-
- ration file and mmaakkeemmaapp is invoked as root, the generated
- files will be owned by the specified _T_r_u_s_t_e_d_U_s_e_r_.
+ If the _T_r_u_s_t_e_d_U_s_e_r option is set in the sendmail configuration file and
+ mmaakkeemmaapp is invoked as root, the generated files will be owned by the
+ specified _T_r_u_s_t_e_d_U_s_e_r_.
FFllaaggss
- --CC Use the specified sseennddmmaaiill configuration file for
- looking up the TrustedUser option.
+ --CC Use the specified sseennddmmaaiill configuration file for looking up the
+ TrustedUser option.
- --NN Include the null byte that terminates strings in
- the map. This must match the -N flag in the send-
- mail.cf ``K'' line.
+ --NN Include the null byte that terminates strings in the map. This
+ must match the -N flag in the sendmail.cf ``K'' line.
--cc Use the specified hash and B-Tree cache size.
- --dd Allow duplicate keys in the map. This is only
- allowed on B-Tree format maps. If two identical
- keys are read, they will both be inserted into the
-
-
-
- Date: 2001/10/10 03:23:02 1
-
-
-
-
-
-MAKEMAP(8) MAKEMAP(8)
-
-
- map.
+ --dd Allow duplicate keys in the map. This is only allowed on B-Tree
+ format maps. If two identical keys are read, they will both be
+ inserted into the map.
--ee Allow empty value (right hand side).
- --ff Normally all upper case letters in the key are
- folded to lower case. This flag disables that
- behaviour. This is intended to mesh with the -f
- flag in the KK line in sendmail.cf. The value is
- never case folded.
+ --ff Normally all upper case letters in the key are folded to lower
+ case. This flag disables that behaviour. This is intended to
+ mesh with the -f flag in the KK line in sendmail.cf. The value
+ is never case folded.
--ll List supported map types.
- --oo Append to an old file. This allows you to augment
- an existing file.
+ --oo Append to an old file. This allows you to augment an existing
+ file.
- --rr Allow replacement of existing keys. Normally
- mmaakkeemmaapp complains if you repeat a key, and does not
- do the insert.
+ --rr Allow replacement of existing keys. Normally mmaakkeemmaapp complains
+ if you repeat a key, and does not do the insert.
- --ss Ignore safety checks on maps being created. This
- includes checking for hard or symbolic links in
- world writable directories.
+ --ss Ignore safety checks on maps being created. This includes
+ checking for hard or symbolic links in world writable directo-
+ ries.
--tt Use the specified delimiter instead of white space.
- --uu dump (unmap) the content of the database to stan-
- dard output.
+ --uu dump (unmap) the content of the database to standard output.
--vv Verbosely print what it is doing.
@@ -108,25 +83,4 @@ HHIISSTTOORRYY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Date: 2001/10/10 03:23:02 2
-
-
+ Date: 2001/10/10 03:23:02 MAKEMAP(8)
diff --git a/gnu/dist/sendmail/praliases/praliases.0 b/gnu/dist/sendmail/praliases/praliases.0
index 3981c4788eb..bce4751048c 100644
--- a/gnu/dist/sendmail/praliases/praliases.0
+++ b/gnu/dist/sendmail/praliases/praliases.0
@@ -1,9 +1,7 @@
+PRALIASES(8) PRALIASES(8)
-PRALIASES(8) PRALIASES(8)
-
-
NNAAMMEE
praliases - display system mail aliases
@@ -11,56 +9,29 @@ SSYYNNOOPPSSIISS
pprraalliiaasseess [--CC _f_i_l_e] [--ff _f_i_l_e] [_k_e_y _._._.]
DDEESSCCRRIIPPTTIIOONN
- The pprraalliiaasseess utility displays the current system aliases,
- one per line, in no particular order. The special inter-
- nal @:@ alias will be displayed if present.
+ The pprraalliiaasseess utility displays the current system aliases, one per
+ line, in no particular order. The special internal @:@ alias will be
+ displayed if present.
The options are as follows:
- --CC Read the specified sendmail configuration file
- instead of the default sseennddmmaaiill configuration file.
+ --CC Read the specified sendmail configuration file instead of the
+ default sseennddmmaaiill configuration file.
- --ff Read the specified file instead of the configured
- sseennddmmaaiill system aliases file(s).
+ --ff Read the specified file instead of the configured sseennddmmaaiill sys-
+ tem aliases file(s).
- If one or more keys are specified on the command line,
- only entries which match those keys are displayed.
+ If one or more keys are specified on the command line, only entries
+ which match those keys are displayed.
- The pprraalliiaasseess utility exits 0 on success, and >0 if an
- error occurs.
+ The pprraalliiaasseess utility exits 0 on success, and >0 if an error occurs.
FFIILLEESS
- /etc/mail/sendmail.cf The default sseennddmmaaiill configura-
- tion file.
+ /etc/mail/sendmail.cf The default sseennddmmaaiill configuration file.
SSEEEE AALLSSOO
mailq(1), sendmail(8)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Date: 2000/12/15 19:53:45 1
-
-
+ Date: 2000/12/15 19:53:45 PRALIASES(8)
diff --git a/gnu/dist/sendmail/sendmail/bf.c b/gnu/dist/sendmail/sendmail/bf.c
index adf7a5e8294..1632ea8d8cc 100644
--- a/gnu/dist/sendmail/sendmail/bf.c
+++ b/gnu/dist/sendmail/sendmail/bf.c
@@ -1,7 +1,7 @@
-/* $NetBSD: bf.c,v 1.1.1.2 2003/06/01 14:01:20 atatat Exp $ */
+/* $NetBSD: bf.c,v 1.1.1.3 2004/03/25 18:58:18 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bf.c,v 1.1.1.2 2003/06/01 14:01:20 atatat Exp $");
+__RCSID("$NetBSD: bf.c,v 1.1.1.3 2004/03/25 18:58:18 atatat Exp $");
#endif
/*
@@ -24,7 +24,7 @@ __RCSID("$NetBSD: bf.c,v 1.1.1.2 2003/06/01 14:01:20 atatat Exp $");
*/
#include <sm/gen.h>
-SM_RCSID("@(#)Id: bf.c,v 8.54.2.2 2002/06/21 19:58:40 gshapiro Exp")
+SM_RCSID("@(#)Id: bf.c,v 8.54.2.3 2003/09/03 19:58:26 ca Exp")
#include <sys/types.h>
#include <sys/stat.h>
@@ -548,7 +548,7 @@ sm_bfwrite(fp, buf, nbytes)
/* Clear umask as bf_filemode are the true perms */
omask = umask(0);
retval = OPEN(bfp->bf_filename,
- O_RDWR | O_CREAT | O_TRUNC,
+ O_RDWR | O_CREAT | O_TRUNC | QF_O_EXTRA,
bfp->bf_filemode, bfp->bf_flags);
(void) umask(omask);
diff --git a/gnu/dist/sendmail/sendmail/tls.c b/gnu/dist/sendmail/sendmail/tls.c
index 1a0f233692d..9004eca6615 100644
--- a/gnu/dist/sendmail/sendmail/tls.c
+++ b/gnu/dist/sendmail/sendmail/tls.c
@@ -1,7 +1,7 @@
-/* $NetBSD: tls.c,v 1.1.1.2 2003/06/01 14:01:31 atatat Exp $ */
+/* $NetBSD: tls.c,v 1.1.1.3 2004/03/25 19:01:31 atatat Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: tls.c,v 1.1.1.2 2003/06/01 14:01:31 atatat Exp $");
+__RCSID("$NetBSD: tls.c,v 1.1.1.3 2004/03/25 19:01:31 atatat Exp $");
#endif
/*
@@ -16,7 +16,7 @@ __RCSID("$NetBSD: tls.c,v 1.1.1.2 2003/06/01 14:01:31 atatat Exp $");
#include <sendmail.h>
-SM_RCSID("@(#)Id: tls.c,v 8.79.4.4 2003/03/20 00:03:42 ca Exp")
+SM_RCSID("@(#)Id: tls.c,v 8.79.4.5 2003/12/28 04:23:28 gshapiro Exp")
#if STARTTLS
# include <openssl/err.h>
@@ -350,30 +350,36 @@ tls_set_verify(ctx, ssl, vrfy)
# define TLS_S_DHPAR_EX 0x00400000 /* DH param file exists */
# define TLS_S_DHPAR_OK 0x00800000 /* DH param file is ok to use */
+/* Type of variable */
+# define TLS_T_OTHER 0
+# define TLS_T_SRV 1
+# define TLS_T_CLT 2
+
/*
** TLS_OK_F -- can var be an absolute filename?
**
** Parameters:
** var -- filename
** fn -- what is the filename used for?
-** srv -- server side?
+** type -- type of variable
**
** Returns:
** ok?
*/
static bool
-tls_ok_f(var, fn, srv)
+tls_ok_f(var, fn, type)
char *var;
char *fn;
- bool srv;
+ int type;
{
/* must be absolute pathname */
if (var != NULL && *var == '/')
return true;
if (LogLevel > 12)
sm_syslog(LOG_WARNING, NOQID, "STARTTLS: %s%s missing",
- srv ? "Server" : "Client", fn);
+ type == TLS_T_SRV ? "Server" :
+ (type == TLS_T_CLT ? "Client" : ""), var);
return false;
}
/*
@@ -413,16 +419,16 @@ tls_safe_f(var, sff, srv)
** fn -- what is the filename used for?
** req -- is the file required?
** st -- status bit to set if ok
-** srv -- server side?
+** type -- type of variable
**
** Side Effects:
** uses r, ok; may change ok and status.
**
*/
-# define TLS_OK_F(var, fn, req, st, srv) if (ok) \
+# define TLS_OK_F(var, fn, req, st, type) if (ok) \
{ \
- r = tls_ok_f(var, fn, srv); \
+ r = tls_ok_f(var, fn, type); \
if (r) \
status |= st; \
else if (req) \
@@ -545,13 +551,13 @@ inittls(ctx, req, srv, certfile, keyfile, cacertpath, cacertfile, dhparam)
*/
TLS_OK_F(certfile, "CertFile", bitset(TLS_I_CERT_EX, req),
- TLS_S_CERT_EX, srv);
+ TLS_S_CERT_EX, srv ? TLS_T_SRV : TLS_T_CLT);
TLS_OK_F(keyfile, "KeyFile", bitset(TLS_I_KEY_EX, req),
- TLS_S_KEY_EX, srv);
+ TLS_S_KEY_EX, srv ? TLS_T_SRV : TLS_T_CLT);
TLS_OK_F(cacertpath, "CACertPath", bitset(TLS_I_CERTP_EX, req),
- TLS_S_CERTP_EX, srv);
+ TLS_S_CERTP_EX, TLS_T_OTHER);
TLS_OK_F(cacertfile, "CACertFile", bitset(TLS_I_CERTF_EX, req),
- TLS_S_CERTF_EX, srv);
+ TLS_S_CERTF_EX, TLS_T_OTHER);
# if _FFR_TLS_1
/*
@@ -562,12 +568,12 @@ inittls(ctx, req, srv, certfile, keyfile, cacertpath, cacertfile, dhparam)
if (cf2 != NULL)
{
TLS_OK_F(cf2, "CertFile", bitset(TLS_I_CERT_EX, req),
- TLS_S_CERT2_EX, srv);
+ TLS_S_CERT2_EX, srv ? TLS_T_SRV : TLS_T_CLT);
}
if (kf2 != NULL)
{
TLS_OK_F(kf2, "KeyFile", bitset(TLS_I_KEY_EX, req),
- TLS_S_KEY2_EX, srv);
+ TLS_S_KEY2_EX, srv ? TLS_T_SRV : TLS_T_CLT);
}
# endif /* _FFR_TLS_1 */
@@ -605,7 +611,7 @@ inittls(ctx, req, srv, certfile, keyfile, cacertpath, cacertfile, dhparam)
{
TLS_OK_F(dhparam, "DHParameters",
bitset(TLS_I_DHPAR_EX, req),
- TLS_S_DHPAR_EX, srv);
+ TLS_S_DHPAR_EX, TLS_T_OTHER);
}
}
if (!ok)
diff --git a/gnu/dist/sendmail/smrsh/smrsh.0 b/gnu/dist/sendmail/smrsh/smrsh.0
index 62e78787c77..f938e43cb1e 100644
--- a/gnu/dist/sendmail/smrsh/smrsh.0
+++ b/gnu/dist/sendmail/smrsh/smrsh.0
@@ -1,9 +1,7 @@
+SMRSH(8) SMRSH(8)
-SMRSH(8) SMRSH(8)
-
-
NNAAMMEE
smrsh - restricted shell for sendmail
@@ -11,56 +9,57 @@ SSYYNNOOPPSSIISS
ssmmrrsshh --cc command
DDEESSCCRRIIPPTTIIOONN
- The _s_m_r_s_h program is intended as a replacement for _s_h for
- use in the ``prog'' mailer in _s_e_n_d_m_a_i_l(8) configuration
- files. It sharply limits the commands that can be run
- using the ``|program'' syntax of _s_e_n_d_m_a_i_l in order to
- improve the over all security of your system. Briefly,
- even if a ``bad guy'' can get sendmail to run a program
- without going through an alias or forward file, _s_m_r_s_h lim-
- its the set of programs that he or she can execute.
-
- Briefly, _s_m_r_s_h limits programs to be in a single direc-
- tory, by default /usr/adm/sm.bin, allowing the system
- administrator to choose the set of acceptable commands,
- and to the shell builtin commands ``exec'', ``exit'', and
- ``echo''. It also rejects any commands with the charac-
- ters ``', `<', `>', `;', `$', `(', `)', `\r' (carriage
- return), or `\n' (newline) on the command line to prevent
- ``end run'' attacks. It allows ``||'' and ``&&'' to
- enable commands like: ``"|exec /usr/local/bin/procmail -f-
- /etc/procmailrcs/user || exit 75"''
-
- Initial pathnames on programs are stripped, so forwarding
- to ``/usr/ucb/vacation'', ``/usr/bin/vacation'',
- ``/home/server/mydir/bin/vacation'', and ``vacation'' all
- actually forward to ``/usr/adm/sm.bin/vacation''.
-
- System administrators should be conservative about popu-
- lating the sm.bin directory. Reasonable additions are
- _v_a_c_a_t_i_o_n(1), _p_r_o_c_m_a_i_l(1), and the like. No matter how
- brow-beaten you may be, never include any shell or shell-
- like program (such as _p_e_r_l(1)) in the sm.bin directory.
- Note that this does not restrict the use of shell or perl
- scripts in the sm.bin directory (using the ``#!'' syntax);
- it simply disallows execution of arbitrary programs.
+ The _s_m_r_s_h program is intended as a replacement for _s_h for use in the
+ ``prog'' mailer in _s_e_n_d_m_a_i_l(8) configuration files. It sharply limits
+ the commands that can be run using the ``|program'' syntax of _s_e_n_d_m_a_i_l
+ in order to improve the over all security of your system. Briefly,
+ even if a ``bad guy'' can get sendmail to run a program without going
+ through an alias or forward file, _s_m_r_s_h limits the set of programs that
+ he or she can execute.
+
+ Briefly, _s_m_r_s_h limits programs to be in a single directory, by default
+ /usr/adm/sm.bin, allowing the system administrator to choose the set of
+ acceptable commands, and to the shell builtin commands ``exec'',
+ ``exit'', and ``echo''. It also rejects any commands with the charac-
+ ters ``', `<', `>', `;', `$', `(', `)', `\r' (carriage return), or `\n'
+ (newline) on the command line to prevent ``end run'' attacks. It
+ allows ``||'' and ``&&'' to enable commands like: ``"|exec
+ /usr/local/bin/filter || exit 75"''
+
+ Initial pathnames on programs are stripped, so forwarding to
+ ``/usr/ucb/vacation'', ``/usr/bin/vacation'',
+ ``/home/server/mydir/bin/vacation'', and ``vacation'' all actually for-
+ ward to ``/usr/adm/sm.bin/vacation''.
+
+ System administrators should be conservative about populating the
+ sm.bin directory. For example, a reasonable additions is _v_a_c_a_t_i_o_n(1),
+ and the like. No matter how brow-beaten you may be, never include any
+ shell or shell-like program (such as _p_e_r_l(1)) in the sm.bin directory.
+ Note that this does not restrict the use of shell or perl scripts in
+ the sm.bin directory (using the ``#!'' syntax); it simply disallows
+ execution of arbitrary programs. Also, including mail filtering pro-
+ grams such as _p_r_o_c_m_a_i_l(1) is a very bad idea. _p_r_o_c_m_a_i_l(1) allows users
+ to run arbitrary programs in their _p_r_o_c_m_a_i_l_r_c(5).
CCOOMMPPIILLAATTIIOONN
- Compilation should be trivial on most systems. You may
- need to use -DSMRSH_PATH=\"_p_a_t_h\" to adjust the default
- search path (defaults to ``/bin:/usr/bin:/usr/ucb'')
- and/or -DSMRSH_CMDDIR=\"_d_i_r\" to change the default pro-
- gram directory (defaults to ``/usr/adm/sm.bin'').
+ Compilation should be trivial on most systems. You may need to use
+ -DSMRSH_PATH=\"_p_a_t_h\" to adjust the default search path (defaults to
+ ``/bin:/usr/bin:/usr/ucb'') and/or -DSMRSH_CMDDIR=\"_d_i_r\" to change the
+ default program directory (defaults to ``/usr/adm/sm.bin'').
FFIILLEESS
- /usr/adm/sm.bin - directory for restricted programs
+ /usr/adm/sm.bin - default directory for restricted programs on most OSs
-SSEEEE AALLSSOO
- sendmail(8)
+ /var/adm/sm.bin - directory for restricted programs on HP UX and
+ Solaris
+ /usr/libexec/sm.bin - directory for restricted programs on FreeBSD (>=
+ 3.3)
+SSEEEE AALLSSOO
+ sendmail(8)
- Date: 2002/04/25 13:33:40 1
+ Date: 2003/10/07 18:05:37 SMRSH(8)