[Pkg-shadow-commits] r1630 - in debian/trunk/debian: . patches

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Fri Jan 4 20:28:51 UTC 2008


Author: nekral-guest
Date: 2008-01-04 20:28:51 +0000 (Fri, 04 Jan 2008)
New Revision: 1630

Removed:
   debian/trunk/debian/patches/419_time_structures.dpatch
Modified:
   debian/trunk/debian/changelog
   debian/trunk/debian/patches/008_login_log_failure_in_FTMP
   debian/trunk/debian/patches/series
Log:
The only remaining chunk of 419_time_structures.dpatch was coming from
008_login_log_failure_in_FTMP.
Fix 008_login_log_failure_in_FTMP, and remove 419_time_structures.dpatch


Modified: debian/trunk/debian/changelog
===================================================================
--- debian/trunk/debian/changelog	2008-01-04 19:59:42 UTC (rev 1629)
+++ debian/trunk/debian/changelog	2008-01-04 20:28:51 UTC (rev 1630)
@@ -32,8 +32,11 @@
       -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 from
       CFLAGS.
     - 479_chowntty_debug was debian specific. Renamed to 579_chowntty_debug
-    - Reapply 419_time_structures.dpatch. Remove teh parts which are already
-      fixed upstream (not necessarily the same way).
+    - Remove (not applied patch) 419_time_structures.dpatch. All its chunks
+      are already applied upstream (with some differences), except one chunk
+      which comes from 008_login_log_failure_in_FTMP. Fix
+      008_login_log_failure_in_FTMP. This should fix some bugs causing invalid
+      faillog entries on 64 bit architectures with 32 bit compatibility.
 
  -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Sat, 17 Nov 2007 18:33:26 +0100
 

Modified: debian/trunk/debian/patches/008_login_log_failure_in_FTMP
===================================================================
--- debian/trunk/debian/patches/008_login_log_failure_in_FTMP	2008-01-04 19:59:42 UTC (rev 1629)
+++ debian/trunk/debian/patches/008_login_log_failure_in_FTMP	2008-01-04 20:28:51 UTC (rev 1630)
@@ -8,17 +8,26 @@
 ===================================================================
 --- shadow-4.0.18.1.orig/src/login.c	2006-09-17 12:17:54.336008314 +0200
 +++ shadow-4.0.18.1/src/login.c	2006-09-17 12:17:54.972013371 +0200
-@@ -716,6 +716,20 @@
+@@ -716,6 +716,29 @@
  #endif				/* WITH_AUDIT */
  
  			  fprintf(stderr,"\nLogin incorrect\n");
 +			  if (getdef_str("FTMP_FILE") != NULL) {
 +#if HAVE_UTMPX_H
 +			    failent = utxent;
-+			    gettimeofday(&(failent.ut_tv), NULL);
++			    if (sizeof (failent.ut_tv) == sizeof (struct timeval))
++				    gettimeofday((struct timeval *)
++				                 &failent.ut_tv, NULL);
++			    else {
++				    struct timeval tv;
++
++				    gettimeofday (&tv, NULL);
++				    failent.ut_tv.tv_sec = tv.tv_sec;
++				    failent.ut_tv.tv_usec = tv.tv_usec;
++			    }
 +#else
 +			    failent = utent;
-+			    time(&failent.ut_time);
++			    failent.ut_time = time(NULL);
 +#endif
 +			    strncpy(failent.ut_user, failent_user, sizeof(failent.ut_user));
 +#ifdef USER_PROCESS

Deleted: debian/trunk/debian/patches/419_time_structures.dpatch
===================================================================
--- debian/trunk/debian/patches/419_time_structures.dpatch	2008-01-04 19:59:42 UTC (rev 1629)
+++ debian/trunk/debian/patches/419_time_structures.dpatch	2008-01-04 20:28:51 UTC (rev 1630)
@@ -1,44 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 319_time_structures.dpatch by Nicolas FRANCOIS <nicolas.francois at centraliens.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: I didn't find a related bug in the BTS.
-## DP: It must be related to the 1:4.0.3-22 changelog:
-## DP:   Don't assume that lastlog.ll_time or utmp.ut_time or utmpx.ut_tv are
-## DP:   made up of time_ts and timevals, because they aren't on x86-64.
-## DP:   Dismaying but true.
-## DP:   -- Karl Ramm <kcr at debian.org>  Sun, 14 Mar 2004
-## DP: 
-## DP: Some parts of this patch have been applied upstream. The other parts
-## DP: should be checked.
-## DP:
-## DP: With the Glibc, with __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32,
-## DP: ut_time (i.e. ut_tv.tv_sec) is not a time_t but an int32 (ditto for
-## DP: ll_time)
-
- at DPATCH@
-Index: shadow-4.1.0/src/login.c
-===================================================================
---- shadow-4.1.0.orig/src/login.c	2008-01-03 23:00:48.872001845 +0100
-+++ shadow-4.1.0/src/login.c	2008-01-03 23:15:56.012001027 +0100
-@@ -736,10 +736,18 @@
- 			  if (getdef_str("FTMP_FILE") != NULL) {
- #if HAVE_UTMPX_H
- 			    failent = utxent;
--			    gettimeofday(&(failent.ut_tv), NULL);
-+			    /* don't assume that utmpx.ut_tv is a struct
-+			       timeval */
-+			    {
-+				struct timeval tv;
-+
-+				gettimeofday(&tv, NULL);
-+				failent.ut_tv.tv_sec = tv.tv_sec;
-+				failent.ut_tv.tv_usec = tv.tv_usec;
-+			    }
- #else
- 			    failent = utent;
--			    time(&failent.ut_time);
-+			    failent.ut_time = time(0);
- #endif
- 			    strncpy(failent.ut_user, failent_user, sizeof(failent.ut_user));
- #ifdef USER_PROCESS

Modified: debian/trunk/debian/patches/series
===================================================================
--- debian/trunk/debian/patches/series	2008-01-04 19:59:42 UTC (rev 1629)
+++ debian/trunk/debian/patches/series	2008-01-04 20:28:51 UTC (rev 1630)
@@ -6,7 +6,6 @@
 434_login_stop_checking_args_after--
 008_login_log_failure_in_FTMP
 429_login_FAILLOG_ENAB
-419_time_structures.dpatch
 401_cppw_src.dpatch
 504_undef_USE_PAM.dpatch
 504_undef_USE_PAM.nolibpam




More information about the Pkg-shadow-commits mailing list