From e27569e63c64c92447edc7e6827b121f87e01a87 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 19 Feb 2016 10:12:50 +0100 Subject: Configurable name of homeDirectory attribute --- proxy.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'proxy.c') diff --git a/proxy.c b/proxy.c index e416055..786c1ed 100644 --- a/proxy.c +++ b/proxy.c @@ -452,7 +452,11 @@ static BOOL request_replaceAttribute(server_t *server, struct string *attribute, fixUnNumeric(value); ////// ################### } else if (iequals(attribute, &s_homemount)) { - *attribute = s_homeDirectory; + if (server->homeAttr.s == NULL) { + *attribute = s_homeDirectory; + } else { + *attribute = server->homeAttr; + } if (attr != NULL) attr->homeMount = TRUE; } else if (iequals(attribute, &s_objectclass)) { if (value == NULL) return TRUE; @@ -588,7 +592,8 @@ static void response_replacePal(server_t *server, struct PartialAttributeList ** elifDEL(mail); elifDELATTR(cn, cn); elifDEL(memberof); - else if (iequals(&(*pal)->type, &s_homedirectory)) { + else if ( (server->homeAttr.s == NULL && iequals(&(*pal)->type, &s_homedirectory)) + || (server->homeAttr.s != NULL && iequals(&(*pal)->type, &server->homeAttr)) ) { // 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)) { -- cgit v1.2.3-55-g7522