Commit 0031ac20 authored by Tom Rini's avatar Tom Rini Committed by Paul Mackerras

PPC: Change how we export some Openfirmware device nodes.

From Ethan Benson <erbenson@alaska.net>.
parent 413c4569
...@@ -59,11 +59,14 @@ static void add_node(struct device_node *np, struct proc_dir_entry *de) ...@@ -59,11 +59,14 @@ static void add_node(struct device_node *np, struct proc_dir_entry *de)
* Unfortunately proc_register puts each new entry * Unfortunately proc_register puts each new entry
* at the beginning of the list. So we rearrange them. * at the beginning of the list. So we rearrange them.
*/ */
ent = create_proc_read_entry(pp->name, S_IRUGO, de, ent = create_proc_read_entry(pp->name, strncmp(pp->name, "security-", 9) ?
property_read_proc, pp); S_IRUGO : S_IRUSR, de, property_read_proc, pp);
if (ent == 0) if (ent == 0)
break; 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;
lastp = &ent->next; lastp = &ent->next;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment