mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Fix setproctitle() vulnerability in non-compiled code.
This commit is contained in:
parent
5e90b39cba
commit
c26927949d
1 changed files with 3 additions and 3 deletions
|
|
@ -786,7 +786,7 @@ int do_login(int code, char *passwd)
|
|||
"%s: anonymous/%s",
|
||||
remotehost,
|
||||
passwd);
|
||||
setproctitle(proctitle);
|
||||
setproctitle("%s", proctitle);
|
||||
#endif /* HAVE_SETPROCTITLE */
|
||||
if (logging) {
|
||||
char data_addr[256];
|
||||
|
|
@ -807,7 +807,7 @@ int do_login(int code, char *passwd)
|
|||
reply(code, "User %s logged in.", pw->pw_name);
|
||||
#ifdef HAVE_SETPROCTITLE
|
||||
snprintf(proctitle, sizeof(proctitle), "%s: %s", remotehost, pw->pw_name);
|
||||
setproctitle(proctitle);
|
||||
setproctitle("%s", proctitle);
|
||||
#endif /* HAVE_SETPROCTITLE */
|
||||
if (logging) {
|
||||
char data_addr[256];
|
||||
|
|
@ -1782,7 +1782,7 @@ dolog(struct sockaddr *sa)
|
|||
inaddr2str (sin->sin_addr, remotehost, sizeof(remotehost));
|
||||
#ifdef HAVE_SETPROCTITLE
|
||||
snprintf(proctitle, sizeof(proctitle), "%s: connected", remotehost);
|
||||
setproctitle(proctitle);
|
||||
setproctitle("%s", proctitle);
|
||||
#endif /* HAVE_SETPROCTITLE */
|
||||
|
||||
if (logging) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue