diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.230 2008/02/22 05:58:56 djm Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.231 2008/03/25 11:58:02 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 |
@@ -1202,8 +1202,9 @@ do_rc_files(Session *s, const char *shell) | |||
1202 | do_xauth = | 1202 | do_xauth = |
1203 | s->display != NULL && s->auth_proto != NULL && s->auth_data != NULL; | 1203 | s->display != NULL && s->auth_proto != NULL && s->auth_data != NULL; |
1204 | 1204 | ||
1205 | /* ignore _PATH_SSH_USER_RC for subsystems */ | 1205 | /* ignore _PATH_SSH_USER_RC for subsystems and admin forced commands */ |
1206 | if (!s->is_subsystem && (stat(_PATH_SSH_USER_RC, &st) >= 0)) { | 1206 | if (!s->is_subsystem && options.adm_forced_command != NULL && |
1207 | (stat(_PATH_SSH_USER_RC, &st) >= 0)) { | ||
1207 | snprintf(cmd, sizeof cmd, "%s -c '%s %s'", | 1208 | snprintf(cmd, sizeof cmd, "%s -c '%s %s'", |
1208 | shell, _PATH_BSHELL, _PATH_SSH_USER_RC); | 1209 | shell, _PATH_BSHELL, _PATH_SSH_USER_RC); |
1209 | if (debug_flag) | 1210 | if (debug_flag) |