Bugzilla – Attachment 2232 Details for
Bug 2086
passwd struct does not have pw_gecos member on Android
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
adds definition for HAVE_PW_GECOS_IN_PASSWD where appropriate
patch2.patch (text/plain), 2.59 KB, created by
Nathan Osman
on 2013-04-05 05:49:28 AEDT
(
hide
)
Description:
adds definition for HAVE_PW_GECOS_IN_PASSWD where appropriate
Filename:
MIME Type:
Creator:
Nathan Osman
Created:
2013-04-05 05:49:28 AEDT
Size:
2.59 KB
patch
obsolete
>=== modified file 'auth.c' >--- auth.c 2013-04-04 18:32:46 +0000 >+++ auth.c 2013-04-04 18:37:29 +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-04 18:32:46 +0000 >+++ configure.ac 2013-04-04 18:43:45 +0000 >@@ -3341,6 +3341,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 pw_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-04 18:32:46 +0000 >+++ misc.c 2013-04-04 18:39:16 +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-04 18:32:46 +0000 >+++ monitor.c 2013-04-04 18:39:52 +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-04 18:32:46 +0000 >+++ monitor_wrap.c 2013-04-04 18:40:24 +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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2086
:
2232
|
2237
|
2249
|
2251