rpms/krb5/devel krb5-1.7-time_t_size.patch,1.1,1.2

Nalin Dahyabhai nalin at fedoraproject.org
Fri Jun 26 21:42:13 UTC 2009


Author: nalin

Update of /cvs/extras/rpms/krb5/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28038

Modified Files:
	krb5-1.7-time_t_size.patch 
Log Message:
- merge in another hunk that we reported along with what was already in here


krb5-1.7-time_t_size.patch:

Index: krb5-1.7-time_t_size.patch
===================================================================
RCS file: /cvs/extras/rpms/krb5/devel/krb5-1.7-time_t_size.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- krb5-1.7-time_t_size.patch	4 Jun 2009 22:17:17 -0000	1.1
+++ krb5-1.7-time_t_size.patch	26 Jun 2009 21:42:13 -0000	1.2
@@ -1,9 +1,52 @@
-This apparently-vestigial code could corrupt the stack.
+Handle ut_tv not always being a struct timeval.  RT#TBD
 
-diff -up krb5-1.7/src/appl/bsd/login.c krb5-1.7/src/appl/bsd/login.c
---- krb5-1.7/src/appl/bsd/login.c	2009-06-02 17:53:45.000000000 -0400
-+++ krb5-1.7/src/appl/bsd/login.c	2009-06-02 17:53:47.000000000 -0400
-@@ -724,7 +724,6 @@ int main(argc, argv)
+Index: krb5/src/appl/libpty/update_utmp.c
+===================================================================
+--- krb5/src/appl/libpty/update_utmp.c	(revision 22423)
++++ krb5/src/appl/libpty/update_utmp.c	(working copy)
+@@ -291,6 +291,12 @@
+  * The ut_exit field seems to exist in utmp, but not utmpx. The files
+  * utmp and wtmp seem to exist, but not utmpx, or wtmpx.
+  *
++ * glibc:
++ *
++ * The ut_tv field of struct utmp/utmpx may be an anonymous structure
++ * containing 32-bit values on systems where time_t is 64 bits.  Its
++ * fields have the same names, though.
++ *
+  * libpty Implementation Decisions:
+  * --------------------------------
+  *
+@@ -505,6 +511,8 @@
+ 		    const char *line, const char *host, int flags)
+ {
+     PTY_STRUCT_UTMPX utx, *utxtmp, utx2;
++    struct timeval ut_tv;
++    time_t login_time;
+     const char *cp;
+     size_t len;
+     char utmp_id[5];
+@@ -577,10 +585,13 @@
+ 	utxtmp = best_utxent(&utx);
+ 
+ #ifdef HAVE_SETUTXENT
+-    if (gettimeofday(&utx.ut_tv, NULL))
++    if (gettimeofday(&ut_tv, NULL))
+ 	return errno;
++    utx.ut_tv.tv_sec = ut_tv.tv_sec;
++    utx.ut_tv.tv_usec = ut_tv.tv_usec;
+ #else
+-    (void)time(&utx.ut_time);
++    (void)time(&login_time);
++    utx.ut_time = login_time;
+ #endif
+     /*
+      * On what system is there not ut_host?  Unix98 doesn't mandate
+Index: krb5/src/appl/bsd/login.c
+===================================================================
+--- krb5/src/appl/bsd/login.c	(revision 22423)
++++ krb5/src/appl/bsd/login.c	(working copy)
+@@ -719,7 +719,6 @@
      char *domain, **envinit, *ttyn, *tty;
      char tbuf[MAXPATHLEN + 2];
      char *ttyname(), *crypt(), *getpass();
@@ -11,7 +54,7 @@ diff -up krb5-1.7/src/appl/bsd/login.c k
      int retval;
      int rewrite_ccache = 1; /*try to write out ccache*/
  #ifdef KRB5_GET_TICKETS
-@@ -1124,9 +1123,6 @@ int main(argc, argv)
+@@ -1071,9 +1070,6 @@
  
      /* nothing else left to fail -- really log in */
      {




More information about the fedora-extras-commits mailing list