Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mastervolkov/4174241 to your computer and use it in GitHub Desktop.
Save mastervolkov/4174241 to your computer and use it in GitHub Desktop.
jabberd2 2.2.17 fix group in shared roster
--- /tmp/DDDD/jabberd-2.2.17/jabberd-2.2.17/storage/storage_ldapvcard.c 2012-05-04 18:51:08.000000000 +0400
+++ RPM/BUILD/jabberd-2.2.17/storage/storage_ldapvcard.c 2012-11-30 10:43:11.348482828 +0400
@@ -430,7 +430,7 @@
ldap_value_free(vals);
continue;
}
- if (data->groupattr_regex != NULL && processregex(vals[0],data->groupattr_regex,2,1,group,sizeof(group),drv) !=0) {
+ if ( (data->groupattr_regex != NULL && processregex(vals[0],data->groupattr_regex,2,1,group,sizeof(group),drv) !=0) || data->groupattr_regex == NULL) {
strncpy(group,vals[0],sizeof(group)-1);
}
group[sizeof(group)-1]='\0';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment