summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authordjm <djm>2014-07-03 23:00:04 +0000
committerdjm <djm>2014-07-03 23:00:04 +0000
commit37c5f1428c1534a1edc65888484347481f16e0c4 (patch)
treeadfe121e074642693058a481734da19a00323c09 /session.c
parent7c77d660c454ab91c04075e7f50425119cc728eb (diff)
downloadopenssh-37c5f1428c1534a1edc65888484347481f16e0c4.tar.gz
- 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 821867d5..b5979dd9 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.272 2014/07/03 03:34:09 djm Exp $ */
+/* $OpenBSD: session.c,v 1.273 2014/07/03 22:40:43 djm Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -1359,7 +1359,8 @@ do_rc_files(Session *s, const char *shell)
/* ignore _PATH_SSH_USER_RC for subsystems and admin forced commands */
if (!s->is_subsystem && options.adm_forced_command == NULL &&
- !no_user_rc && stat(_PATH_SSH_USER_RC, &st) >= 0) {
+ !no_user_rc && options.permit_user_rc &&
+ stat(_PATH_SSH_USER_RC, &st) >= 0) {
snprintf(cmd, sizeof cmd, "%s -c '%s %s'",
shell, _PATH_BSHELL, _PATH_SSH_USER_RC);
if (debug_flag)