From 87d9e62bcc0915b8cf6cf2a4b687d30026662a31 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 23 Oct 2015 12:07:08 +0200 Subject: Fix homeMount handling in LDAP-LDAP mode --- proxy.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/proxy.c b/proxy.c index 8c3fee6..4246381 100644 --- a/proxy.c +++ b/proxy.c @@ -504,6 +504,8 @@ static BOOL request_replaceAttributeLdap(server_t *server, struct string *attrib // If uid is of format s[0-9]+, we assume that it's a numeric account name, as a workaround if (value == NULL) return FALSE; fixUnNumeric(value); + } else if (iequals(attribute, &s_homemount)) { + if (attr != NULL) attr->homeMount = TRUE; } return TRUE; } @@ -753,13 +755,12 @@ static void response_replacePalLdap(server_t *server, struct PartialAttributeLis elifDELATTR(cn); elifDEL(memberOf); else if (iequals(&(*pal)->type, &s_homedirectory)) { - // homeDirectory is set in AD - it can either be a local path (in which case it's useless) - // or a UNC path, which we can easily mount via mount.cifs - if (response_filterHomeDir(*pal)) { - attr->homeMount = FALSE; - attr->homeDirectory = TRUE; - } else if(response_filterLocalHomeDir(*pal)) { + // homeDirectory is set in LDAP - use if it's a local path + if(response_filterLocalHomeDir(*pal)) { attr->homeDirectory = FALSE; + } else { + next = (*pal)->next; + del = TRUE; } } // Entry should be removed, free structs -- cgit v1.2.3-55-g7522