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

Collapse All | Expand All

(-)auth.c.old (-1 / +3 lines)
Lines 721-730 Link Here
721
	fake.pw_name = "NOUSER";
721
	fake.pw_name = "NOUSER";
722
	fake.pw_passwd =
722
	fake.pw_passwd =
723
	    "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK";
723
	    "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK";
724
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
724
	fake.pw_gecos = "NOUSER";
725
	fake.pw_gecos = "NOUSER";
726
#endif
725
	fake.pw_uid = privsep_pw == NULL ? (uid_t)-1 : privsep_pw->pw_uid;
727
	fake.pw_uid = privsep_pw == NULL ? (uid_t)-1 : privsep_pw->pw_uid;
726
	fake.pw_gid = privsep_pw == NULL ? (gid_t)-1 : privsep_pw->pw_gid;
728
	fake.pw_gid = privsep_pw == NULL ? (gid_t)-1 : privsep_pw->pw_gid;
727
#ifdef HAVE_PW_CLASS_IN_PASSWD
729
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
728
	fake.pw_class = "";
730
	fake.pw_class = "";
729
#endif
731
#endif
730
	fake.pw_dir = "/nonexist";
732
	fake.pw_dir = "/nonexist";
(-)configure.ac.old (-41 / +9 lines)
Lines 3302-3310 Link Here
3302
OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmpx.h], [HAVE_TV_IN_UTMPX])
3302
OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmpx.h], [HAVE_TV_IN_UTMPX])
3303
3303
3304
AC_CHECK_MEMBERS([struct stat.st_blksize])
3304
AC_CHECK_MEMBERS([struct stat.st_blksize])
3305
AC_CHECK_MEMBERS([struct passwd.pw_gecos, struct passwd.pw_class,
3306
struct passwd.pw_change, struct passwd.pw_expire],
3307
[], [], [[
3308
#include <sys/types.h>
3309
#include <pwd.h>
3310
]])
3311
3305
AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE([__res_state], [state],
3312
AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE([__res_state], [state],
3306
	[Define if we don't have struct __res_state in resolv.h])],
3313
	[Define if we don't have struct __res_state in resolv.h])],
3307
[
3314
[[
3308
#include <stdio.h>
3315
#include <stdio.h>
3309
#if HAVE_SYS_TYPES_H
3316
#if HAVE_SYS_TYPES_H
3310
# include <sys/types.h>
3317
# include <sys/types.h>
Lines 3312-3318 Link Here
3312
#include <netinet/in.h>
3319
#include <netinet/in.h>
3313
#include <arpa/nameser.h>
3320
#include <arpa/nameser.h>
3314
#include <resolv.h>
3321
#include <resolv.h>
3315
])
3322
]])
3316
3323
3317
AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
3324
AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
3318
		ac_cv_have_ss_family_in_struct_ss, [
3325
		ac_cv_have_ss_family_in_struct_ss, [
Lines 3342-3386 Link Here
3342
		[Fields in struct sockaddr_storage])
3349
		[Fields in struct sockaddr_storage])
3343
fi
3350
fi
3344
3351
3345
AC_CACHE_CHECK([for pw_class field in struct passwd],
3346
		ac_cv_have_pw_class_in_struct_passwd, [
3347
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <pwd.h> ]],
3348
	[[ struct passwd p; p.pw_class = 0; ]])],
3349
	[ ac_cv_have_pw_class_in_struct_passwd="yes" ],
3350
	[ ac_cv_have_pw_class_in_struct_passwd="no" 
3351
	])
3352
])
3353
if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
3354
	AC_DEFINE([HAVE_PW_CLASS_IN_PASSWD], [1],
3355
		[Define if your password has a pw_class field])
3356
fi
3357
3358
AC_CACHE_CHECK([for pw_expire field in struct passwd],
3359
		ac_cv_have_pw_expire_in_struct_passwd, [
3360
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <pwd.h> ]],
3361
	[[ struct passwd p; p.pw_expire = 0; ]])],
3362
	[ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
3363
	[ ac_cv_have_pw_expire_in_struct_passwd="no" 
3364
	])
3365
])
3366
if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
3367
	AC_DEFINE([HAVE_PW_EXPIRE_IN_PASSWD], [1],
3368
		[Define if your password has a pw_expire field])
3369
fi
3370
3371
AC_CACHE_CHECK([for pw_change field in struct passwd],
3372
		ac_cv_have_pw_change_in_struct_passwd, [
3373
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <pwd.h> ]],
3374
	[[ struct passwd p; p.pw_change = 0; ]])],
