pw_nis.c (416ba5c74546f32a993436a99516d35008e9f384) pw_nis.c (d2d022b9fdebd6bfe2983bb688818ed8bfc422a6)
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 29 unchanged lines hidden (view full) ---

38
39static int
40pw_nisupdate(const char * path, struct passwd * pwd, char const * user)
41{
42 int pfd, tfd;
43 struct passwd *pw = NULL;
44 struct passwd *old_pw = NULL;
45
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 29 unchanged lines hidden (view full) ---

38
39static int
40pw_nisupdate(const char * path, struct passwd * pwd, char const * user)
41{
42 int pfd, tfd;
43 struct passwd *pw = NULL;
44 struct passwd *old_pw = NULL;
45
46 printf("===> %s\n", path);
46 if (pwd != NULL)
47 pw = pw_dup(pwd);
48
49 if (user != NULL)
50 old_pw = GETPWNAM(user);
51
52 if (pw_init(NULL, path))
53 err(1,"pw_init()");

--- 40 unchanged lines hidden ---
47 if (pwd != NULL)
48 pw = pw_dup(pwd);
49
50 if (user != NULL)
51 old_pw = GETPWNAM(user);
52
53 if (pw_init(NULL, path))
54 err(1,"pw_init()");

--- 40 unchanged lines hidden ---