patch-2.4.23 linux-2.4.23/fs/proc/proc_devtree.c
Next file: linux-2.4.23/fs/proc/proc_misc.c
Previous file: linux-2.4.23/fs/proc/kcore.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/fs/proc/proc_devtree.c
- Orig date:
2000-05-21 20:34:37.000000000 -0700
diff -urN linux-2.4.22/fs/proc/proc_devtree.c linux-2.4.23/fs/proc/proc_devtree.c
@@ -59,11 +59,14 @@
* Unfortunately proc_register puts each new entry
* at the beginning of the list. So we rearrange them.
*/
- ent = create_proc_read_entry(pp->name, S_IRUGO, de,
- property_read_proc, pp);
+ ent = create_proc_read_entry(pp->name, strncmp(pp->name, "security-", 9) ?
+ S_IRUGO : S_IRUSR, de, property_read_proc, pp);
if (ent == 0)
break;
- ent->size = pp->length;
+ if (!strncmp(pp->name, "security-", 9))
+ ent->size = 0; /* don't leak number of password chars */
+ else
+ ent->size = pp->length;
*lastp = ent;
lastp = &ent->next;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)