summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sendmail
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-03-14 14:26:35 +0000
committerpeter <peter@FreeBSD.org>1997-03-14 14:26:35 +0000
commit8abbe02b7ec0bb6e55d1c4ad70ba17bda538e096 (patch)
tree2dff26454e6f99ff9bf49355b31a50b1e1088bf5 /usr.sbin/sendmail
parent8e1c208b61a81b3349c9bd8c476d812cb25dfafc (diff)
downloadFreeBSD-src-8abbe02b7ec0bb6e55d1c4ad70ba17bda538e096.zip
FreeBSD-src-8abbe02b7ec0bb6e55d1c4ad70ba17bda538e096.tar.gz
Activate HASSETUSERCONTEXT to set resource limits while delivering
to pipes in .forward files, but with a slight bugfix to the code.
Diffstat (limited to 'usr.sbin/sendmail')
-rw-r--r--usr.sbin/sendmail/src/conf.h6
-rw-r--r--usr.sbin/sendmail/src/deliver.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/sendmail/src/conf.h b/usr.sbin/sendmail/src/conf.h
index 9c3904d..1e0b765 100644
--- a/usr.sbin/sendmail/src/conf.h
+++ b/usr.sbin/sendmail/src/conf.h
@@ -710,12 +710,16 @@ typedef int pid_t;
# endif
# if defined(__FreeBSD__)
# undef SPT_TYPE
-# if __FreeBSD__ == 2
+# if __FreeBSD__ >= 2
# include <osreldate.h> /* and this works */
# if __FreeBSD_version >= 199512 /* 2.2-current right now */
# include <libutil.h>
# define SPT_TYPE SPT_BUILTIN
# endif
+# if __FreeBSD_version >= 300000 /* 3.0-current right now */
+# include <login_cap.h>
+# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
+# endif
# endif
# ifndef SPT_TYPE
# define SPT_TYPE SPT_REUSEARGV
diff --git a/usr.sbin/sendmail/src/deliver.c b/usr.sbin/sendmail/src/deliver.c
index 97a1050..fb6db2d 100644
--- a/usr.sbin/sendmail/src/deliver.c
+++ b/usr.sbin/sendmail/src/deliver.c
@@ -1539,7 +1539,7 @@ tryhost:
pwd = sm_getpwnam(contextaddr->q_user);
if (pwd != NULL)
(void) setusercontext(NULL,
- pwd, pwd->m_uid,
+ pwd, pwd->pw_uid,
LOGIN_SETRESOURCES|LOGIN_SETPRIORITY);
}
#endif
OpenPOWER on IntegriCloud