summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
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 b6f314739..997ee5fa9 100644
--- a/session.c
+++ b/session.c
@@ -1201,8 +1201,9 @@ do_rc_files(Session *s, const char *shell)
1201 do_xauth = 1201 do_xauth =
1202 s->display != NULL && s->auth_proto != NULL && s->auth_data != NULL; 1202 s->display != NULL && s->auth_proto != NULL && s->auth_data != NULL;
1203 1203
1204 /* ignore _PATH_SSH_USER_RC for subsystems */ 1204 /* ignore _PATH_SSH_USER_RC for subsystems and admin forced commands */
1205 if (!s->is_subsystem && (stat(_PATH_SSH_USER_RC, &st) >= 0)) { 1205 if (!s->is_subsystem && options.adm_forced_command == NULL &&
1206 !no_user_rc && (stat(_PATH_SSH_USER_RC, &st) >= 0)) {
1206 snprintf(cmd, sizeof cmd, "%s -c '%s %s'", 1207 snprintf(cmd, sizeof cmd, "%s -c '%s %s'",
1207 shell, _PATH_BSHELL, _PATH_SSH_USER_RC); 1208 shell, _PATH_BSHELL, _PATH_SSH_USER_RC);
1208 if (debug_flag) 1209 if (debug_flag)