From: Tetsuo Handa Date: Mon, 9 Nov 2009 00:12:15 +0000 (+0900) Subject: sysctl security/tomoyo: Don't look at ctl_name X-Git-Tag: v2.6.33-rc1~392^2~8 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=86b1bc68e2f4244e4ea5db5458df9d19259fbb30;p=karo-tx-linux.git sysctl security/tomoyo: Don't look at ctl_name ctl_name field was removed. Always use procname field. Signed-off-by: Tetsuo Handa Signed-off-by: Eric W. Biederman --- diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index 9548a0984cc4..3f93bb91768b 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c @@ -122,15 +122,7 @@ static char *tomoyo_sysctl_path(struct ctl_table *table) *--end = '\0'; buflen--; while (table) { - char num[32]; - 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) || + if (tomoyo_prepend(&end, &buflen, table->procname) || tomoyo_prepend(&end, &buflen, "/")) goto out; table = table->parent;