~ubuntu-branches/debian/experimental/sysvinit/experimental

« back to all changes in this revision

Viewing changes to debian/patches/41_utmp_64bit.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Petter Reinholdtsen
  • Date: 2008-08-12 16:07:50 UTC
  • Revision ID: james.westby@ubuntu.com-20080812160750-65gpyv74vh4qr69w
Tags: 2.86.ds1-61
* Fix typo in rcS(5), proberly->properly (Closes: #484233).  Thanks to
  Julien Danjou for noticing.
* Fix typo in rcS(5), maually->manually (Closes: #493680).  Thanks to
  Xr for noticing.
* Modify runlevel detection code in invoke-rc.d to notice the
  difference between runlevels 0 and 6, and the boot runlevel, to
  make it possible to use invoke-rc.d during boot (Closes: 384509).
* Make sure to call restorecon after mounting tmpfs file systems, to
  set SELinux permissions (Closes: #493679).  Patch from Russell
  Coker.
* Move responsibility of stopping the splash screen process from
  individual init.d scripts to init.d/rc.  This make sure the
  progress calculation reflect reality, and that the splash screen
  is taken down in runlevel 1 (Closes: #431560) and that it stop
  before gdm and kdm (Closes: #422922, #489734).
* Skip error message from checkfs.sh when / is read-only.  Patch
  from Mirek Slugen (Closes: #492214).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
# 41_wtmp_64bit.dpatch by Petter Reinholdtsen
 
3
 
 
4
The patch is a copy of sysvinit-2.86-timeval.patch from Fedora.  It
 
5
fixes utmp/wtmp updating of ut_addr_v6 on 64-bit platforms.  See bug
 
6
https://bugzilla.redhat.com/show_bug.cgi?id=176494
 
7
 
 
8
@DPATCH@
 
9
--- sysvinit-2.86/src/utmp.c.timeval    1999-06-09 07:11:33.000000000 -0400
 
10
+++ sysvinit-2.86/src/utmp.c    2006-08-09 19:46:26.000000000 -0400
 
11
@@ -47,7 +47,8 @@
 
12
        int fd;
 
13
        struct utmp utmp;
 
14
        struct utsname uname_buf;
 
15
-
 
16
+       struct timeval tv;
 
17
+       
 
18
        /*
 
19
         *      Try to open the wtmp file. Note that we even try
 
20
         *      this if we have updwtmp() so we can see if the
 
21
@@ -76,7 +77,9 @@
 
22
         */
 
23
        memset(&utmp, 0, sizeof(utmp));
 
24
 #if defined(__GLIBC__)
 
25
-       gettimeofday(&utmp.ut_tv, NULL);
 
26
+       gettimeofday(&tv, NULL);
 
27
+       utmp.ut_tv.tv_sec = tv.tv_sec;
 
28
+       utmp.ut_tv.tv_usec = tv.tv_usec;
 
29
 #else
 
30
        time(&utmp.ut_time);
 
31
 #endif
 
32
@@ -113,6 +116,7 @@
 
33
        struct utmp utmp;
 
34
        struct utmp tmp;
 
35
        struct utmp *utmptr;
 
36
+       struct timeval tv;
 
37
 
 
38
        /*
 
39
         *      Can't do much if UTMP_FILE is not present.
 
40
@@ -144,7 +148,9 @@
 
41
        utmp.ut_pid = pid;
 
42
        strncpy(utmp.ut_id, id, sizeof(utmp.ut_id));
 
43
 #if defined(__GLIBC__)
 
44
-       gettimeofday(&utmp.ut_tv, NULL);
 
45
+       gettimeofday(&tv, NULL);
 
46
+       utmp.ut_tv.tv_sec = tv.tv_sec;
 
47
+       utmp.ut_tv.tv_usec = tv.tv_usec;
 
48
 #else
 
49
        time(&utmp.ut_time);
 
50
 #endif