Commit 86b1bc68 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Eric W. Biederman

sysctl security/tomoyo: Don't look at ctl_name

ctl_name field was removed. Always use procname field.
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
parent 50469619
...@@ -122,15 +122,7 @@ static char *tomoyo_sysctl_path(struct ctl_table *table) ...@@ -122,15 +122,7 @@ static char *tomoyo_sysctl_path(struct ctl_table *table)
*--end = '\0'; *--end = '\0';
buflen--; buflen--;
while (table) { while (table) {
char num[32]; if (tomoyo_prepend(&end, &buflen, table->procname) ||
const char *sp = table->procname;
if (!sp) {
memset(num, 0, sizeof(num));
snprintf(num, sizeof(num) - 1, "=%d=", table->ctl_name);
sp = num;
}
if (tomoyo_prepend(&end, &buflen, sp) ||
tomoyo_prepend(&end, &buflen, "/")) tomoyo_prepend(&end, &buflen, "/"))
goto out; goto out;
table = table->parent; table = table->parent;
......
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