mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 10:29:15 +00:00
Fix security botch in "UseLogin Yes" case: commands are executed with
uid 0. Obtained from: OpenBSD
This commit is contained in:
parent
a931d243fa
commit
95e2a710ad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61529
@ -858,6 +858,10 @@ do_child(const char *command, struct passwd * pw, const char *term,
|
||||
struct stat st;
|
||||
char *argv[10];
|
||||
|
||||
/* login(1) is only called if we execute the login shell */
|
||||
if (options.use_login && command != NULL)
|
||||
options.use_login = 0;
|
||||
|
||||
#ifdef LOGIN_CAP
|
||||
login_cap_t *lc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user