summaryrefslogtreecommitdiffstats
path: root/proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'proxy.c')
-rw-r--r--proxy.c9
1 files changed, 7 insertions, 2 deletions
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)) {