lkml.org 
[lkml]   [2009]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 00/23] Removal of binary sysctl support
From
Date
Hello.

Eric W. Biederman wrote:
> Tetsuo Handa writes:
>
> > 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.
>
> I have been looking at this and in the sysctl tree I am now going through
> the vfs for all of the the operations on /proc/sys. I believe that means
> we can completely remove the sysctl special case in tomoyo. Like I have
> in the patch below.
>
> Will that work?
>
> Eric

If you remove sysctl(2) from kernel and let userland libraries emulate

static int name[] = { CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE };
int buffer[2] = { 0, 0 };
int size = sizeof(buffer);
sysctl(name, 3, buffer, &size, 0, 0);

like

FILE *fp = fopen("/proc/sys/net/ipv4/ip_local_port_range", "r");
int buffer[2] = { 0, 0 };
fscanf(fp, "%u %u", &buffer[0], &buffer[1]);
fclose(fp);

or you modify sysctl(2) to call security_dentry_open() rather than
security_sysctl(), we can completely remove the sysctl special case in tomoyo.

Regards.


\
 
 \ /
  Last update: 2009-11-18 23:07    [W:0.057 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site