View | Details | Raw Unified | Return to bug 189173 | Differences between
and this patch

Collapse All | Expand All

(-)pwupd.c (-10 / +2 lines)
Lines 45-53 Link Here
45
45
46
#include "pwupd.h"
46
#include "pwupd.h"
47
47
48
#define HAVE_PWDB_C	1
49
#define	HAVE_PWDB_U	1
50
51
static char pathpwd[] = _PATH_PWD;
48
static char pathpwd[] = _PATH_PWD;
52
static char * pwpath = pathpwd;
49
static char * pwpath = pathpwd;
53
 
50
 
Lines 114-133 Link Here
114
111
115
	/*
112
	/*
116
	 * First, let's check the see if the database is alright
113
	 * First, let's check the see if the database is alright
117
	 * Note: -C is only available in FreeBSD 2.2 and above
118
	 */
114
	 */
119
#ifdef HAVE_PWDB_C
120
	rc = pwdb("-C", (char *)NULL);	/* Check only */
115
	rc = pwdb("-C", (char *)NULL);	/* Check only */
121
	if (rc == 0) {
116
	if (rc == 0) {
122
#else
123
	{				/* No -C */
124
#endif
125
		int pfd, tfd;
117
		int pfd, tfd;
126
		struct passwd *pw = NULL;
118
		struct passwd *pw = NULL;
127
		struct passwd *old_pw = NULL;
119
		struct passwd *old_pw = NULL;
128
120
129
	       	if (pwd != NULL)
121
		if (pwd != NULL)
130
		       pw = pw_dup(pwd);
122
			pw = pw_dup(pwd);
131
123
132
		if (user != NULL)
124
		if (user != NULL)
133
			old_pw = GETPWNAM(user);
125
			old_pw = GETPWNAM(user);

Return to bug 189173