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

« back to all changes in this revision

Viewing changes to debian/patches/70_wall_ttyname.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
## 70_wall_ttyname.dpatch by Petter Reinholdtsen
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Use UT_LINESIZE from <utmp.h> instead of hardcoded string
 
6
## DP: lengths.  Patch from SuSe.
 
7
 
 
8
@DPATCH@
 
9
Index: sysvinit/src/dowall.c
 
10
===================================================================
 
11
--- sysvinit/src/dowall.c       (revisjon 64)
 
12
+++ sysvinit/src/dowall.c       (arbeidskopi)
 
13
@@ -65,7 +65,7 @@
 
14
        uid_t                   uid;
 
15
        char                    *tty;
 
16
        static char             uidbuf[32];
 
17
-       static char             ttynm[32];
 
18
+       static char             ttynm[UT_LINESIZE + 4];
 
19
        static int              init = 0;
 
20
 
 
21
        if (!init) {
 
22
@@ -180,7 +180,7 @@
 
23
                   utmp->ut_user[0] == 0) continue;
 
24
                if (strncmp(utmp->ut_line, "/dev/", 5) == 0) {
 
25
                        term[0] = 0;
 
26
-                       strncat(term, utmp->ut_line, UT_LINESIZE);
 
27
+                       strncat(term, utmp->ut_line, sizeof(term)-1);
 
28
                } else
 
29
                        snprintf(term, sizeof(term), "/dev/%.*s",
 
30
                                UT_LINESIZE, utmp->ut_line);