3375
	[ ac_cv_have_pw_change_in_struct_passwd="yes" ],
3376
	[ ac_cv_have_pw_change_in_struct_passwd="no" 
3377
	])
3378
])
3379
if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
3380
	AC_DEFINE([HAVE_PW_CHANGE_IN_PASSWD], [1],
3381
		[Define if your password has a pw_change field])
3382
fi
3383
3384
dnl make sure we're using the real structure members and not defines
3352
dnl make sure we're using the real structure members and not defines
3385
AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
3353
AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
3386
		ac_cv_have_accrights_in_msghdr, [
3354
		ac_cv_have_accrights_in_msghdr, [
(-)misc.c.old (-3 / +5 lines)
Lines 206-221 Link Here
206
206
207
	copy->pw_name = xstrdup(pw->pw_name);
207
	copy->pw_name = xstrdup(pw->pw_name);
208
	copy->pw_passwd = xstrdup(pw->pw_passwd);
208
	copy->pw_passwd = xstrdup(pw->pw_passwd);
209
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
209
	copy->pw_gecos = xstrdup(pw->pw_gecos);
210
	copy->pw_gecos = xstrdup(pw->pw_gecos);
211
#endif
210
	copy->pw_uid = pw->pw_uid;
212
	copy->pw_uid = pw->pw_uid;
211
	copy->pw_gid = pw->pw_gid;
213
	copy->pw_gid = pw->pw_gid;
212
#ifdef HAVE_PW_EXPIRE_IN_PASSWD
214
#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
213
	copy->pw_expire = pw->pw_expire;
215
	copy->pw_expire = pw->pw_expire;
214
#endif
216
#endif
215
#ifdef HAVE_PW_CHANGE_IN_PASSWD
217
#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
216
	copy->pw_change = pw->pw_change;
218
	copy->pw_change = pw->pw_change;
217
#endif
219
#endif
218
#ifdef HAVE_PW_CLASS_IN_PASSWD
220
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
219
	copy->pw_class = xstrdup(pw->pw_class);
221
	copy->pw_class = xstrdup(pw->pw_class);
220
#endif
222
#endif
221
	copy->pw_dir = xstrdup(pw->pw_dir);
223
	copy->pw_dir = xstrdup(pw->pw_dir);
(-)monitor.c.old (-1 / +3 lines)
Lines 778-785 Link Here
778
	buffer_put_string(m, pwent, sizeof(struct passwd));
778
	buffer_put_string(m, pwent, sizeof(struct passwd));
779
	buffer_put_cstring(m, pwent->pw_name);
779
	buffer_put_cstring(m, pwent->pw_name);
780
	buffer_put_cstring(m, "*");
780
	buffer_put_cstring(m, "*");
781
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
781
	buffer_put_cstring(m, pwent->pw_gecos);
782
	buffer_put_cstring(m, pwent->pw_gecos);
782
#ifdef HAVE_PW_CLASS_IN_PASSWD
783
#endif
784
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
783
	buffer_put_cstring(m, pwent->pw_class);
785
	buffer_put_cstring(m, pwent->pw_class);
784
#endif
786
#endif
785
	buffer_put_cstring(m, pwent->pw_dir);
787
	buffer_put_cstring(m, pwent->pw_dir);
(-)monitor_wrap.c.old (-1 / +3 lines)
Lines 259-266 Link Here
259
		fatal("%s: struct passwd size mismatch", __func__);
259
		fatal("%s: struct passwd size mismatch", __func__);
260
	pw->pw_name = buffer_get_string(&m, NULL);
260
	pw->pw_name = buffer_get_string(&m, NULL);
261
	pw->pw_passwd = buffer_get_string(&m, NULL);
261
	pw->pw_passwd = buffer_get_string(&m, NULL);
262
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
262
	pw->pw_gecos = buffer_get_string(&m, NULL);
263
	pw->pw_gecos = buffer_get_string(&m, NULL);
263
#ifdef HAVE_PW_CLASS_IN_PASSWD
264
#endif
265
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
264
	pw->pw_class = buffer_get_string(&m, NULL);
266
	pw->pw_class = buffer_get_string(&m, NULL);
265
#endif
267
#endif
266
	pw->pw_dir = buffer_get_string(&m, NULL);
268
	pw->pw_dir = buffer_get_string(&m, NULL);

Return to bug 2086