summaryrefslogtreecommitdiffstats
path: root/contrib/opie/opieftpd.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-07-10 07:30:28 +0000
committerkris <kris@FreeBSD.org>2000-07-10 07:30:28 +0000
commit1e2b778cca32736bb48911720f90ed160c1b8824 (patch)
tree02ecfacf847294c7c0c3d8ab7977d5ce8c001c51 /contrib/opie/opieftpd.c
parentbaccd04090074f654de404b42600c7a601011ccc (diff)
downloadFreeBSD-src-1e2b778cca32736bb48911720f90ed160c1b8824.zip
FreeBSD-src-1e2b778cca32736bb48911720f90ed160c1b8824.tar.gz
Correct security hole in setproctitle(). We don't compile this code, but
having the security hole there makes my skin itch.
Diffstat (limited to 'contrib/opie/opieftpd.c')
-rw-r--r--contrib/opie/opieftpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/opie/opieftpd.c b/contrib/opie/opieftpd.c
index b6e764d..1bace12 100644
--- a/contrib/opie/opieftpd.c
+++ b/contrib/opie/opieftpd.c
@@ -633,7 +633,7 @@ VOIDRET pass FUNCTION((passwd), char *passwd)
#if DOTITLE
snprintf(proctitle, sizeof(proctitle), "%s: anonymous/%s", remotehost,
passwd);
- setproctitle(proctitle);
+ setproctitle("%s", proctitle);
#endif /* DOTITLE */
syslog(LOG_NOTICE, "ANONYMOUS FTP login from %s with ID %s",
remotehost, passwd);
@@ -644,7 +644,7 @@ VOIDRET pass FUNCTION((passwd), char *passwd)
#if DOTITLE
snprintf(proctitle, sizeof(proctitle), "%s: %s", remotehost, pw->pw_name);
- setproctitle(proctitle);
+ setproctitle("%s", proctitle);
#endif /* DOTITLE */
syslog(LOG_INFO, "FTP login from %s with user name %s", remotehost, pw->pw_name);
}
@@ -1262,7 +1262,7 @@ static VOIDRET dolog FUNCTION((sin), struct sockaddr_in *sin)
remotehost[sizeof(remotehost) - 1] = '\0';
#if DOTITLE
snprintf(proctitle, sizeof(proctitle), "%s: connected", remotehost);
- setproctitle(proctitle);
+ setproctitle("%s", proctitle);
#endif /* DOTITLE */
t = time((time_t *) 0);
OpenPOWER on IntegriCloud