Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 811f0c28ab
Fetching contributors…

Cannot retrieve contributors at this time

96 lines (88 sloc) 3.148 kB
=== modified file 'auth.c'
--- auth.c 2013-04-03 20:14:57 +0000
+++ auth.c 2013-04-03 21:35:18 +0000
@@ -721,7 +721,9 @@
fake.pw_name = "NOUSER";
fake.pw_passwd =
"$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK";
+#ifdef HAVE_PW_GECOS_IN_PASSWD
fake.pw_gecos = "NOUSER";
+#endif
fake.pw_uid = privsep_pw == NULL ? (uid_t)-1 : privsep_pw->pw_uid;
fake.pw_gid = privsep_pw == NULL ? (gid_t)-1 : privsep_pw->pw_gid;
#ifdef HAVE_PW_CLASS_IN_PASSWD
=== modified file 'configure.ac'
--- configure.ac 2013-04-03 20:14:57 +0000
+++ configure.ac 2013-04-03 22:14:13 +0000
@@ -482,6 +482,11 @@
AC_DEFINE([PTY_ZEROREAD], [1], [read(1) can return 0 for a non-closed fd])
AC_DEFINE([PLATFORM_SYS_DIR_UID], 2, [System dirs owned by bin (uid 2)])
;;
+*-*-androideabi*)
+ AC_DEFINE([MISSING_FD_MASK], [1], [Define on *androideabi systems])
+ AC_DEFINE([MISSING_HOWMANY], [1], [Define on *androideabi systems])
+ AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp])
+ ;;
*-*-cygwin*)
check_for_libcrypt_later=1
LIBS="$LIBS /usr/lib/textreadmode.o"
@@ -3341,6 +3346,19 @@
[Fields in struct sockaddr_storage])
fi
+AC_CACHE_CHECK([for pw_gecos field in struct passwd],
+ ac_cv_have_pw_gecos_in_struct_passwd, [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <pwd.h> ]],
+ [[ struct passwd p; p.pw_gecos = 0; ]])],
+ [ ac_cv_have_pw_gecos_in_struct_passwd="yes" ],
+ [ ac_cv_have_pw_gecos_in_struct_passwd="no"
+ ])
+])
+if test "x$ac_cv_have_pw_gecos_in_struct_passwd" = "xyes" ; then
+ AC_DEFINE([HAVE_PW_GECOS_IN_PASSWD], [1],
+ [Define if your password has a pg_gecos field])
+fi
+
AC_CACHE_CHECK([for pw_class field in struct passwd],
ac_cv_have_pw_class_in_struct_passwd, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <pwd.h> ]],
=== modified file 'misc.c'
--- misc.c 2013-04-03 20:14:57 +0000
+++ misc.c 2013-04-03 20:22:07 +0000
@@ -206,9 +206,11 @@
copy->pw_name = xstrdup(pw->pw_name);
copy->pw_passwd = xstrdup(pw->pw_passwd);
- copy->pw_gecos = xstrdup(pw->pw_gecos);
copy->pw_uid = pw->pw_uid;
copy->pw_gid = pw->pw_gid;
+#ifdef HAVE_PW_GECOS_IN_PASSWD
+ copy->pw_gecos = xstrdup(pw->pw_gecos);
+#endif
#ifdef HAVE_PW_EXPIRE_IN_PASSWD
copy->pw_expire = pw->pw_expire;
#endif
=== modified file 'monitor.c'
--- monitor.c 2013-04-03 20:14:57 +0000
+++ monitor.c 2013-04-03 21:39:24 +0000
@@ -778,7 +778,9 @@
buffer_put_string(m, pwent, sizeof(struct passwd));
buffer_put_cstring(m, pwent->pw_name);
buffer_put_cstring(m, "*");
+#ifdef HAVE_PW_GECOS_IN_PASSWD
buffer_put_cstring(m, pwent->pw_gecos);
+#endif
#ifdef HAVE_PW_CLASS_IN_PASSWD
buffer_put_cstring(m, pwent->pw_class);
#endif
=== modified file 'monitor_wrap.c'
--- monitor_wrap.c 2013-04-03 20:14:57 +0000
+++ monitor_wrap.c 2013-04-03 21:43:03 +0000
@@ -259,7 +259,9 @@
fatal("%s: struct passwd size mismatch", __func__);
pw->pw_name = buffer_get_string(&m, NULL);
pw->pw_passwd = buffer_get_string(&m, NULL);
+#ifdef HAVE_PW_GECOS_IN_PASSWD
pw->pw_gecos = buffer_get_string(&m, NULL);
+#endif
#ifdef HAVE_PW_CLASS_IN_PASSWD
pw->pw_class = buffer_get_string(&m, NULL);
#endif
Jump to Line
Something went wrong with that request. Please try again.