* Make a passwd line (in v7 format) out of a struct passwd */
| 411 | * Make a passwd line (in v7 format) out of a struct passwd |
| 412 | */ |
| 413 | char * |
| 414 | pw_make_v7(const struct passwd *pw) |
| 415 | { |
| 416 | char *line; |
| 417 | |
| 418 | asprintf(&line, "%s:*:%ju:%ju:%s:%s:%s", pw->pw_name, |
| 419 | (uintmax_t)pw->pw_uid, (uintmax_t)pw->pw_gid, |
| 420 | pw->pw_gecos, pw->pw_dir, pw->pw_shell); |
| 421 | return (line); |
| 422 | } |
| 423 | |
| 424 | /* |
| 425 | * Copy password file from one descriptor to another, replacing, deleting |
nothing calls this directly
no test coverage detected