Commit Graph

259 Commits

Author SHA1 Message Date
dholland
05ce5c4223 Apply patch from PR 43587, mostly from martin and kre. When writing a
sysctl variable using ?= fails with EPERM, don't print an error
message.

Ideally setting a sysctl to the same value it already has should also
not fail regardless of permissions, but this would need to be done in
the kernel.
2016-07-31 23:30:28 +00:00
christos
94ae268a8f mention ip6addrctl 2015-12-13 14:24:47 +00:00
knakahara
84f76c9c0f Add intrctl(8). 2015-08-17 06:42:45 +00:00
christos
802a4e04fc remove debugging 2014-11-09 22:50:38 +00:00
christos
66d4eaa769 add handler for /kern/evcnt and print the actual error when failing. 2014-11-09 18:36:02 +00:00
martin
804dc5f91b Get rid of all sysc_init_field uses - initialize fields directly in C99
notation.
2014-05-16 12:22:32 +00:00
martin
722b7feb56 Do not loop over children if a node is not marked as CTLTYPE_NODE. 2014-05-16 08:59:24 +00:00
christos
81c8b4d072 use __func__, EXIT_{SUCCESS,FAILURE} 2014-01-10 18:37:18 +00:00
pooka
bbfd34f128 give err() some reason to avoid:
sysctl.c:2713:5: error: zero-length gnu_printf format string [-Werror=format-zero-length]
2014-01-10 09:38:56 +00:00
msaitoh
a4771072f5 Add missing free() in error path. 2012-12-13 05:27:01 +00:00
christos
9878d5e5c4 use __BITMAP_TYPE 2012-12-07 02:27:29 +00:00
christos
87e18d03a8 fix bug found by clang. 2012-12-05 13:53:39 +00:00
christos
f9868bf95f switch from fd_set to bitmap macros, by popular demand. 2012-12-01 15:30:16 +00:00
christos
b8e38193b8 put back line I accidentally deleted. 2012-11-29 02:24:14 +00:00
christos
97613513e6 add a handler for the reserved port sysctl variable. 2012-11-29 02:06:17 +00:00
christos
de1cb60c9b use the proper variable 2012-11-29 02:05:38 +00:00
dsl
0836a9f544 Add support for unsigned decimal values. 2012-06-02 21:38:09 +00:00
joerg
66dd2755f5 Add __printflike attribution to use vprintf and friends with an argument
as format string.
2012-03-15 02:02:20 +00:00
christos
3ddbe03f5e PR/44961: Jukka Ruohonen: for sysctl's with built-in handlers, return OPNOTSUPP
if we don't have handlers instead of using the handler we have and silently
failing on attempts to write a node that cannot be written.
2012-03-11 23:33:00 +00:00
christos
b678a11dc2 Only print errors when -A or required. Fix the error message to match others. 2012-02-12 20:54:07 +00:00
drochner
8fd6dadaf8 include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland
where possible, for consistency and compatibility to FreeBSD
(exception: KAME specific statistics gathering in netstat(1) and systat(1))
2012-01-04 16:09:40 +00:00
joerg
baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
christos
a14203e91d Instead of using strncat and re-scanning the strings all the time, use and
append printf function.
2011-08-24 12:15:44 +00:00
christos
94a8b1353c no -A or -a with -q 2011-08-03 01:58:30 +00:00
christos
daf90d3763 allow -q flag to work for reads. 2011-08-03 01:47:40 +00:00
christos
00740dd48f PR/44864: Paul Ripke: Compile regular expressions on demand and only once. 2011-04-16 01:15:54 +00:00
pooka
67a4f392d8 use crunchops for crunchables 2010-12-13 21:48:01 +00:00
pooka
f9740ada7f RUMP_ACTION -> RUMPPRG 2010-12-13 17:42:17 +00:00
pooka
08fc937c06 make sysctl(8) work as a rump client 2010-11-05 15:55:23 +00:00
mrg
e00e7bd5c0 implement CTLTYPE_BOOL support. it was entirely missing. HI MATT! 2010-04-11 01:52:10 +00:00
elad
55a6f2a937 Remove stale references to the "read only at securelevel [12]" flags in
the documentation and code comments.
2009-09-30 04:30:50 +00:00
christos
e048bed6b3 Don't print an error with sysctl -w name?=value if name does not exist.
Should be pulled up to 5.0
2009-04-01 15:55:27 +00:00
lukem
deb4c0bbb3 fix sign-compare issues 2009-03-20 13:18:50 +00:00
pgoyette
dab2b670bf Format the address/offset of hexdump in hex, not decimal.
Addresses my PR bin/41035
2009-03-18 01:28:25 +00:00
njoly
e4bf6d925f Add missing free() in machdep_diskinfo(). 2009-03-05 15:35:59 +00:00
uebayasi
a6533b8fed Comment out CFLAGS+=-g. 2009-02-13 16:02:05 +00:00
christos
118c87a6fe fix dev_t format. 2008-12-28 20:17:11 +00:00
reed
a4bfac4a14 Reference secmodel_securelevel(9) manual page. 2008-11-11 00:09:36 +00:00
lukem
6543a91fea Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00
martin
cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
martin
3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
elad
aede3e59fc PR/35304: C J Coleman: Off-by-one nul byte overwrite in mode_bits routine
of sbin/sysctl
2006-12-21 22:25:39 +00:00
christos
b311ec9d52 Exit with non-zero on errors. 2006-12-18 12:50:08 +00:00
pavel
edab74570a Move the description of sysctl MIBs from sysctl.3 to a new manual page
sysctl.7. Remove the list of MIBs from sysctl.8 so we don't have to
maintain duplicate information, as proposed by YAMAMOTO Takashi on
tech-userlevel. Also remove references to header files from sysctl.8.

The numeric constants remain documented, they are still needed in some
cases. See the discussion on tech-userlevel. ("mib list in sysctl.8")

OK by YAMAMOTO Takashi.
2006-12-04 08:59:13 +00:00
christos
df031f1edc PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory
2006-11-25 21:40:04 +00:00
elad
a84fee7faf Initial implementation of PaX Segvguard (this is still work-in-progress,
it's just to get it out of my local tree).
2006-11-22 02:02:51 +00:00
christos
9f4a7c8c31 PR/34965: Nicolas Joly: sysctl(1) small memory leak 2006-11-02 14:54:21 +00:00
christos
09012c9606 prefix name in kern.drivers 2006-11-01 22:26:36 +00:00
christos
5bc3ea6c79 support printing kern.drivers 2006-10-15 21:33:34 +00:00
elad
5c38108d28 Change the PaX mprotect(2) restrictions' "global_protection" knob to
just "global" -- it's shorter and more readable. Update documentation.
2006-09-26 14:48:40 +00:00