From 89eb7d62df9bb34b2755c48f7bd74e9335c29151 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 4 Jun 2015 08:00:11 +0000 Subject: revert r283969,283970 not needed anymore after r283981 --- libutil/libutil.h | 4 ---- libutil/pw_util.c | 28 +++------------------------- 2 files changed, 3 insertions(+), 29 deletions(-) (limited to 'libutil') diff --git a/libutil/libutil.h b/libutil/libutil.h index fc32fe7..b20ffa2 100644 --- a/libutil/libutil.h +++ b/libutil/libutil.h @@ -144,9 +144,6 @@ char *fparseln(FILE *_fp, size_t *_len, size_t *_lineno, #endif #ifdef _PWD_H_ -#define PWDB_NATIVE 0 -#define PWDB_LE 1 -#define PWDB_BE 2 int pw_copy(int _ffd, int _tfd, const struct passwd *_pw, struct passwd *_old_pw); struct passwd @@ -158,7 +155,6 @@ int pw_init(const char *_dir, const char *_master); char *pw_make(const struct passwd *_pw); char *pw_make_v7(const struct passwd *_pw); int pw_mkdb(const char *_user); -int pw_mkdb2(const char *_user, int endian); int pw_lock(void); struct passwd * pw_scan(const char *_line, int _flags); diff --git a/libutil/pw_util.c b/libutil/pw_util.c index b0bdad1..befd1fb 100644 --- a/libutil/pw_util.c +++ b/libutil/pw_util.c @@ -242,36 +242,14 @@ pw_tmp(int mfd) return (tfd); } -int -pw_mkdb(const char *user) -{ - - return (pw_mkdb2(user, PWDB_NATIVE)); -} - /* * Regenerate the password database. */ int -pw_mkdb2(const char *user, int endian) +pw_mkdb(const char *user) { int pstat; pid_t pid; - const char *arg; - - switch (endian) { - case PWDB_NATIVE: - arg = "-p"; - break; - case PWDB_LE: - arg = "-pL"; - break; - case PWDB_BE: - arg = "-pB"; - break; - default: - return (-1); - } (void)fflush(stderr); switch ((pid = fork())) { @@ -280,10 +258,10 @@ pw_mkdb2(const char *user, int endian) case 0: /* child */ if (user == NULL) - execl(_PATH_PWD_MKDB, "pwd_mkdb", arg, + execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", passwd_dir, tempname, (char *)NULL); else - execl(_PATH_PWD_MKDB, "pwd_mkdb", arg, + execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", passwd_dir, "-u", user, tempname, (char *)NULL); _exit(1); -- cgit v1.2.3-56-ge451