tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: couple sysctl(9) questions



On Thu, Aug 14, 2008 at 05:15:08PM -0500, Jeremy C. Reed wrote:
> 1) Trying to understand sysctl_createv ... in 
> src/sys/secmodel/bsd44/secmodel_bsd44.c I see:
> 
>         sysctl_createv(clog, 0, &rnode, NULL,
>                        CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
>                        CTLTYPE_INT, "curtain", NULL,
>                        NULL, 0, &secmodel_bsd44_curtain, 0,
>                        CTL_CREATE, CTL_EOL);
> 
> ...
> 
>         sysctl_createv(clog, 0, &rnode, NULL,
>                        CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
>                        CTLTYPE_INT, "curtain",
>                        SYSCTL_DESCR("Curtain information about objects to "
>                                     "users not owning them."),
>                        NULL, 0, &secmodel_bsd44_curtain, 0,
>                        CTL_CREATE, CTL_EOL);
> 
> What is this "curtain" twice? (One without description.)
> 
> tx:netbsd$ sysctl -dA security | head -7
> security: Security
> security.curtain: (no description)
           ^^^^^^^
That's the first one

> security.models: (no description)
> security.models.bsd44: Traditional NetBSD Security model, derived from 4.4BSD
> security.models.bsd44.name: (no description)
> security.models.bsd44.securelevel: System security level
> security.models.bsd44.curtain: Curtain information about objects to users 
                        ^^^^^^^
That's the second one.

Now, why are there two of them?  No clue.

> not owning them.
> 
> 2) Also what uses the SYSCTL_SETUP description argument?

Debug purposes (optins SYSCTL_DEBUG_SETUP).

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgp23QeXNj0um.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index