SCCS-vsn: usr.sbin/sendmail/src/conf.h 5.4
SCCS-vsn: usr.sbin/sendmail/src/conf.c 5.9
SCCS-vsn: usr.sbin/sendmail/src/main.c 5.8
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 5.6
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 5.5
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.24
-static char SccsId[] = "@(#)conf.c 5.8 (Berkeley) %G%";
+static char SccsId[] = "@(#)conf.c 5.9 (Berkeley) %G%";
#endif not lint
# include <pwd.h>
#endif not lint
# include <pwd.h>
** All rights reserved. The Berkeley software License Agreement
** specifies the terms and conditions for redistribution.
**
** All rights reserved. The Berkeley software License Agreement
** specifies the terms and conditions for redistribution.
**
-** @(#)conf.h 5.3 (Berkeley) %G%
+** @(#)conf.h 5.4 (Berkeley) %G%
# define MAXRWSETS 30 /* max # of sets of rewriting rules */
# define MAXPRIORITIES 25 /* max values for Precedence: field */
# define MAXTRUST 30 /* maximum number of trusted users */
# define MAXRWSETS 30 /* max # of sets of rewriting rules */
# define MAXPRIORITIES 25 /* max values for Precedence: field */
# define MAXTRUST 30 /* maximum number of trusted users */
+# define MAXUSERENVIRON 40 /* max # of items in user environ */
/*
** Compilation options.
/*
** Compilation options.
-static char SccsId[] = "@(#)deliver.c 5.5 (Berkeley) %G%";
+static char SccsId[] = "@(#)deliver.c 5.6 (Berkeley) %G%";
#endif not lint
# include <signal.h>
#endif not lint
# include <signal.h>
#endif FIOCLEX
/* try to execute the mailer */
#endif FIOCLEX
/* try to execute the mailer */
- execv(m->m_mailer, pvp);
+ execve(m->m_mailer, pvp, UserEnviron);
#ifdef FIOCLEX
syserr("Cannot exec %s", m->m_mailer);
#ifdef FIOCLEX
syserr("Cannot exec %s", m->m_mailer);
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char SccsId[] = "@(#)main.c 5.7 (Berkeley) %G%";
+static char SccsId[] = "@(#)main.c 5.8 (Berkeley) %G%";
#endif not lint
# define _DEFINE
#endif not lint
# define _DEFINE
extern ADDRESS *recipient();
bool canrename;
extern ADDRESS *recipient();
bool canrename;
-# ifdef SETPROCTITLE
- /*
- ** Save start and extent of argv for setproctitle.
- */
-
- Argv = argv;
- LastArgv = argv[argc - 1] + strlen(argv[argc - 1]);
-# endif SETPROCTITLE
-
/*
** Be sure we have enough file descriptors.
*/
/*
** Be sure we have enough file descriptors.
*/
readconfig = !thaw(FreezeFile);
/* reset the environment after the thaw */
readconfig = !thaw(FreezeFile);
/* reset the environment after the thaw */
+ for (i = 0; i < MAXUSERENVIRON && envp[i] != NULL; i++)
+ UserEnviron[i] = newstr(envp[i]);
+ UserEnviron[i] = NULL;
+ environ = UserEnviron;
+
+# ifdef SETPROCTITLE
+ /*
+ ** Save start and extent of argv for setproctitle.
+ */
+
+ Argv = argv;
+ LastArgv = envp[i - 1] + strlen(envp[i - 1]);
+# endif SETPROCTITLE
/*
** Now do basic initialization
/*
** Now do basic initialization
** All rights reserved. The Berkeley software License Agreement
** specifies the terms and conditions for redistribution.
**
** All rights reserved. The Berkeley software License Agreement
** specifies the terms and conditions for redistribution.
**
-** @(#)sendmail.h 5.4 (Berkeley) %G%
+** @(#)sendmail.h 5.5 (Berkeley) %G%
# ifdef _DEFINE
# define EXTERN
# ifndef lint
# ifdef _DEFINE
# define EXTERN
# ifndef lint
-static char SmailSccsId[] = "@(#)sendmail.h 5.4 %G%";
+static char SmailSccsId[] = "@(#)sendmail.h 5.5 %G%";
# endif lint
# else _DEFINE
# define EXTERN extern
# endif lint
# else _DEFINE
# define EXTERN extern
EXTERN int CheckPointLimit; /* deliveries before checkpointing */
EXTERN char *PostMasterCopy; /* address to get errs cc's */
EXTERN char *TrustedUsers[MAXTRUST+1]; /* list of trusted users */
EXTERN int CheckPointLimit; /* deliveries before checkpointing */
EXTERN char *PostMasterCopy; /* address to get errs cc's */
EXTERN char *TrustedUsers[MAXTRUST+1]; /* list of trusted users */
+EXTERN char *UserEnviron[MAXUSERENVIRON+1]; /* saved user environment */
\f/*
** Trace information
*/
\f/*
** Trace information
*/
-static char SccsId[] = "@(#)version.c 5.23 (Berkeley) %G%";
+static char SccsId[] = "@(#)version.c 5.24 (Berkeley) %G%";
-char Version[] = "5.23";
+char Version[] = "5.24";