'\" te .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 1989 AT&T .TH putspent 3C "23 Jan 2008" "SunOS 5.11" "Standard C Library Functions" .SH NAME putspent \- write shadow password file entry .SH SYNOPSIS .LP .nf #include \fBint\fR \fBputspent\fR(\fBconst struct spwd *\fR\fIp\fR, \fBFILE *\fR\fIfp\fR); .fi .SH DESCRIPTION .sp .LP The \fBputspent()\fR function is the inverse of \fBgetspent()\fR. See \fBgetspnam\fR(3C). Given a pointer to a \fBspwd\fR structure created by \fBgetspent()\fR or \fBgetspnam()\fR, \fBputspent()\fR writes a line on the stream \fIfp\fR that matches the format of \fB/etc/shadow\fR. .sp .LP The \fBspwd\fR structure contains the following members: .sp .in +2 .nf char *sp_namp; char *sp_pwdp; int sp_lstchg; int sp_min; int sp_max; int sp_warn; int sp_inact; int sp_expire; unsigned int sp_flag; .fi .in -2 .sp .LP If the \fBsp_min\fR, \fBsp_max\fR, \fBsp_lstchg\fR, \fBsp_warn\fR, \fBsp_inact\fR, or \fBsp_expire\fR member of the \fBspwd\fR structure is \(mi1, or if \fBsp_flag\fR is 0, the corresponding \fB/etc/shadow\fR field is cleared. .SH RETURN VALUES .sp .LP The \fBputspent()\fR function returns a non-zero value if an error was detected during its operation. Otherwise, it returns \fB0\fR. .SH USAGE .sp .LP 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 \fBputpwent\fR(3C) to update the password file. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelUnsafe .TE .SH SEE ALSO .sp .LP \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C), \fBputpwent\fR(3C), \fBattributes\fR(5)