summaryrefslogtreecommitdiff
path: root/src/responder/nss/nsssrv_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/responder/nss/nsssrv_cmd.c')
-rw-r--r--src/responder/nss/nsssrv_cmd.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 5c5f8060..64fd7a58 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -155,11 +155,21 @@ static const char *get_homedir_override(TALLOC_CTX *mem_ctx,
static const char *get_shell_override(TALLOC_CTX *mem_ctx,
struct ldb_message *msg,
- struct nss_ctx *nctx)
+ struct nss_ctx *nctx,
+ struct sss_domain_info *dom)
{
const char *user_shell;
int i;
+ /* Check whether we are unconditionally overriding the server
+ * for the login shell.
+ */
+ if (dom->override_shell) {
+ return dom->override_shell;
+ } else if (nctx->override_shell) {
+ return nctx->override_shell;
+ }
+
user_shell = ldb_msg_find_attr_as_string(msg, SYSDB_SHELL, NULL);
if (!user_shell) {
/* Check whether there is a default shell specified */
@@ -303,7 +313,7 @@ static int fill_pwent(struct sss_packet *packet,
} else {
to_sized_string(&homedir, tmpstr);
}
- tmpstr = get_shell_override(tmp_ctx, msg, nctx);
+ tmpstr = get_shell_override(tmp_ctx, msg, nctx, dom);
if (!tmpstr) {
to_sized_string(&shell, "");
} else {