diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-06-24 03:59:29 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-06-24 03:59:29 +0000 |
commit | 700c63457f17cd807c1f10effadddf89638c8258 (patch) | |
tree | c610339d5a972c74aaab5b63110f916bad0dc0be /gnu/usr.sbin/sendmail/include | |
parent | 42d2671ccee983bc79c99c98837fc58abd068775 (diff) |
Update to sendmail.8.13.0
Diffstat (limited to 'gnu/usr.sbin/sendmail/include')
25 files changed, 369 insertions, 224 deletions
diff --git a/gnu/usr.sbin/sendmail/include/libmilter/mfapi.h b/gnu/usr.sbin/sendmail/include/libmilter/mfapi.h index a385012566e..957726f4168 100644 --- a/gnu/usr.sbin/sendmail/include/libmilter/mfapi.h +++ b/gnu/usr.sbin/sendmail/include/libmilter/mfapi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2004 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. * * - * $Sendmail: mfapi.h,v 8.44.2.4 2003/10/20 21:51:49 msk Exp $ + * $Sendmail: mfapi.h,v 8.58 2004/04/29 18:04:48 gshapiro Exp $ */ /* @@ -17,14 +17,23 @@ #ifndef _LIBMILTER_MFAPI_H # define _LIBMILTER_MFAPI_H 1 -# include <sys/types.h> +#ifndef SMFI_VERSION +# define SMFI_VERSION 2 /* version number */ +#endif /* ! SMFI_VERSION */ +# include <sys/types.h> # include <sys/socket.h> -# include "libmilter/mfdef.h" + +#include "libmilter/mfdef.h" # define LIBMILTER_API extern +/* Only need to export C interface if used by C++ source code */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #ifndef _SOCK_ADDR # define _SOCK_ADDR struct sockaddr #endif /* ! _SOCK_ADDR */ @@ -66,6 +75,19 @@ typedef int sfsistat; # endif /* __STDC__ */ #endif /* __P */ +#if SM_CONF_STDBOOL_H +# include <stdbool.h> +#else /* SM_CONF_STDBOOL_H */ +# ifndef __cplusplus +# ifndef bool +# ifndef __bool_true_false_are_defined +typedef int bool; +# define __bool_true_false_are_defined 1 +# endif /* ! __bool_true_false_are_defined */ +# endif /* bool */ +# endif /* ! __cplusplus */ +#endif /* SM_CONF_STDBOOL_H */ + /* ** structure describing one milter */ @@ -105,11 +127,19 @@ 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 */ + +#if SMFI_VERSION > 3 + /* any unrecognized or unimplemented command filter */ + sfsistat (*xxfi_data) SM__P((SMFICTX *)); +#endif /* SMFI_VERSION > 3 */ }; -#if _FFR_SMFI_OPENSOCKET LIBMILTER_API int smfi_opensocket __P((bool)); -#endif /* _FFR_SMFI_OPENSOCKET */ LIBMILTER_API int smfi_register __P((struct smfiDesc)); LIBMILTER_API int smfi_main __P((void)); LIBMILTER_API int smfi_setbacklog __P((int)); @@ -118,8 +148,6 @@ LIBMILTER_API int smfi_settimeout __P((int)); LIBMILTER_API int smfi_setconn __P((char *)); LIBMILTER_API int smfi_stop __P((void)); -#define SMFI_VERSION 2 /* version number */ - /* ** What the filter might do -- values to be ORed together for ** smfiDesc.xxfi_flags. @@ -132,9 +160,7 @@ LIBMILTER_API int smfi_stop __P((void)); #define SMFIF_ADDRCPT 0x00000004L /* filter may add recipients */ #define SMFIF_DELRCPT 0x00000008L /* filter may delete recipients */ #define SMFIF_CHGHDRS 0x00000010L /* filter may change/delete headers */ -#if _FFR_QUARANTINE -# define SMFIF_QUARANTINE 0x00000020L /* filter may quarantine envelope */ -#endif /* _FFR_QUARANTINE */ +#define SMFIF_QUARANTINE 0x00000020L /* filter may quarantine envelope */ /* ** Continue processing message/connection. @@ -230,6 +256,16 @@ extern sfsistat xxfi_envrcpt __P((SMFICTX *, char **)); ** Later arguments are the ESMTP arguments. */ +/* unknown command filter */ + +extern sfsistat *xxfi_unknown __P((SMFICTX *, char *)); + +/* +** xxfi_unknown(ctx, arg) Invoked when SMTP command is not recognized or not +** implemented. +** char *arg; Null-terminated SMTP command +*/ + /* header filter */ extern sfsistat xxfi_header __P((SMFICTX *, char *, char *)); @@ -311,14 +347,12 @@ LIBMILTER_API char * smfi_getsymval __P((SMFICTX *, char *)); LIBMILTER_API int smfi_setreply __P((SMFICTX *, char *, char *, char *)); -#if _FFR_MULTILINE /* ** Alternatively, smfi_setmlreply can be called if a multi-line SMTP reply ** is needed. */ LIBMILTER_API int smfi_setmlreply __P((SMFICTX *, const char *, const char *, ...)); -#endif /* _FFR_MULTILINE */ /* ** Set the specific reply code to be used in response to the active @@ -342,10 +376,9 @@ LIBMILTER_API int smfi_setmlreply __P((SMFICTX *, const char *, const char *, .. LIBMILTER_API int smfi_addheader __P((SMFICTX *, char *, char *)); /* -** Add a header to the message. This header is not passed to other -** filters. It is not checked for standards compliance; the mail filter -** must ensure that no protocols are violated as a result of adding this -** header. +** Add a header to the message. It is not checked for standards +** compliance; the mail filter must ensure that no protocols are violated +** as a result of adding this header. ** ** SMFICTX *ctx; Opaque context structure ** char *headerf; Header field name @@ -365,6 +398,19 @@ LIBMILTER_API int smfi_chgheader __P((SMFICTX *, char *, int, char *)); ** char *headerv; New header field value (empty for delete header) */ +LIBMILTER_API int smfi_insheader __P((SMFICTX *, int, char *, char *)); + +/* +** Insert a header into the message. It is not checked for standards +** compliance; the mail filter must ensure that no protocols are violated +** as a result of adding this header. +** +** SMFICTX *ctx; Opaque context structure +** int idx; index into the header list where the insertion should happen +** char *headerh; Header field name +** char *headerv; Header field value +*/ + LIBMILTER_API int smfi_addrcpt __P((SMFICTX *, char *)); /* @@ -413,7 +459,6 @@ LIBMILTER_API int smfi_replacebody __P((SMFICTX *, unsigned char *, int)); ** xxfi_abort is called. This can be used to reset state. */ -#if _FFR_QUARANTINE /* ** Quarantine an envelope ** @@ -422,7 +467,6 @@ LIBMILTER_API int smfi_replacebody __P((SMFICTX *, unsigned char *, int)); */ LIBMILTER_API int smfi_quarantine __P((SMFICTX *ctx, char *reason)); -#endif /* _FFR_QUARANTINE */ /* ** Connection-private data (specific to an SMTP connection) can be @@ -441,5 +485,8 @@ LIBMILTER_API int smfi_setpriv __P((SMFICTX *, void *)); LIBMILTER_API void *smfi_getpriv __P((SMFICTX *)); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* ! _LIBMILTER_MFAPI_H */ diff --git a/gnu/usr.sbin/sendmail/include/libmilter/mfdef.h b/gnu/usr.sbin/sendmail/include/libmilter/mfdef.h index 6d15611b238..faca3ecdc70 100644 --- a/gnu/usr.sbin/sendmail/include/libmilter/mfdef.h +++ b/gnu/usr.sbin/sendmail/include/libmilter/mfdef.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2004 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. * * - * $Sendmail: mfdef.h,v 8.11.2.1 2002/11/11 23:22:28 ca Exp $ + * $Sendmail: mfdef.h,v 8.20 2004/06/16 17:45:49 ca Exp $ */ /* @@ -24,11 +24,7 @@ /* These apply to SMFIF_* flags */ #define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */ -#if _FFR_QUARANTINE -# define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */ -#else /* _FFR_QUARANTINE */ -# define SMFI_V2_ACTS 0x0000001FL /* The actions of V2 filter */ -#endif /* _FFR_QUARANTINE */ +#define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */ #define SMFI_CURR_ACTS SMFI_V2_ACTS /* The current version */ /* address families */ @@ -50,6 +46,12 @@ # 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 */ /* actions (replies) */ # define SMFIR_ADDRCPT '+' /* add recipient */ @@ -62,14 +64,11 @@ # define SMFIR_PROGRESS 'p' /* progress */ # define SMFIR_REJECT 'r' /* reject */ # define SMFIR_TEMPFAIL 't' /* tempfail */ -# if _FFR_MILTER_421 -# define SMFIR_SHUTDOWN '4' /* 421: shutdown (internal to MTA) */ -# endif /* _FFR_MILTER_421 */ +# 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 */ -# if _FFR_QUARANTINE -# define SMFIR_QUARANTINE 'q' /* quarantine */ -# endif /* _FFR_QUARANTINE */ +# define SMFIR_QUARANTINE 'q' /* quarantine */ /* What the MTA can send/filter wants in protocol */ # define SMFIP_NOCONNECT 0x00000001L /* MTA should not send connect info */ @@ -79,9 +78,16 @@ # 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 SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */ # define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */ -# define SMFI_CURR_PROT SMFI_V2_PROT /* The current version */ +# 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 */ #endif /* !_LIBMILTER_MFDEF_H */ diff --git a/gnu/usr.sbin/sendmail/include/libmilter/milter.h b/gnu/usr.sbin/sendmail/include/libmilter/milter.h index 832096de886..e7d5eb0249a 100644 --- a/gnu/usr.sbin/sendmail/include/libmilter/milter.h +++ b/gnu/usr.sbin/sendmail/include/libmilter/milter.h @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Sendmail: milter.h,v 8.37.2.3 2003/12/02 00:19:51 msk Exp $ + * $Sendmail: milter.h,v 8.39 2003/12/02 00:21:42 msk Exp $ */ /* @@ -25,11 +25,7 @@ typedef pthread_t sthread_t; typedef int socket_t; -#if _FFR_MILTER_MACROS_EOM # define MAX_MACROS_ENTRIES 5 /* max size of macro pointer array */ -#else /* _FFR_MILTER_MACROS_EOM */ -# define MAX_MACROS_ENTRIES 4 /* max size of macro pointer array */ -#endif /* _FFR_MILTER_MACROS_EOM */ /* ** context for milter diff --git a/gnu/usr.sbin/sendmail/include/libsmdb/smdb.h b/gnu/usr.sbin/sendmail/include/libsmdb/smdb.h index 6a80a9880e1..9daad95f7cf 100644 --- a/gnu/usr.sbin/sendmail/include/libsmdb/smdb.h +++ b/gnu/usr.sbin/sendmail/include/libsmdb/smdb.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: smdb.h,v 8.40.2.1 2002/10/05 17:04:51 ca Exp $ + * $Sendmail: smdb.h,v 8.41 2002/09/24 19:53:28 ca Exp $ * */ diff --git a/gnu/usr.sbin/sendmail/include/sendmail/mailstats.h b/gnu/usr.sbin/sendmail/include/sendmail/mailstats.h index 86650481f8b..e29c9c62e28 100644 --- a/gnu/usr.sbin/sendmail/include/sendmail/mailstats.h +++ b/gnu/usr.sbin/sendmail/include/sendmail/mailstats.h @@ -10,14 +10,10 @@ * the sendmail distribution. * * - * $Sendmail: mailstats.h,v 8.18 2001/11/21 13:39:10 gshapiro Exp $ + * $Sendmail: mailstats.h,v 8.19 2002/06/27 22:47:22 gshapiro Exp $ */ -#if _FFR_QUARANTINE -# define STAT_VERSION 4 -#else /* _FFR_QUARANTINE */ -# define STAT_VERSION 3 -#endif /* _FFR_QUARANTINE */ +#define STAT_VERSION 4 #define STAT_MAGIC 0x1B1DE /* @@ -39,7 +35,5 @@ struct statistics long stat_bt[MAXMAILERS]; /* kbytes to each mailer */ long stat_nr[MAXMAILERS]; /* # rejects by each mailer */ long stat_nd[MAXMAILERS]; /* # discards by each mailer */ -#if _FFR_QUARANTINE long stat_nq[MAXMAILERS]; /* # quarantines by each mailer */ -#endif /* _FFR_QUARANTINE */ }; diff --git a/gnu/usr.sbin/sendmail/include/sendmail/sendmail.h b/gnu/usr.sbin/sendmail/include/sendmail/sendmail.h index 9f8435d102b..d5d5d5ca5d5 100644 --- a/gnu/usr.sbin/sendmail/include/sendmail/sendmail.h +++ b/gnu/usr.sbin/sendmail/include/sendmail/sendmail.h @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Sendmail: sendmail.h,v 8.67 2001/09/08 01:20:57 gshapiro Exp $ + * $Sendmail: sendmail.h,v 8.68 2002/07/01 22:18:53 gshapiro Exp $ */ /* @@ -55,6 +55,7 @@ #define SFF_NOWRFILES 0x00010000L /* disallow o readable files */ #define SFF_NOTEXCL 0x00020000L /* creates don't need to be exclusive */ #define SFF_EXECOK 0x00040000L /* executable files are ok (E_SM_ISEXEC) */ +#define SFF_NBLOCK 0x00080000L /* use a non-blocking lock */ #define SFF_NORFILES (SFF_NOGRFILES|SFF_NOWRFILES) /* pseudo-flags */ diff --git a/gnu/usr.sbin/sendmail/include/sm/bdb.h b/gnu/usr.sbin/sendmail/include/sm/bdb.h index 4e11672adb3..b2d77b9dbef 100644 --- a/gnu/usr.sbin/sendmail/include/sm/bdb.h +++ b/gnu/usr.sbin/sendmail/include/sm/bdb.h @@ -7,7 +7,7 @@ * the sendmail distribution. * * - * $Sendmail: bdb.h,v 1.1.2.4 2003/03/06 16:27:38 ca Exp $ + * $Sendmail: bdb.h,v 1.4 2003/03/06 16:30:05 ca Exp $ */ #ifndef SM_BDB_H diff --git a/gnu/usr.sbin/sendmail/include/sm/cdefs.h b/gnu/usr.sbin/sendmail/include/sm/cdefs.h index 76a95e84670..15d578be9cc 100644 --- a/gnu/usr.sbin/sendmail/include/sm/cdefs.h +++ b/gnu/usr.sbin/sendmail/include/sm/cdefs.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: cdefs.h,v 1.15.2.1 2003/12/05 22:44:17 ca Exp $ + * $Sendmail: cdefs.h,v 1.16 2003/12/05 22:45:25 ca Exp $ */ /* diff --git a/gnu/usr.sbin/sendmail/include/sm/conf.h b/gnu/usr.sbin/sendmail/include/sm/conf.h index 15158df10b6..e723e45a5d1 100644 --- a/gnu/usr.sbin/sendmail/include/sm/conf.h +++ b/gnu/usr.sbin/sendmail/include/sm/conf.h @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Sendmail: conf.h,v 1.90.2.20 2004/01/07 00:52:16 ca Exp $ + * $Sendmail: conf.h,v 1.115 2004/06/07 23:53:43 ca Exp $ */ /* @@ -436,6 +436,8 @@ typedef int pid_t; # endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */ # if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) # define HASURANDOMDEV 1 /* /dev/[u]random added in S9 */ +# define HASCLOSEFROM 1 /* closefrom(3c) added in S9 */ +# define HASFDWALK 1 /* fdwalk(3c) added in S9 */ # endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */ # if SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) # define HASUNSETENV 1 /* unsetenv() added in S10 */ @@ -481,7 +483,7 @@ extern char *getenv(); # else /* SUNOS403 */ /* 4.1.x specifics */ -# define HASSETSID 1 /* has Posix setsid(2) call */ +# define HASSETSID 1 /* has POSIX setsid(2) call */ # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ # endif /* SUNOS403 */ @@ -510,7 +512,7 @@ extern char *getenv(); # define LA_TYPE LA_DGUX # define HASSETREUID 1 /* has setreuid(2) call */ # define HASUNAME 1 /* use System V uname(2) system call */ -# define HASSETSID 1 /* has Posix setsid(2) call */ +# define HASSETSID 1 /* has POSIX setsid(2) call */ # define HASINITGROUPS 1 /* has initgroups(3) call */ # define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */ # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ @@ -714,8 +716,7 @@ typedef int pid_t; # endif /* NeXT */ /* -** Apple Darwin (aka Rhapsody) -** +** Apple Darwin ** Contributed by Wilfredo Sanchez <wsanchez@mit.edu> */ @@ -725,7 +726,7 @@ 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 the setsid(2) */ +# 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 */ @@ -794,7 +795,7 @@ extern unsigned int sleepX __P((unsigned int seconds)); # include <paths.h> # define HASUNSETENV 1 /* has the unsetenv(3) call */ # define HASSETREUID 0 /* BSD-OS has broken setreuid(2) emulation */ -# define HASSETSID 1 /* has the setsid(2) POSIX syscall */ +# define HASSETSID 1 /* has POSIX setsid(2) call */ # define USESETEUID 1 /* has usable seteuid(2) call */ # define HASFCHMOD 1 /* has fchmod(2) syscall */ # define HASSETLOGIN 1 /* has setlogin(2) */ @@ -842,7 +843,7 @@ extern unsigned int sleepX __P((unsigned int seconds)); # include <unix.h> # include <sys/select.h> # undef NGROUPS_MAX -# define HASSETSID 1 /* has the setsid(2) POSIX syscall */ +# 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 */ @@ -876,10 +877,10 @@ extern unsigned int sleepX __P((unsigned int seconds)); # if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # include <paths.h> # define HASUNSETENV 1 /* has unsetenv(3) call */ -# define HASSETSID 1 /* has the setsid(2) POSIX syscall */ +# 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 /* fchown(2) */ +# define HASFCHOWN 1 /* has fchown(2) syscall */ # define HASUNAME 1 /* has uname(2) syscall */ # define HASSTRERROR 1 /* has strerror(3) */ # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ @@ -894,7 +895,12 @@ extern unsigned int sleepX __P((unsigned int seconds)); # ifndef LA_TYPE # define LA_TYPE LA_SUBR # endif /* ! LA_TYPE */ -# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ +# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200040000 +# undef SFS_TYPE +# define SFS_TYPE SFS_STATVFS +# else +# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ +# endif # if defined(__NetBSD__) && (NetBSD > 199307 || NetBSD0_9 > 1) # undef SPT_TYPE # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ @@ -902,6 +908,9 @@ extern unsigned int sleepX __P((unsigned int seconds)); # if defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3)) # define HASURANDOMDEV 1 /* has /dev/urandom(4) */ # endif /* defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3)) */ +# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104170000 +# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */ +# endif # if defined(__FreeBSD__) # define HASSETLOGIN 1 /* has setlogin(2) */ # if __FreeBSD_version >= 227001 @@ -949,6 +958,9 @@ extern unsigned int sleepX __P((unsigned int seconds)); # if OpenBSD >= 200012 # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */ # endif /* OpenBSD >= 200012 */ +# if OpenBSD >= 200405 +# define HASCLOSEFROM 1 /* closefrom(3) added in 3.5 */ +# endif /* OpenBSD >= 200405 */ # endif /* defined(__OpenBSD__) */ # endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */ @@ -1365,7 +1377,11 @@ extern void *malloc(); # if LINUX_VERSION_CODE < 66399 # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ # else /* LINUX_VERSION_CODE < 66399 */ -# define HASFLOCK 1 /* flock(2) fixed after 1.3.95 */ +# if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) +# define HASFLOCK 1 /* flock(2) fixed after 1.3.95 */ +# else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) */ +# define HASFLOCK 0 /* flock(2) is broken (again) after 2.4.0 */ +# endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) */ # endif /* LINUX_VERSION_CODE < 66399 */ # endif /* ! HASFLOCK */ # ifndef LA_TYPE @@ -1379,9 +1395,7 @@ extern void *malloc(); # endif /* ! HASURANDOMDEV */ # endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0)) */ # if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -# ifndef HASSTRERROR -# define HASSTRERROR 1 /* has strerror(3) */ -# endif /* HASSTRERROR */ +# define HASSTRERROR 1 /* has strerror(3) */ # endif /* defined(__GLIBC__) && defined(__GLIBC_MINOR__) */ # ifndef TZ_TYPE # define TZ_TYPE TZ_NONE /* no standard for Linux */ @@ -1600,22 +1614,66 @@ typedef int pid_t; # endif /* ! _PATH_SENDMAILPID */ # endif /* _SEQUENT_ */ - /* -** Cray Unicos +** Cray UNICOS, UNICOS/mk, and UNICOS/mp ** +** UNICOS: ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> +** Update Brian Ginsbach <ginsbach@cray.com> +** UNICOS/mk (Cray T3E): +** Contributed by Manu Mahonen <mailadm@csc.fi> +** of Center for Scientific Computing. +** Update Brian Ginsbach <ginsbach@cray.com> +** UNICOS/mp: +** From Aaron Davis <awd@cray.com> & Brian Ginsbach <ginsbach@cray.com> */ -# ifdef UNICOS +# if defined(_CRAY) || defined(UNICOS) || defined(_UNICOSMP) # define SYSTEM5 1 /* include all the System V defines */ -# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ -# define MAXPATHLEN PATHSIZE -# define LA_TYPE LA_ZERO +# define HASFCHMOD 1 /* has fchmod(2) syscall */ +# define HASFCHOWN 1 /* has fchown(2) */ +# define HASUNSETENV 1 /* has unsetenv(3) call */ +# define HASINITGROUPS 1 /* has initgroups(3) call */ +# define HASSETREUID 1 /* has setreuid(2) call */ +# define USESETEUID 1 /* has usable seteuid(2) call */ +# define HASGETDTABLESIZE 1 /* has getdtablesize(2) syscall */ +# define HASSTRERROR 1 /* has strerror(3) */ +# define GIDSET_T gid_t # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ -# define SFS_BAVAIL f_bfree /* alternate field name */ -# endif /* UNICOS */ - +# define SFS_BAVAIL f_bfree /* alternate field name */ +# define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */ +# ifdef UNICOS +# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ +# define LA_TYPE LA_ZERO +# define _PATH_MAILDIR "/usr/spool/mail" +# define GET_IPOPT_DST(dst) *(struct in_addr *)&(dst) +# ifndef MAXPATHLEN +# define MAXPATHLEN PATHSIZE +# endif /* ! MAXPATHLEN */ +# ifndef _PATH_UNIX +# ifdef UNICOSMK +# define _PATH_UNIX "/unicosmk.ar" +# else +# define _PATH_UNIX "/unicos" +# endif /* UNICOSMK */ +# endif /* ! _PATH_UNIX */ +# ifndef _PATH_VENDOR_CF +# define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" +# endif /* ! _PATH_VENDOR_CF */ +# endif /* UNICOS */ +# ifdef _UNICOSMP +# if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN) + /* _SC_NPROC_ONLN is 'mpadmin -u', total # of unrestricted processors */ +# define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN +# endif /* if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN) */ +# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ +# define HASSETRLIMIT 1 /* has setrlimit(2) syscall */ +# define LA_TYPE LA_IRIX6 /* figure out at run time */ +# include <sys/cdefs.h> +# include <paths.h> +# define ARGV_T char *const * +# endif /* _UNICOSMP */ +# endif /* _CRAY */ /* ** Apollo DomainOS @@ -1731,7 +1789,7 @@ extern struct passwd * sendmail_mpe_getpwuid __P((uid_t)); # define __svr4__ # define SYS5SIGNALS 1 # define HASFCHOWN 1 /* has fchown(2) call */ -# define HASSETSID 1 +# define HASSETSID 1 /* has POSIX setsid(2) call */ # define HASSETREUID 1 # define HASWAITPID 1 # define HASGETDTABLESIZE 1 @@ -1781,7 +1839,7 @@ extern struct passwd * sendmail_mpe_getpwuid __P((uid_t)); # define SYSTEM5 1 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ # define HASSETREUID 1 -# define HASSETSID 1 +# define HASSETSID 1 /* has POSIX setsid(2) call */ # define HASINITGROUPS 1 # define GIDSET_T gid_t # define SLEEP_T unsigned @@ -2003,7 +2061,7 @@ typedef int (*sigfunc_t)(); # ifndef __svr4__ # define __svr4__ /* use all System V Release 4 defines below */ # endif /* ! __svr4__ */ -# define HASSETSID 1 /* has Posix setsid(2) call */ +# define HASSETSID 1 /* has POSIX setsid(2) call */ # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ # ifndef SPT_TYPE @@ -2082,7 +2140,7 @@ extern char *getenv(); # define __svr4__ /* use all System V Release 4 defines below */ # endif /* ! __svr4__ */ # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ -# define HASSETSID 1 /* has Posix setsid(2) call */ +# define HASSETSID 1 /* has POSIX setsid(2) call */ # define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */ # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ # define GIDSET_T gid_t @@ -2204,19 +2262,6 @@ typedef struct msgb mblk_t; # define SM_INT32 int /* 32bit integer */ # endif /* sinix */ -/* -** CRAY T3E -** -** Contributed by Manu Mahonen <mailadm@csc.fi> -** of Center for Scientific Computing. -*/ -# ifdef _CRAY -# define GET_IPOPT_DST(dst) *(struct in_addr *)&(dst) -# define _PATH_MAILDIR "/usr/spool/mail" -# if !defined(MAXPATHLEN) -# define MAXPATHLEN PATHSIZE -# endif /* !defined(MAXPATHLEN) */ -# endif /* _CRAY */ /* ** Motorola 922, MC88110, UNIX SYSTEM V/88 Release 4.0 Version 4.3 @@ -2227,7 +2272,7 @@ typedef struct msgb mblk_t; # ifdef MOTO # define HASFCHMOD 1 # define HASSETRLIMIT 0 -# define HASSETSID 1 +# define HASSETSID 1 /* has POSIX setsid(2) call */ # define HASSETREUID 1 # define HASULIMIT 1 # define HASWAITPID 1 @@ -2257,8 +2302,13 @@ typedef struct msgb mblk_t; # undef HAVE_SYS_ERRLIST # define sys_errlist __sys_errlist # define sys_nerr __sys_nerr -# define major(dev) ((int)(((dev) >> 8) & 0xff)) -# define minor(dev) ((int)((dev) & 0xff)) +# include <sys/mkdev.h> +# ifndef major +# define major(dev) ((int)(((dev) >> 8) & 0xff)) +# endif /* ! major */ +# ifndef minor +# define minor(dev) ((int)((dev) & 0xff)) +# endif /* ! minor */ # endif /* defined(__INTERIX) */ @@ -2359,8 +2409,8 @@ typedef struct msgb mblk_t; /* general POSIX defines */ # ifdef _POSIX_VERSION -# define HASSETSID 1 /* has Posix setsid(2) call */ -# define HASWAITPID 1 /* has Posix waitpid(2) call */ +# define HASSETSID 1 /* has POSIX setsid(2) call */ +# define HASWAITPID 1 /* has POSIX waitpid(2) call */ # if _POSIX_VERSION >= 199500 && !defined(USESETEUID) # define USESETEUID 1 /* has usable seteuid(2) call */ # endif /* _POSIX_VERSION >= 199500 && !defined(USESETEUID) */ @@ -2578,7 +2628,7 @@ typedef struct msgb mblk_t; #endif /* ! EX_NOTFOUND */ /* pseudo-code used for mci_setstat */ -# define EX_NOTSTICKY -5 /* don't save persistent status */ +# define EX_NOTSTICKY (-5) /* don't save persistent status */ /* diff --git a/gnu/usr.sbin/sendmail/include/sm/config.h b/gnu/usr.sbin/sendmail/include/sm/config.h index c6332d3c9a8..02405bdce3f 100644 --- a/gnu/usr.sbin/sendmail/include/sm/config.h +++ b/gnu/usr.sbin/sendmail/include/sm/config.h @@ -1,12 +1,12 @@ /* - * Copyright (c) 2000-2001 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. * - * $Sendmail: config.h,v 1.44 2002/01/23 17:47:15 gshapiro Exp $ + * $Sendmail: config.h,v 1.46 2003/12/10 03:19:06 gshapiro Exp $ */ /* @@ -143,8 +143,12 @@ # define SM_CONF_TEST_LLONG 1 # endif /* !SM_CONF_TEST_LLONG */ -/* Does LDAP library have ldap_memfree()? */ -# ifndef SM_CONF_LDAP_MEMFREE +/* LDAP Checks */ +# if LDAPMAP +# include <ldap.h> + +/* Does the LDAP library have ldap_memfree()? */ +# ifndef SM_CONF_LDAP_MEMFREE /* ** The new LDAP C API (draft-ietf-ldapext-ldap-c-api-04.txt) includes @@ -152,11 +156,31 @@ ** of 2004 to identify the API. */ -# if USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 -# define SM_CONF_LDAP_MEMFREE 1 -# else /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */ -# define SM_CONF_LDAP_MEMFREE 0 -# endif /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */ -# endif /* ! SM_CONF_LDAP_MEMFREE */ +# if USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 +# define SM_CONF_LDAP_MEMFREE 1 +# else /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */ +# define SM_CONF_LDAP_MEMFREE 0 +# endif /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */ +# endif /* ! SM_CONF_LDAP_MEMFREE */ + +/* Does the LDAP library have ldap_initialize()? */ +# ifndef SM_CONF_LDAP_INITIALIZE + +/* +** Check for ldap_initialize() support for support for LDAP URI's with +** non-ldap:// schemes. +*/ + +/* OpenLDAP does it with LDAP_OPT_URI */ +# ifdef LDAP_OPT_URI +# define SM_CONF_LDAP_INITIALIZE 1 +# endif /* LDAP_OPT_URI */ +# endif /* !SM_CONF_LDAP_INITIALIZE */ +# endif /* LDAPMAP */ + +/* don't use strcpy() */ +# ifndef DO_NOT_USE_STRCPY +# define DO_NOT_USE_STRCPY 1 +# endif /* ! DO_NOT_USE_STRCPY */ #endif /* ! SM_CONFIG_H */ diff --git a/gnu/usr.sbin/sendmail/include/sm/debug.h b/gnu/usr.sbin/sendmail/include/sm/debug.h index 62b5dfbaae1..f4e52ccdb65 100644 --- a/gnu/usr.sbin/sendmail/include/sm/debug.h +++ b/gnu/usr.sbin/sendmail/include/sm/debug.h @@ -1,12 +1,12 @@ /* - * 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. * - * $Sendmail: debug.h,v 1.15 2001/03/08 03:23:07 ca Exp $ + * $Sendmail: debug.h,v 1.16 2003/01/10 00:26:06 ca Exp $ */ /* @@ -28,29 +28,26 @@ extern SM_FILE_T * sm_debug_file __P((void)); extern void -sm_debug_setfile __P(( - SM_FILE_T *)); +sm_debug_setfile __P(( SM_FILE_T *)); extern void PRINTFLIKE(1, 2) -sm_dprintf __P(( - char *_fmt, - ...)); +sm_dprintf __P((char *_fmt, ...)); extern void sm_dflush __P((void)); +extern void +sm_debug_close __P((void)); + /* ** abstractions for setting and testing debug activation levels */ extern void -sm_debug_addsettings_x __P(( - const char *)); +sm_debug_addsettings_x __P((const char *)); extern void -sm_debug_addsetting_x __P(( - const char *, - int)); +sm_debug_addsetting_x __P((const char *, int)); # define SM_DEBUG_UNKNOWN ((SM_ATOMIC_UINT_T)(-1)) @@ -123,13 +120,10 @@ struct sm_debug # endif /* SM_DEBUG_CHECK */ extern bool -sm_debug_loadactive __P(( - SM_DEBUG_T *, - int)); +sm_debug_loadactive __P((SM_DEBUG_T *, int)); extern int -sm_debug_loadlevel __P(( - SM_DEBUG_T *)); +sm_debug_loadlevel __P((SM_DEBUG_T *)); # define SM_DEBUG_INITIALIZER(name, desc) { \ SmDebugMagic, \ diff --git a/gnu/usr.sbin/sendmail/include/sm/errstring.h b/gnu/usr.sbin/sendmail/include/sm/errstring.h index 826557bf065..a2219123618 100644 --- a/gnu/usr.sbin/sendmail/include/sm/errstring.h +++ b/gnu/usr.sbin/sendmail/include/sm/errstring.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: errstring.h,v 1.4.4.3 2003/06/24 17:16:10 ca Exp $ + * $Sendmail: errstring.h,v 1.9 2003/12/10 03:19:06 gshapiro Exp $ */ /* @@ -17,7 +17,9 @@ # define SM_ERRSTRING_H #include <errno.h> +#if NEEDINTERRNO extern int errno; +#endif /* NEEDINTERRNO */ /* ** These are used in a few cases where we need some special @@ -44,6 +46,7 @@ extern int errno; #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ #define E_SMDBBASE (E_PSEUDOBASE + 40) /* base for libsmdb errors */ #define E_LDAPBASE (E_PSEUDOBASE + 70) /* base for LDAP errors */ +#define E_LDAPURLBASE (E_PSEUDOBASE + 200) /* base for LDAP URL errors */ /* libsmdb */ diff --git a/gnu/usr.sbin/sendmail/include/sm/fdset.h b/gnu/usr.sbin/sendmail/include/sm/fdset.h index a29e66eaa5a..e385618b199 100644 --- a/gnu/usr.sbin/sendmail/include/sm/fdset.h +++ b/gnu/usr.sbin/sendmail/include/sm/fdset.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: fdset.h,v 1.3.10.2 2002/12/10 04:02:25 ca Exp $ + * $Sendmail: fdset.h,v 1.5 2002/12/10 19:48:19 ca Exp $ */ #ifndef SM_FDSET_H diff --git a/gnu/usr.sbin/sendmail/include/sm/gen.h b/gnu/usr.sbin/sendmail/include/sm/gen.h index 104c8188a4b..d42a33e5caf 100644 --- a/gnu/usr.sbin/sendmail/include/sm/gen.h +++ b/gnu/usr.sbin/sendmail/include/sm/gen.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: gen.h,v 1.22 2002/04/03 00:40:42 ca Exp $ + * $Sendmail: gen.h,v 1.23 2003/11/04 18:51:54 ca Exp $ */ /* @@ -43,7 +43,7 @@ # else /* SM_CONF_STDDEF_H */ # ifndef NULL # define NULL 0 -# endif +# endif /* ! NULL */ # define offsetof(type, member) ((size_t)(&((type *)0)->member)) # endif /* SM_CONF_STDDEF_H */ @@ -58,7 +58,8 @@ typedef int bool; # define false 0 # define true 1 -# endif +# define __bool_true_false_are_defined 1 +# endif /* ! __cplusplus */ # endif /* SM_CONF_STDBOOL_H */ /* diff --git a/gnu/usr.sbin/sendmail/include/sm/io.h b/gnu/usr.sbin/sendmail/include/sm/io.h index 14ba5bbedae..db56fba432a 100644 --- a/gnu/usr.sbin/sendmail/include/sm/io.h +++ b/gnu/usr.sbin/sendmail/include/sm/io.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1990 * The Regents of the University of California. All rights reserved. @@ -11,7 +11,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: io.h,v 1.23.2.2 2003/09/05 20:35:28 ca Exp $ + * $Sendmail: io.h,v 1.24 2004/03/03 19:14:49 ca Exp $ */ /*- @@ -34,15 +34,15 @@ #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_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_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) +#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 diff --git a/gnu/usr.sbin/sendmail/include/sm/ldap.h b/gnu/usr.sbin/sendmail/include/sm/ldap.h index 1b8f1ca1728..0290911f6fd 100644 --- a/gnu/usr.sbin/sendmail/include/sm/ldap.h +++ b/gnu/usr.sbin/sendmail/include/sm/ldap.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: ldap.h,v 1.22 2002/03/05 02:17:26 ca Exp $ + * $Sendmail: ldap.h,v 1.27 2003/12/20 09:23:47 gshapiro Exp $ */ #ifndef SM_LDAP_H @@ -32,34 +32,26 @@ # if LDAPMAP -# if _FFR_LDAP_RECURSION - /* Attribute types */ -# define SM_LDAP_ATTR_NONE (-1) -# define SM_LDAP_ATTR_OBJCLASS 0 -# define SM_LDAP_ATTR_NORMAL 1 -# define SM_LDAP_ATTR_DN 2 -# define SM_LDAP_ATTR_FILTER 3 -# define SM_LDAP_ATTR_URL 4 +# define SM_LDAP_ATTR_NONE (-1) +# define SM_LDAP_ATTR_OBJCLASS 0 +# define SM_LDAP_ATTR_NORMAL 1 +# define SM_LDAP_ATTR_DN 2 +# define SM_LDAP_ATTR_FILTER 3 +# define SM_LDAP_ATTR_URL 4 /* sm_ldap_results() flags */ -# define SM_LDAP_SINGLEMATCH 0x0001 -# define SM_LDAP_MATCHONLY 0x0002 -# define SM_LDAP_USE_ALLATTR 0x0004 - -# endif /* _FFR_LDAP_RECURSION */ +# define SM_LDAP_SINGLEMATCH 0x0001 +# define SM_LDAP_MATCHONLY 0x0002 +# define SM_LDAP_USE_ALLATTR 0x0004 struct sm_ldap_struct { /* needed for ldap_open or ldap_init */ - char *ldap_target; + char *ldap_uri; + char *ldap_host; int ldap_port; -# if _FFR_LDAP_URI - bool ldap_uri; -# endif /* _FFR_LDAP_URI */ -# if _FFR_LDAP_SETVERSION int ldap_version; -# endif /* _FFR_LDAP_SETVERSION */ pid_t ldap_pid; /* options set in ld struct before ldap_bind_s */ @@ -79,10 +71,8 @@ struct sm_ldap_struct int ldap_scope; char *ldap_filter; char *ldap_attr[LDAPMAP_MAX_ATTR + 1]; -# if _FFR_LDAP_RECURSION int ldap_attr_type[LDAPMAP_MAX_ATTR + 1]; char *ldap_attr_needobjclass[LDAPMAP_MAX_ATTR + 1]; -# endif /* _FFR_LDAP_RECURSION */ bool ldap_attrsonly; /* args for ldap_result */ @@ -98,11 +88,12 @@ struct sm_ldap_struct typedef struct sm_ldap_struct SM_LDAP_STRUCT; -# if _FFR_LDAP_RECURSION struct sm_ldap_recurse_entry { char *lr_search; int lr_type; + LDAPURLDesc *lr_ludp; + char **lr_attrs; bool lr_done; }; @@ -115,17 +106,14 @@ struct sm_ldap_recurse_list typedef struct sm_ldap_recurse_entry SM_LDAP_RECURSE_ENTRY; typedef struct sm_ldap_recurse_list SM_LDAP_RECURSE_LIST; -# endif /* _FFR_LDAP_RECURSION */ /* functions */ 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 *)); -# if _FFR_LDAP_RECURSION extern int sm_ldap_results __P((SM_LDAP_STRUCT *, int, int, int, SM_RPOOL_T *, char **, int *, int *, SM_LDAP_RECURSE_LIST *)); -# endif /* _FFR_LDAP_RECURSION */ extern void sm_ldap_setopts __P((LDAP *, SM_LDAP_STRUCT *)); extern int sm_ldap_geterrno __P((LDAP *)); extern void sm_ldap_close __P((SM_LDAP_STRUCT *)); diff --git a/gnu/usr.sbin/sendmail/include/sm/os/sm_os_aix.h b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_aix.h index 201ee455591..d66b4f73605 100644 --- a/gnu/usr.sbin/sendmail/include/sm/os/sm_os_aix.h +++ b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_aix.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: sm_os_aix.h,v 1.9.2.1 2003/04/28 23:11:07 ca Exp $ + * $Sendmail: sm_os_aix.h,v 1.11 2003/04/28 23:42:23 ca Exp $ */ /* diff --git a/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicos.h b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicos.h new file mode 100644 index 00000000000..7ba1d873856 --- /dev/null +++ b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicos.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 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. + * + * $Sendmail: sm_os_unicos.h,v 1.1 2003/04/21 17:03:51 ca Exp $ + */ + +/* +** Cray UNICOS +*/ + +#define SM_OS_NAME "unicos" + +#define SM_CONF_LONGLONG 1 +#define SM_CONF_SETITIMER 0 diff --git a/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicosmk.h b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicosmk.h new file mode 100644 index 00000000000..7a583b4142f --- /dev/null +++ b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicosmk.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 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. + * + * $Sendmail: sm_os_unicosmk.h,v 1.1 2003/04/21 17:03:51 ca Exp $ + */ + +/* +** Cray UNICOS/mk +*/ + +#define SM_OS_NAME "unicosmk" + +#define SM_CONF_LONGLONG 1 diff --git a/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicosmp.h b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicosmp.h new file mode 100644 index 00000000000..fe701fca075 --- /dev/null +++ b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unicosmp.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 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. + * + * $Sendmail: sm_os_unicosmp.h,v 1.1 2003/04/21 17:03:51 ca Exp $ + */ + +/* +** Cray UNICOS/mp +*/ + +#define SM_OS_NAME "unicosmp" + +#define SM_CONF_LONGLONG 1 +#define SM_CONF_SYS_CDEFS_H 1 +#define SM_CONF_MSG 1 +#define SM_CONF_SHM 1 +#define SM_CONF_SEM 1 diff --git a/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unixware.h b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unixware.h index 6131022adf0..b7dc5d906c9 100644 --- a/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unixware.h +++ b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_unixware.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: sm_os_unixware.h,v 1.7.2.1 2002/10/24 18:02:14 ca Exp $ + * $Sendmail: sm_os_unixware.h,v 1.8 2002/10/24 18:04:54 ca Exp $ */ #define SM_OS_NAME "unixware" diff --git a/gnu/usr.sbin/sendmail/include/sm/rpool.h b/gnu/usr.sbin/sendmail/include/sm/rpool.h index cf8628fca68..b9d1d7d0f8a 100644 --- a/gnu/usr.sbin/sendmail/include/sm/rpool.h +++ b/gnu/usr.sbin/sendmail/include/sm/rpool.h @@ -1,12 +1,12 @@ /* - * 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. * - * $Sendmail: rpool.h,v 1.15 2001/09/04 22:41:55 ca Exp $ + * $Sendmail: rpool.h,v 1.16 2003/09/05 23:07:49 ca Exp $ */ /* @@ -165,8 +165,12 @@ sm_rpool_malloc __P(( size_t _size)); # endif /* SM_HEAP_CHECK */ +#if DO_NOT_USE_STRCPY +extern char *sm_rpool_strdup_x __P((SM_RPOOL_T *rpool, const char *s)); +#else /* DO_NOT_USE_STRCPY */ # define sm_rpool_strdup_x(rpool, str) \ strcpy(sm_rpool_malloc_x(rpool, strlen(str) + 1), str) +#endif /* DO_NOT_USE_STRCPY */ extern SM_RPOOL_ATTACH_T sm_rpool_attach_x __P(( diff --git a/gnu/usr.sbin/sendmail/include/sm/shm.h b/gnu/usr.sbin/sendmail/include/sm/shm.h index 766e200023d..1270a7ed0b5 100644 --- a/gnu/usr.sbin/sendmail/include/sm/shm.h +++ b/gnu/usr.sbin/sendmail/include/sm/shm.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: shm.h,v 1.8.2.2 2003/05/17 18:34:16 ca Exp $ + * $Sendmail: shm.h,v 1.10 2003/05/17 18:34:54 ca Exp $ */ #ifndef SM_SHM_H diff --git a/gnu/usr.sbin/sendmail/include/sm/string.h b/gnu/usr.sbin/sendmail/include/sm/string.h index 5cf078a1303..508ca1c0a8c 100644 --- a/gnu/usr.sbin/sendmail/include/sm/string.h +++ b/gnu/usr.sbin/sendmail/include/sm/string.h @@ -1,12 +1,12 @@ /* - * 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. * - * $Sendmail: string.h,v 1.36 2001/06/17 21:31:11 ca Exp $ + * $Sendmail: string.h,v 1.38 2003/10/10 17:56:57 ca Exp $ */ /* @@ -24,25 +24,30 @@ #define SPACELEFT(buf, ptr) (sizeof buf - ((ptr) - buf)) extern int PRINTFLIKE(3, 4) -sm_snprintf __P(( - char *, - size_t, - const char *, - ...)); +sm_snprintf __P((char *, size_t, const char *, ...)); extern bool -sm_match __P(( - const char *_str, - const char *_pattern)); +sm_match __P((const char *_str, const char *_pattern)); extern char * -sm_strdup __P(( - char *)); +sm_strdup __P((char *)); extern char * -sm_strndup_x __P(( - const char *_str, - size_t _len)); +sm_strndup_x __P((const char *_str, size_t _len)); + +#if DO_NOT_USE_STRCPY +/* for "normal" data (free'd before end of process) */ +extern char * +sm_strdup_x __P((const char *_str)); + +/* for data that is supposed to be persistent. */ +extern char * +sm_pstrdup_x __P((const char *_str)); + +extern char * +sm_strdup_tagged_x __P((const char *str, char *file, int line, int group)); + +#else /* DO_NOT_USE_STRCPY */ /* for "normal" data (free'd before end of process) */ # define sm_strdup_x(str) strcpy(sm_malloc_x(strlen(str) + 1), str) @@ -52,35 +57,22 @@ sm_strndup_x __P(( # define sm_strdup_tagged_x(str, file, line, group) \ strcpy(sm_malloc_tagged_x(strlen(str) + 1, file, line, group), str) +#endif /* DO_NOT_USE_STRCPY */ extern char * -sm_stringf_x __P(( - const char *_fmt, - ...)); +sm_stringf_x __P((const char *_fmt, ...)); extern char * -sm_vstringf_x __P(( - const char *_fmt, - va_list _ap)); +sm_vstringf_x __P((const char *_fmt, va_list _ap)); extern size_t -sm_strlcpy __P(( - char *_dst, - const char *_src, - ssize_t _len)); +sm_strlcpy __P((char *_dst, const char *_src, ssize_t _len)); extern size_t -sm_strlcat __P(( - char *_dst, - const char *_src, - ssize_t _len)); +sm_strlcat __P((char *_dst, const char *_src, ssize_t _len)); extern size_t -sm_strlcat2 __P(( - char *, - const char *, - const char *, - ssize_t)); +sm_strlcat2 __P((char *, const char *, const char *, ssize_t)); extern size_t #ifdef __STDC__ @@ -94,40 +86,26 @@ sm_strlcpyn __P((char *, # if !HASSTRERROR extern char * -strerror __P(( - int _errno)); +strerror __P((int _errno)); # endif /* !HASSTRERROR */ extern int -sm_strrevcmp __P(( - const char *, - const char *)); +sm_strrevcmp __P((const char *, const char *)); extern int -sm_strrevcasecmp __P(( - const char *, - const char *)); +sm_strrevcasecmp __P((const char *, const char *)); extern int -sm_strcasecmp __P(( - const char *, - const char *)); +sm_strcasecmp __P((const char *, const char *)); extern int -sm_strncasecmp __P(( - const char *, - const char *, - size_t)); +sm_strncasecmp __P((const char *, const char *, size_t)); extern LONGLONG_T -sm_strtoll __P(( - const char *, - char**, int)); +sm_strtoll __P((const char *, char**, int)); extern ULONGLONG_T -sm_strtoull __P(( - const char *, - char**, int)); +sm_strtoull __P((const char *, char**, int)); extern void stripquotes __P((char *)); diff --git a/gnu/usr.sbin/sendmail/include/sm/varargs.h b/gnu/usr.sbin/sendmail/include/sm/varargs.h index 6703fb04716..35cd081ee7a 100644 --- a/gnu/usr.sbin/sendmail/include/sm/varargs.h +++ b/gnu/usr.sbin/sendmail/include/sm/varargs.h @@ -6,7 +6,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Sendmail: varargs.h,v 1.7.2.1 2002/07/29 21:43:20 gshapiro Exp $ + * $Sendmail: varargs.h,v 1.8 2002/07/29 21:31:00 gshapiro Exp $ */ /* |