summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-07-04 09:00:04 +1000
committerDamien Miller <djm@mindrot.org>2014-07-04 09:00:04 +1000
commit72e6b5c9ed5e72ca3a6ccc3177941b7c487a0826 (patch)
tree625fda95a1d78dad23c033cf04a022b86a97a776 /session.c
parent602943d1179a08dfa70af94f62296ea5e3d6ebb8 (diff)
- djm@cvs.openbsd.org 2014/07/03 22:40:43
[servconf.c servconf.h session.c sshd.8 sshd_config.5] Add a sshd_config PermitUserRC option to control whether ~/.ssh/rc is executed, mirroring the no-user-rc authorized_keys option; bz#2160; ok markus@
Diffstat (limited to 'session.c')
-rw-r--r--session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/session.c b/session.c
index 821867d59..b5979dd91 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.272 2014/07/03 03:34:09 djm Exp $ */ 1/* $OpenBSD: session.c,v 1.273 2014/07/03 22:40:43 djm 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
@@ -1359,7 +1359,8 @@ do_rc_files(Session *s, const char *shell)
1359 1359
1360 /* ignore _PATH_SSH_USER_RC for subsystems and admin forced commands */ 1360 /* ignore _PATH_SSH_USER_RC for subsystems and admin forced commands */
1361 if (!s->is_subsystem && options.adm_forced_command == NULL && 1361 if (!s->is_subsystem && options.adm_forced_command == NULL &&
1362 !no_user_rc && stat(_PATH_SSH_USER_RC, &st) >= 0) { 1362 !no_user_rc && options.permit_user_rc &&
1363 stat(_PATH_SSH_USER_RC, &st) >= 0) {
1363 snprintf(cmd, sizeof cmd, "%s -c '%s %s'", 1364 snprintf(cmd, sizeof cmd, "%s -c '%s %s'",
1364 shell, _PATH_BSHELL, _PATH_SSH_USER_RC); 1365 shell, _PATH_BSHELL, _PATH_SSH_USER_RC);
1365 if (debug_flag) 1366 if (debug_flag)