Commit Graph

136 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
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
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
christos
118c87a6fe fix dev_t format. 2008-12-28 20:17:11 +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
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
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
f1d99e7dfa CTLFLAG_READONLY1 and CTLFLAG_READONLY2 were deprecated in earlier commit, remove them here too 2006-07-30 19:53:20 +00:00
elad
1c8d298b89 move security.setid_core.* to kern.coredump.setid.*, as requested by yamt@. 2006-07-14 21:55:19 +00:00
jnemeth
7b95c00460 Coverity CID 2784: Add more checks for value==NULL. 2006-03-30 08:02:40 +00:00
christos
fbe98ede0f Coverity CID 2763: Add more checks for value==NULL. 2006-03-26 23:12:48 +00:00
christos
48ce3c5d75 Coverity CID 2764: Avoid null reference 2006-03-26 23:10:26 +00:00
christos
86bc6ef985 Coverity CID 786: Avoid NULL dereference. 2006-03-22 02:25:44 +00:00
christos
238f1027f9 detect integer overflow differently. previous change broke negative sysctl
values.
2006-02-08 18:13:56 +00:00
christos
404831da9c PR/17441: John F. Woods: integer sysctl does not accept numbers > 0x7fffffff
Use unsigned int in the range comparison, and use strerror() instead of
home brewed error strings.
2006-02-05 22:42:55 +00:00
elad
81ed970f39 - make use of the recently added mode_bits for security.setid_core.mode;
- document setid_core variables.
2006-02-02 18:00:07 +00:00