Skip to content

Commit 86b1bc6

Browse files
Tetsuo Handaebiederm
authored andcommitted
sysctl security/tomoyo: Don't look at ctl_name
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>
1 parent 5046961 commit 86b1bc6

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎security/tomoyo/tomoyo.c‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,7 @@ static char *tomoyo_sysctl_path(struct ctl_table *table)
122122
*--end = '\0';
123123
buflen--;
124124
while (table) {
125-
char num[32];
126-
const char *sp = table->procname;
127-
128-
if (!sp) {
129-
memset(num, 0, sizeof(num));
130-
snprintf(num, sizeof(num) - 1, "=%d=", table->ctl_name);
131-
sp = num;
132-
}
133-
if (tomoyo_prepend(&end, &buflen, sp) ||
125+
if (tomoyo_prepend(&end, &buflen, table->procname) ||
134126
tomoyo_prepend(&end, &buflen, "/"))
135127
goto out;
136128
table = table->parent;

0 commit comments

Comments
 (0)