shadow.h 989 B

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