Changed snprintf to sprintf.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@572 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -665,8 +665,7 @@ int do_login(int code, char *passwd)
|
|||||||
if (guest) {
|
if (guest) {
|
||||||
reply(code, "Guest login ok, access restrictions apply.");
|
reply(code, "Guest login ok, access restrictions apply.");
|
||||||
#ifdef HAVE_SETPROCTITLE
|
#ifdef HAVE_SETPROCTITLE
|
||||||
snprintf(proctitle, sizeof(proctitle),
|
sprintf(proctitle, "%s: anonymous/%.*s", remotehost,
|
||||||
"%s: anonymous/%.*s", remotehost,
|
|
||||||
sizeof(proctitle) - sizeof(remotehost) -
|
sizeof(proctitle) - sizeof(remotehost) -
|
||||||
sizeof(": anonymous/"), passwd);
|
sizeof(": anonymous/"), passwd);
|
||||||
setproctitle(proctitle);
|
setproctitle(proctitle);
|
||||||
@@ -677,8 +676,7 @@ int do_login(int code, char *passwd)
|
|||||||
} else {
|
} else {
|
||||||
reply(code, "User %s logged in.", pw->pw_name);
|
reply(code, "User %s logged in.", pw->pw_name);
|
||||||
#ifdef HAVE_SETPROCTITLE
|
#ifdef HAVE_SETPROCTITLE
|
||||||
snprintf(proctitle, sizeof(proctitle),
|
sprintf(proctitle, "%s: %s", remotehost, pw->pw_name);
|
||||||
"%s: %s", remotehost, pw->pw_name);
|
|
||||||
setproctitle(proctitle);
|
setproctitle(proctitle);
|
||||||
#endif /* HAVE_SETPROCTITLE */
|
#endif /* HAVE_SETPROCTITLE */
|
||||||
if (logging)
|
if (logging)
|
||||||
@@ -1235,7 +1233,7 @@ statfilecmd(char *filename)
|
|||||||
int c;
|
int c;
|
||||||
char line[LINE_MAX];
|
char line[LINE_MAX];
|
||||||
|
|
||||||
(void)snprintf(line, sizeof(line), "/bin/ls -lA %s", filename);
|
sprintf(line, "/bin/ls -lA %s", filename);
|
||||||
fin = ftpd_popen(line, "r");
|
fin = ftpd_popen(line, "r");
|
||||||
lreply(211, "status of %s:", filename);
|
lreply(211, "status of %s:", filename);
|
||||||
while ((c = getc(fin)) != EOF) {
|
while ((c = getc(fin)) != EOF) {
|
||||||
@@ -1499,7 +1497,7 @@ dolog(struct sockaddr_in *sin)
|
|||||||
(void) strncpy(remotehost, inet_ntoa(sin->sin_addr),
|
(void) strncpy(remotehost, inet_ntoa(sin->sin_addr),
|
||||||
sizeof(remotehost));
|
sizeof(remotehost));
|
||||||
#ifdef HAVE_SETPROCTITLE
|
#ifdef HAVE_SETPROCTITLE
|
||||||
snprintf(proctitle, sizeof(proctitle), "%s: connected", remotehost);
|
sprintf(proctitle, "%s: connected", remotehost);
|
||||||
setproctitle(proctitle);
|
setproctitle(proctitle);
|
||||||
#endif /* HAVE_SETPROCTITLE */
|
#endif /* HAVE_SETPROCTITLE */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user