sysctl security/tomoyo: Don't look at ctl_name
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mon, 9 Nov 2009 00:12:15 +0000 (09:12 +0900)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 12 Nov 2009 10:05:05 +0000 (02:05 -0800)
ctl_name field was removed. Always use procname field.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
security/tomoyo/tomoyo.c

index 9548a0984cc43674c8b5470ef5931bf71ac9cb1e..3f93bb91768b589575bbe13c02d7fe8a52b8099c 100644 (file)
@@ -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;