From 37c5f1428c1534a1edc65888484347481f16e0c4 Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 3 Jul 2014 23:00:04 +0000 Subject: - 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@ --- session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'session.c') 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 , 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) -- cgit v1.2.1