On Wed, Jan 15, 2014 at 04:10:09PM +0100, Pavel Reichl wrote: > Hello, > > please see attached patch. > > PR
I'm quite confident that the patch works as expected, but I think it is a bit too strong. The ticket only asks to do this for the IPA server running in ipa-server-mode. Your patch will replace the home directory for all sub-domains. The reason why a fix is needed in ipa-server-mode is that the AD provider code is used here to read the user object from AD including the home directory. If the home directory is not set in AD it will just be empty in the cache. The old part of the IPA subdomain code which uses the extdom plugin to get the information about the AD users and groups add the home directory explicitly because it is currently not returned by the extdom plugin. This code is still used on the IPA clients and here we have a disconnect between the home directory shown on the IPA server and on the client. The ticket ask to change the behavior on the server so this matches the behavior on the client (which is the behavior we had in previous versions). To do this I would suggest to just overwrite the home directory attribute in the cache in ipa_get_ad_acct_ad_part_done() after ad_handle_acct_info_recv() is handled. HTH bye, Sumit > From 8d05425773a85c2a4a2bbf956951f9dadc4d83f1 Mon Sep 17 00:00:00 2001 > From: Pavel Reichl <prei...@redhat.com> > Date: Wed, 15 Jan 2014 15:52:35 +0000 > Subject: [PATCH] NSS: add support for subdomain_homedir > > Resolves: > https://fedorahosted.org/sssd/ticket/2169 > --- > src/responder/nss/nsssrv_cmd.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c > index > 2e2d7c86adf6d6444652435f888748385c64acf2..6a1e6a06a5e5323c59c2ee1973d207e82b473f93 > 100644 > --- a/src/responder/nss/nsssrv_cmd.c > +++ b/src/responder/nss/nsssrv_cmd.c > @@ -201,6 +201,14 @@ static const char *get_homedir_override(TALLOC_CTX > *mem_ctx, > name, uid, homedir, dom->name, NULL); > } > > + /* Override home directory location for subdomains. > + * This option can be overriden by override_homedir. > + */ > + if (IS_SUBDOMAIN(dom) && dom->subdomain_homedir) { > + return expand_homedir_template(mem_ctx, dom->subdomain_homedir, > + name, uid, homedir, dom->name, NULL); > + } > + > if (!homedir || *homedir == '\0') { > /* In the case of a NULL or empty homedir, check to see if > * we have a fallback homedir to use. > -- > 1.8.4.2 > > _______________________________________________ > sssd-devel mailing list > sssd-devel@lists.fedorahosted.org > https://lists.fedorahosted.org/mailman/listinfo/sssd-devel _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel