putpwent - 패스워드 파일 엔트리를 쓴다.
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
int putpwent(const struct passwd *restrict p, FILE *restrict stream);
putpwent():
glibc 2.19부터:
_DEFAULT_SOURCE
glibc 2.19 이하:
_SVID_SOURCE putpwent() 함수는 stream과 관련된 파일에 구조체 p 인 패스워드 엔트리를 쓴다.
passwd 구조체는 다음처럼 <pwd.h>에 정의되어 있다:
struct passwd {
char *pw_name; /* 유저 이름 */
char *pw_passwd; /* 유저 패스워드 */
uid_t pw_uid; /* 유저 id */
gid_t pw_gid; /* 그룹 id */
char *pw_gecos; /* 실제 이름 */
char *pw_dir; /* 홈 디렉토리 */
char *pw_shell; /* shell 프로그램 */
};
The putpwent() function returns 0 on success. On failure, it returns -1, and errno is set to indicate the error.
이 섹션에서 사용되는 용어에 대한 설명은 attributes(7)EN을 참조하십시오.
| 상호 작용 | 속성 | 번호 |
| putpwent() | Thread safety | MT-Safe locale |