diff options
author | Simon Rettberg | 2016-02-19 10:12:50 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-02-19 10:12:50 +0100 |
commit | e27569e63c64c92447edc7e6827b121f87e01a87 (patch) | |
tree | 3fa25bcc8d5d58163e448684a655f44709fc41fc /proxy.c | |
parent | Remove debug messages (diff) | |
download | ldadp-e27569e63c64c92447edc7e6827b121f87e01a87.tar.gz ldadp-e27569e63c64c92447edc7e6827b121f87e01a87.tar.xz ldadp-e27569e63c64c92447edc7e6827b121f87e01a87.zip |
Configurable name of homeDirectory attribute
Diffstat (limited to 'proxy.c')
-rw-r--r-- | proxy.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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)) { |