Standard C Library Functions putspent(3C)
NAME
putspent - write shadow password file entry
SYNOPSIS
#include
int putspent(const struct spwd *p, FILE *fp);
DESCRIPTION
The putspent() function is the inverse of getspent(). See
getspnam(3C). Given a pointer to a spwd structure created by
getspent() or getspnam(), putspent() writes a line on the
stream fp that matches the format of /etc/shadow.
The spwd structure contains the following members:
char *spnamp;
char *sppwdp;
int splstchg;
int spmin;
int spmax;
int spwarn;
int spinact;
int spexpire;
unsigned int spflag;
If the spmin, spmax, splstchg, spwarn, spinact, or
spexpire member of the spwd structure is -1, or if spflag
is 0, the corresponding /etc/shadow field is cleared.
RETURN VALUES
The putspent() function returns a non-zero value if an
error was detected during its operation. Otherwise, it
returns 0.
USAGE
Since this function is for internal use only, compatibility
is not guaranteed. For this reason, its use is discouraged.
If used at all, if should be used with putpwent(3C) to
update the password file.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 23 Jan 2008 1
Standard C Library Functions putspent(3C)
ATRIBUTE TYPE ATRIBUTE VALUE
MT-Level Unsafe
SEE ALSO
getpwnam(3C), getspnam(3C), putpwent(3C), attributes(5)
SunOS 5.11 Last change: 23 Jan 2008 2
|