Skip to content

Commit

Permalink
[PATCH] sysctl: remove support for CTL_ANY
Browse files Browse the repository at this point in the history
There are currently no users in the kernel for CTL_ANY and it only has effect
on the binary interface which is practically unused.

So this complicates sysctl lookups for no good reason so just remove it.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Feb 14, 2007
1 parent 2abc26f commit 6703ddf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ struct __sysctl_args {

/* For internal pattern-matching use only: */
#ifdef __KERNEL__
#define CTL_ANY -1 /* Matches any name */
#define CTL_NONE 0
#define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */
#endif
Expand Down
2 changes: 1 addition & 1 deletion kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ static int parse_table(int __user *name, int nlen,
for ( ; table->ctl_name || table->procname; table++) {
if (!table->ctl_name)
continue;
if (n == table->ctl_name || table->ctl_name == CTL_ANY) {
if (n == table->ctl_name) {
int error;
if (table->child) {
if (ctl_perm(table, 001))
Expand Down

0 comments on commit 6703ddf

Please sign in to comment.