Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142663806
D47107.id145461.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47107.id145461.diff
View Options
diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8
--- a/sbin/sysctl/sysctl.8
+++ b/sbin/sysctl/sysctl.8
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd August 18, 2023
+.Dd October 14, 2024
.Dt SYSCTL 8
.Os
.Sh NAME
@@ -153,6 +153,8 @@
Display only variables that are settable via loader (CTLFLAG_TUN).
.It Fl t
Print the type of the variable.
+.It Fl V
+Display only VNET sysctl variables (CTLFLAG_VNET).
.It Fl W
Display only writable variables that are not statistical.
Useful for determining the set of runtime tunable sysctls.
@@ -325,7 +327,8 @@
.Xr loader.conf 5 ,
.Xr sysctl.conf 5 ,
.Xr security 7 ,
-.Xr loader 8
+.Xr loader 8 ,
+.Xr jail 8
.Sh HISTORY
A
.Nm
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -63,7 +63,7 @@
static int aflag, bflag, Bflag, dflag, eflag, hflag, iflag;
static int Nflag, nflag, oflag, qflag, tflag, Tflag, Wflag, xflag;
-static bool Fflag, lflag;
+static bool Fflag, lflag, Vflag;
static int oidfmt(int *, int, char *, u_int *);
static int parsefile(const char *);
@@ -136,7 +136,7 @@
setbuf(stdout,0);
setbuf(stderr,0);
- while ((ch = getopt(argc, argv, "AabB:def:FhilNnoqtTwWxX")) != -1) {
+ while ((ch = getopt(argc, argv, "AabB:def:FhilNnoqtTVwWxX")) != -1) {
switch (ch) {
case 'A':
/* compatibility */
@@ -190,6 +190,9 @@
case 'T':
Tflag = 1;
break;
+ case 'V':
+ Vflag = true;
+ break;
case 'w':
/* compatibility */
/* ignored */
@@ -1052,6 +1055,10 @@
if (Tflag && (kind & CTLFLAG_TUN) == 0)
return (1);
+ /* if Vflag then only list sysctls that are vnet variables. */
+ if (Vflag && (kind & CTLFLAG_VNET) == 0)
+ return (1);
+
if (Nflag) {
printf("%s", name);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 23, 12:19 AM (4 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27868888
Default Alt Text
D47107.id145461.diff (1 KB)
Attached To
Mode
D47107: sysctl: Add flags to filter jail prison and vnet variables
Attached
Detach File
Event Timeline
Log In to Comment