crack.h 916 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef CRACKLIB_H
  2. #define CRACKLIB_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /* Pass these functions a password (pw) and a path to the
  7. * dictionaries (/usr/lib/cracklib_dict should be specified)
  8. * and it will either return a NULL string, meaning that the
  9. * password is good, or a pointer to a string that explains the
  10. * problem with the password.
  11. *
  12. * FascistCheckUser() executes tests against an arbitrary user (the 'gecos'
  13. * attribute can be NULL), while FascistCheck() assumes the currently logged
  14. * in user.
  15. *
  16. * You must link with -lcrack
  17. */
  18. extern const char *FascistCheck(const char *pw, const char *dictpath);
  19. extern const char *FascistCheckUser(const char *pw, const char *dictpath,
  20. const char *user, const char *gecos);
  21. /* This function returns the compiled in value for DEFAULT_CRACKLIB_DICT.
  22. */
  23. extern const char *GetDefaultCracklibDict(void);
  24. #ifdef __cplusplus
  25. };
  26. #endif
  27. #endif