MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8245
#include <libutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <libutil.h>
#include <stdio.h>
#include <stdlib.h>
}
if (gr_copy(pfd, tfd, gr, old_gr) == -1) {
gr_fini();
}
if (gr_copy(pfd, tfd, gr, old_gr) == -1) {
gr_fini();
if (gr_mkdb() == -1) {
gr_fini();
err(1, "gr_mkdb()");
if (gr_mkdb() == -1) {
gr_fini();
err(1, "gr_mkdb()");
#include <err.h>
#include <pwd.h>
#include <libutil.h>
#include <err.h>
#include <pwd.h>
#include <libutil.h>
}
if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
pw_fini();
}
if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
pw_fini();
if (chmod(pw_tempname(), 0644) == -1)
err(1, "chmod()");
if (rename(pw_tempname(), path) == -1)
if (chmod(pw_tempname(), 0644) == -1)
err(1, "chmod()");
if (rename(pw_tempname(), path) == -1)
}
if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
pw_fini();
}
if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
pw_fini();
/*
* in case of deletion of a user, the whole database
* needs to be regenerated
/*
* in case of deletion of a user, the whole database
* needs to be regenerated