putspent(S)
putspent --
write shadow password file entry
Syntax
cc . . . -lc
#include <shadow.h>
int putspent (p, fp)
struct spwd *p;
FILE *fp;
Description
The putspent
routine is the inverse of
getspent(S).
Given a
pointer to a spwd
structure created by the
getspent routine
(or the getspnam routine),
the putspent routine writes a
line on the stream fp, which matches the format of
/etc/shadow.
If the ``sp_min'', ``sp_max''
or ``sp_lstchg'' field of the spwd
structure is -1, the corresponding /etc/shadow field is
cleared.
Diagnostics
The putspent
routine returns non-zero if an error was
detected during its operation, otherwise zero.
Notes
If a program not otherwise using standard I/O uses this
routine, the size of the program increases more than might
be expected.
This routine is provided for compatibility purposes only,
and may not function correctly on all systems.
We recommend that the
putprpwnam(S)
routine be used as an alternative.
See also
getspent(S),
getpwent(S),
putpwent(S),
getprpwent(S)
Standards conformance
The putspent
routine is conformant with AT&T SVID Issue 3.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003