* Compares two struct pwds. */
| 379 | * Compares two struct pwds. |
| 380 | */ |
| 381 | int |
| 382 | pw_equal(const struct passwd *pw1, const struct passwd *pw2) |
| 383 | { |
| 384 | return (strcmp(pw1->pw_name, pw2->pw_name) == 0 && |
| 385 | pw1->pw_uid == pw2->pw_uid && |
| 386 | pw1->pw_gid == pw2->pw_gid && |
| 387 | strcmp(pw1->pw_class, pw2->pw_class) == 0 && |
| 388 | pw1->pw_change == pw2->pw_change && |
| 389 | pw1->pw_expire == pw2->pw_expire && |
| 390 | strcmp(pw1->pw_gecos, pw2->pw_gecos) == 0 && |
| 391 | strcmp(pw1->pw_dir, pw2->pw_dir) == 0 && |
| 392 | strcmp(pw1->pw_shell, pw2->pw_shell) == 0); |
| 393 | } |
| 394 | |
| 395 | /* |
| 396 | * Make a passwd line out of a struct passwd. |