/**
* Build an org unit string
* if org unit is Computers or blank then assume a container, otherwise
- * assume a \ separated list of organisational units
+ * assume a / separated list of organisational units.
+ * jmcd: '\' is now used for escapes so certain chars can be in the ou (e.g. #)
* @param ads connection to ads server
* @param org_unit Organizational unit
* @return org unit string - caller must free
return SMB_STRDUP("cn=Computers");
}
- return ads_build_path(org_unit, "\\/", "ou=", 1);
+ /* jmcd: removed "\\" from the separation chars, because it is
+ needed as an escape for chars like '#' which are valid in an
+ OU name */
+ return ads_build_path(org_unit, "/", "ou=", 1);
}
/**