mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Activate HASSETUSERCONTEXT to set resource limits while delivering
to pipes in .forward files, but with a slight bugfix to the code.
This commit is contained in:
parent
c00d650f25
commit
39da5de262
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23885
|
@ -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
|
||||
|
|
|
@ -1539,7 +1539,7 @@ deliver(e, firstto)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue