ldapauth.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  3. * Copyright (C) 2005 Red Hat, Inc.
  4. * All rights reserved.
  5. * END COPYRIGHT BLOCK **/
  6. #ifndef LDAP_AUTH_H
  7. #define LDAP_AUTH_H
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #include "ldap/ldap.h"
  12. const int LDAP_ACL_SUCCESS = 0;
  13. const int LDAP_ACL_FAILED = -1;
  14. extern int ldap_auth_userdn_groupdn (LDAP *ld, char *userdn,
  15. char *groupdn);
  16. extern int ldap_auth_uid_groupdn (LDAP *ld, char *uid,
  17. char *groupdn);
  18. extern int ldap_auth_uid_groupid (LDAP *ld, char *uid,
  19. char *groupid);
  20. extern int ldap_auth_userdn_groupid (LDAP *ld, char *userdn,
  21. char *groupid);
  22. extern int ldap_auth_userdn_attrfilter (LDAP *ld, char *userdn,
  23. char *attrfilter);
  24. extern int ldap_auth_uid_attrfilter (LDAP *ld, char *uid,
  25. char *attrfilter);
  26. extern int ldap_auth_userdn_password (LDAP *ld, char *userdn,
  27. char *password);
  28. extern int ldap_find_uid (LDAP *ld, char *uid, LDAPMessage **res);
  29. extern int ldap_auth_uid_password (LDAP *ld, char *uid,
  30. char *password);
  31. extern LDAP *init_ldap();
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif /* LDAP_AUTH_H */