| From: | Jim Shi <hanmao_shi@apple.com> |
| Subject: | issues in handling special characters in KDC ldap plugin code |
| Date: | Fri, 24 Aug 2012 11:05:20 -0700 |
| To: | krb5-bugs@mit.edu |
Hi, In the process of migrating file based kdc to kdc with ldap backend, We found two issues in handing of special characters in the kdc ldap plugin code. We have kdc version krb5.1.10.3. We believe the same problem exists in the previous versions as well.
Issue 1.
When persisting a principal record to ldap backend, in the file "ldap_principal2.c" with procedure:
krb5_error_code
krb5_ldap_put_principal(krb5_context context, krb5_db_entry *entry,
char **db_args)
in two seperated places, it should apply 'ldap_filter_correct' on 'user' to escape special characters in ldap search. But it did not.
See attached ldap_principal2.c.patch for the fix.
Issue 2.
We need escape a few more special characters in the file "ldap_realm.c", subroutine:
char *
ldap_filter_correct (char *in)
See the attached ldap_realm.c.patch, I add four more characters to escape: '+', '#', ';', ',' .
Thanks for your attention.
Issue 1.
When persisting a principal record to ldap backend, in the file "ldap_principal2.c" with procedure:
krb5_error_code
krb5_ldap_put_principal(krb5_context context, krb5_db_entry *entry,
char **db_args)
in two seperated places, it should apply 'ldap_filter_correct' on 'user' to escape special characters in ldap search. But it did not.
See attached ldap_principal2.c.patch for the fix.
Issue 2.
We need escape a few more special characters in the file "ldap_realm.c", subroutine:
char *
ldap_filter_correct (char *in)
See the attached ldap_realm.c.patch, I add four more characters to escape: '+', '#', ';', ',' .
Thanks for your attention.
Message body not shown because it is not plain text.
Message body not shown because it is not plain text.
Jim Shi