ldapauth.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. *
  6. * License: GPL (version 3 or any later version).
  7. * See LICENSE for details.
  8. * END COPYRIGHT BLOCK **/
  9. #ifdef HAVE_CONFIG_H
  10. # include <config.h>
  11. #endif
  12. #ifndef LDAP_AUTH_H
  13. #define LDAP_AUTH_H
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #include "ldap/ldap.h"
  18. const int LDAP_ACL_SUCCESS = 0;
  19. const int LDAP_ACL_FAILED = -1;
  20. extern int ldap_auth_userdn_groupdn (LDAP *ld, char *userdn,
  21. char *groupdn);
  22. extern int ldap_auth_uid_groupdn (LDAP *ld, char *uid,
  23. char *groupdn);
  24. extern int ldap_auth_uid_groupid (LDAP *ld, char *uid,
  25. char *groupid);
  26. extern int ldap_auth_userdn_groupid (LDAP *ld, char *userdn,
  27. char *groupid);
  28. extern int ldap_auth_userdn_attrfilter (LDAP *ld, char *userdn,
  29. char *attrfilter);
  30. extern int ldap_auth_uid_attrfilter (LDAP *ld, char *uid,
  31. char *attrfilter);
  32. extern int ldap_auth_userdn_password (LDAP *ld, char *userdn,
  33. char *password);
  34. extern int ldap_find_uid (LDAP *ld, char *uid, LDAPMessage **res);
  35. extern int ldap_auth_uid_password (LDAP *ld, char *uid,
  36. char *password);
  37. extern LDAP *init_ldap();
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* LDAP_AUTH_H */