Re: [PATCH 00/23] Removal of binary sysctl support

From: Tetsuo Handa
Date: Sun Nov 08 2009 - 19:12:26 EST


Eric W. Biederman wrote:
> There has been a gradual transition from the assumption that the table ends with
> !ctl_name to the assumption that procname == NULL. There is no sysctl entry
> with a valid ctl_name without a valid procname.

I see. Then, please add below one to your patchset.

Regards.
----------
[PATCH] 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@xxxxxxxxxxxxxxxxxxx>
---
security/tomoyo/tomoyo.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)

--- security-testing-2.6.orig/security/tomoyo/tomoyo.c
+++ security-testing-2.6/security/tomoyo/tomoyo.c
@@ -122,15 +122,7 @@ static char *tomoyo_sysctl_path(struct c
*--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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/