jaildesc: remove desc from the sysctl parameter list
Like lastjid, desc should count as a pseudo-parameter. The difference lies entirely in the security.jail.param sysctls, which list all of the jail parameters. Since desc opens and returns a file descriptor, it has no place in such uses as "jls all." Like lastjid, it's still recognized by the kernel if passed in/out, and hard-coded into libjail so it can be recognized there. MFC after: 3 days
This commit is contained in:
+9
-1
@@ -920,13 +920,21 @@ jailparam_type(struct jailparam *jp)
|
||||
} desc;
|
||||
int mib[CTL_MAXNAME];
|
||||
|
||||
/* The "lastjid" parameter isn't real. */
|
||||
/*
|
||||
* Some pseudo-parameters don't show up in the sysctl
|
||||
* parameter list.
|
||||
*/
|
||||
name = jp->jp_name;
|
||||
if (!strcmp(name, "lastjid")) {
|
||||
jp->jp_valuelen = sizeof(int);
|
||||
jp->jp_ctltype = CTLTYPE_INT | CTLFLAG_WR;
|
||||
return (0);
|
||||
}
|
||||
if (!strcmp(name, "desc")) {
|
||||
jp->jp_valuelen = sizeof(int);
|
||||
jp->jp_ctltype = CTLTYPE_INT | CTLFLAG_RW;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Find the sysctl that describes the parameter. */
|
||||
mib[0] = 0;
|
||||
|
||||
Reference in New Issue
Block a user