home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
- *
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
- * SANTA CRUZ OPERATION INC.
- *
- * The copyright notice above does not evidence any actual or intended
- * publication of such source code.
- */
-
- #ifndef _SHADOW_H
- #define _SHADOW_H
- #ident "@(#)sgs-head:common/head/shadow.h 1.5"
-
- #define PASSWD "/etc/passwd"
- #define SHADOW "/etc/shadow"
- #define OPASSWD "/etc/opasswd"
- #define OSHADOW "/etc/oshadow"
- #define PASSTEMP "/etc/ptmp"
- #define SHADTEMP "/etc/stmp"
-
- #define DAY (24L * 60 * 60) /* 1 day in seconds */
- #define DAY_NOW (long)time((long *)0) / DAY
-
- /* The spwd structure is used in the retreval of information from
- /etc/shadow. It is used by routines in the libos library */
-
- struct spwd {
- char *sp_namp; /* user name */
- char *sp_pwdp; /* user password */
- long sp_lstchg; /* password lastchanged date */
- long sp_min; /* min. days between password changes */
- long sp_max; /* num. days password is valid */
- long sp_warn; /* num. days to warn to change passwd */
- long sp_inact; /* num. days the login is inactive */
- long sp_expire; /* date when login becomes invalid */
- unsigned long sp_flag; /* currently not being used */
- };
-
- struct _FILE_;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern void setspent(void);
- extern void endspent(void);
- struct spwd *getspent(void);
- struct spwd *fgetspent(struct _FILE_ *);
- struct spwd *getspnam(const char *);
- extern int putspent(const struct spwd *, struct _FILE_ *);
- extern int lckpwdf(void);
- extern int ulckpwdf(void);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /*_SHADOW_H*/
-