]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.4.22-security.patch
- obsolete
[packages/kernel.git] / linux-2.4.22-security.patch
1 diff -u --recursive --exclude-from /usr/src/exclude --new-file linux.vanilla/fs/proc/generic.c linux.22-ac3/fs/proc/generic.c
2 --- linux.vanilla/fs/proc/generic.c     2003-06-14 00:11:39.000000000 +0100
3 +++ linux.22-ac3/fs/proc/generic.c      2003-07-09 13:45:05.000000000 +0100
4 @@ -485,12 +485,12 @@
5         return ent;
6  }
7  
8 -struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent)
9 +struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode,
10 +               struct proc_dir_entry *parent)
11  {
12         struct proc_dir_entry *ent;
13  
14 -       ent = proc_create(&parent,name,
15 -                         (S_IFDIR | S_IRUGO | S_IXUGO),2);
16 +       ent = proc_create(&parent, name, S_IFDIR | mode, 2);
17         if (ent) {
18                 ent->proc_fops = &proc_dir_operations;
19                 ent->proc_iops = &proc_dir_inode_operations;
20 @@ -503,6 +503,12 @@
21         return ent;
22  }
23  
24 +struct proc_dir_entry *proc_mkdir(const char *name,
25 +               struct proc_dir_entry *parent)
26 +{
27 +       return proc_mkdir_mode(name, S_IRUGO | S_IXUGO, parent);
28 +}
29 +
30  struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
31                                          struct proc_dir_entry *parent)
32  {
33 diff -purN linux-2.4.21/fs/proc/proc_tty.c linux-f/fs/proc/proc_tty.c
34 --- linux-2.4.21/fs/proc/proc_tty.c     2000-04-22 00:17:57.000000000 +0200
35 +++ linux-f/fs/proc/proc_tty.c  2003-07-14 22:10:30.000000000 +0200
36 @@ -16,7 +16,7 @@
37  
38  extern struct tty_driver *tty_drivers; /* linked list of tty drivers */
39  extern struct tty_ldisc ldiscs[];
40 -
41 +extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, struct proc_dir_entry *parent);
42  
43  static int tty_drivers_read_proc(char *page, char **start, off_t off,
44                                  int count, int *eof, void *data);
45 @@ -174,7 +174,13 @@ void __init proc_tty_init(void)
46         if (!proc_mkdir("tty", 0))
47                 return;
48         proc_tty_ldisc = proc_mkdir("tty/ldisc", 0);
49 -       proc_tty_driver = proc_mkdir("tty/driver", 0);
50 +       /*
51 +        * /proc/tty/driver/serial reveals the exact character counts for
52 +        * serial links which is just too easy to abuse for inferring
53 +        * password lengths and inter-keystroke timings during password
54 +        * entry.
55 +        */
56 +       proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR | S_IXUSR, 0);
57  
58         create_proc_read_entry("tty/ldiscs", 0, 0, tty_ldiscs_read_proc,NULL);
59         create_proc_read_entry("tty/drivers", 0, 0, tty_drivers_read_proc,NULL);
This page took 0.063723 seconds and 3 git commands to generate.