summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-03 04:21:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-03 04:21:09 +0000
commitf89c4fe4fd7fa106ed1b61363f778c26dbcb84ee (patch)
tree52848526833fe3d77428bacd073143a4fb50a1a3
parent3dc946235a4bcc65d91068862c74d79827ff2e0d (diff)
a few setproctitle() calls...
-rw-r--r--usr.bin/ssh/sshd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 4a455ba5513..86b2b977327 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -18,7 +18,7 @@ agent connections.
*/
#include "includes.h"
-RCSID("$Id: sshd.c,v 1.15 1999/09/30 21:45:47 aaron Exp $");
+RCSID("$Id: sshd.c,v 1.16 1999/10/03 04:21:08 deraadt Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -917,6 +917,7 @@ void do_connection(int privileged_port)
RSA_free(sensitive_data.private_key);
RSA_free(sensitive_data.host_key);
+ setproctitle("%s", user);
/* Do the authentication. */
do_authentication(user, privileged_port);
}
@@ -1564,6 +1565,8 @@ void do_exec_no_pty(const char *command, struct passwd *pw,
strerror(errno));
#endif /* USE_PIPES */
+ setproctitle("%s@notty", pw->pw_name);
+
/* Fork the child. */
if ((pid = fork()) == 0)
{
@@ -1688,6 +1691,8 @@ void do_exec_pty(const char *command, int ptyfd, int ttyfd,
last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name,
buf, sizeof(buf));
+ setproctitle("%s@%s", pw->pw_name, strrchr(ttyname, '/') + 1);
+
/* Fork the child. */
if ((pid = fork()) == 0)
{