diff options
| author | elad <elad@NetBSD.org> | 2006-02-18 16:32:45 +0000 |
|---|---|---|
| committer | elad <elad@NetBSD.org> | 2006-02-18 16:32:45 +0000 |
| commit | cf6eceb4e76e53d00db56ca74b254a1d14d7c323 (patch) | |
| tree | 84cb8f381a699ac4b9c7920a81c0a67ebc60975d /include | |
| parent | 5eb3b9f4ff8c38b90c01fbbe00dcbdbfaa3adf25 (diff) | |
Don't expose struct pw_policy and use pw_policy_t, use malloc, man-page
fixups.
As discussed on source-changes@.
Okay yamt@, thorpej@.
Diffstat (limited to 'include')
| -rw-r--r-- | include/util.h | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/include/util.h b/include/util.h index 598ebc7066b..194252b9bc8 100644 --- a/include/util.h +++ b/include/util.h @@ -1,4 +1,4 @@ -/* $NetBSD: util.h,v 1.39 2006/02/18 10:53:33 elad Exp $ */ +/* $NetBSD: util.h,v 1.40 2006/02/18 16:32:45 elad Exp $ */ /*- * Copyright (c) 1995 @@ -56,9 +56,6 @@ #define PW_POLICY_BYPASSWD 1 #define PW_POLICY_BYGROUP 2 -#define PW_POLICY_INIT { -1, -1, -1, -1, -1, -1, -1, \ - -1, -1, -1, -1, -1, -1, -1 } - __BEGIN_DECLS struct disklabel; struct iovec; @@ -68,22 +65,7 @@ struct utmp; struct winsize; struct sockaddr; -struct pw_policy { - int32_t minlen; - int32_t maxlen; - int32_t minupper; - int32_t maxupper; - int32_t minlower; - int32_t maxlower; - int32_t mindigits; - int32_t maxdigits; - int32_t minpunct; - int32_t maxpunct; - int32_t mintoggles; - int32_t maxtoggles; - int32_t minclasses; - int32_t maxclasses; -}; +typedef struct pw_policy *pw_policy_t; pid_t forkpty(int *, char *, struct termios *, struct winsize *); const char *getbootfile(void); @@ -118,8 +100,9 @@ const char *pw_getprefix(void); void pw_init(void); int pw_lock(int); int pw_mkdb(const char *, int); -int pw_policy_load(struct pw_policy *, void *, int); -int pw_policy_test(struct pw_policy *, char *); +pw_policy_t pw_policy_load(void *, int); +int pw_policy_test(pw_policy_t, char *); +void pw_policy_free(pw_policy_t); void pw_prompt(void); int pw_setprefix(const char *); int secure_path(const char *); |
