summaryrefslogtreecommitdiffstats
path: root/proxy.c
diff options
context:
space:
mode:
authorSimon Rettberg2016-02-19 10:12:50 +0100
committerSimon Rettberg2016-02-19 10:12:50 +0100
commite27569e63c64c92447edc7e6827b121f87e01a87 (patch)
tree3fa25bcc8d5d58163e448684a655f44709fc41fc /proxy.c
parentRemove debug messages (diff)
downloadldadp-e27569e63c64c92447edc7e6827b121f87e01a87.tar.gz
ldadp-e27569e63c64c92447edc7e6827b121f87e01a87.tar.xz
ldadp-e27569e63c64c92447edc7e6827b121f87e01a87.zip
Configurable name of homeDirectory attribute
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)) {