shadow.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2021, Gunnar Beutner <gbeutner@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #ifndef AK_OS_MACOS
  8. # include <bits/FILE.h>
  9. #endif
  10. #include <sys/cdefs.h>
  11. #include <sys/types.h>
  12. __BEGIN_DECLS
  13. struct spwd {
  14. char* sp_namp;
  15. char* sp_pwdp;
  16. long int sp_lstchg;
  17. long int sp_min;
  18. long int sp_max;
  19. long int sp_warn;
  20. long int sp_inact;
  21. long int sp_expire;
  22. unsigned long int sp_flag;
  23. };
  24. #ifndef AK_OS_MACOS
  25. struct spwd* getspent();
  26. void setspent();
  27. void endspent();
  28. struct spwd* getspnam(const char* name);
  29. int putspent(struct spwd* p, FILE* stream);
  30. int getspent_r(struct spwd* spbuf, char* buf, size_t buflen, struct spwd** spbufp);
  31. int getspnam_r(const char* name, struct spwd* spbuf, char* buf, size_t buflen, struct spwd** spbufp);
  32. int fgetspent_r(FILE* fp, struct spwd* spbuf, char* buf, size_t buflen, struct spwd** spbufp);
  33. int sgetspent_r(const char* s, struct spwd* spbuf, char* buf, size_t buflen, struct spwd** spbufp);
  34. #endif
  35. __END_DECLS