summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-06-21 17:55:23 +1000
committerDarren Tucker <dtucker@zip.com.au>2009-06-21 17:55:23 +1000
commitac46a915e83c6a69237d683a136bc919049b22d5 (patch)
tree6ba3f9df4c56877dafb051751704bafc7d7190c7
parent3b59dfa161b52b41e5e0cacaf3db1510cfaaa319 (diff)
- stevesk@cvs.openbsd.org 2009/04/17 19:23:06
[session.c] use INTERNAL_SFTP_NAME for setproctitle() of in-process sftp-server; ok djm@ markus@
-rw-r--r--ChangeLog4
-rw-r--r--session.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c799fbaf..4d6051053 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,10 @@
36 [servconf.c] 36 [servconf.c]
37 Fixed a few the-the misspellings in comments. Skipped a bunch in 37 Fixed a few the-the misspellings in comments. Skipped a bunch in
38 binutils,gcc and so on. ok jmc@ 38 binutils,gcc and so on. ok jmc@
39 - stevesk@cvs.openbsd.org 2009/04/17 19:23:06
40 [session.c]
41 use INTERNAL_SFTP_NAME for setproctitle() of in-process sftp-server;
42 ok djm@ markus@
39 43
4020090616 4420090616
41 - (dtucker) [configure.ac defines.h] Bug #1607: handle the case where fsid_t 45 - (dtucker) [configure.ac defines.h] Bug #1607: handle the case where fsid_t
diff --git a/session.c b/session.c
index 8e0c54faa..f04266f78 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.245 2009/01/22 09:46:01 djm Exp $ */ 1/* $OpenBSD: session.c,v 1.246 2009/04/17 19:23:06 stevesk Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -1789,7 +1789,7 @@ do_child(Session *s, const char *command)
1789 int i; 1789 int i;
1790 char *p, *args; 1790 char *p, *args;
1791 1791
1792 setproctitle("%s@internal-sftp-server", s->pw->pw_name); 1792 setproctitle("%s@%s", s->pw->pw_name, INTERNAL_SFTP_NAME);
1793 args = xstrdup(command ? command : "sftp-server"); 1793 args = xstrdup(command ? command : "sftp-server");
1794 for (i = 0, (p = strtok(args, " ")); p; (p = strtok(NULL, " "))) 1794 for (i = 0, (p = strtok(args, " ")); p; (p = strtok(NULL, " ")))
1795 if (i < ARGV_MAX - 1) 1795 if (i < ARGV_MAX - 1)