From 66318dfe1e7138ff3fc780c4b3f0b29c4b2d8712 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 17 Oct 2012 14:43:07 +0200 Subject: Allow setting the default_shell option per-domain as well https://fedorahosted.org/sssd/ticket/1583 --- src/responder/nss/nsssrv_cmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/responder/nss/nsssrv_cmd.c') diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index 42d32e9d..ec256112 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -173,7 +173,9 @@ static const char *get_shell_override(TALLOC_CTX *mem_ctx, user_shell = ldb_msg_find_attr_as_string(msg, SYSDB_SHELL, NULL); if (!user_shell) { /* Check whether there is a default shell specified */ - if (nctx->default_shell) { + if (dom->default_shell) { + return talloc_strdup(mem_ctx, dom->default_shell); + } else if (nctx->default_shell) { return talloc_strdup(mem_ctx, nctx->default_shell); } return NULL; -- cgit