MFC: 228545,229572
Modify pw_copy:
- if pw is NULL and oldpw is not NULL then the oldpw is deleted
- if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid
then it renames the user
add new gr_* functions so now gr_util API is similar to pw_util API,
this allow to manipulate groups in a safe way.
Add new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwd
Approved by: des (mentor)
git-svn-id: svn://svn.freebsd.org/base/stable/9@236451
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f