Commit Graph

112 Commits

Author SHA1 Message Date
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
elad
202872db03 add support for parsing file mode bits.
when printed, you'll see something like "0600 (rw-------)", like the
ls output. when reading input you can either specify octal mode (0600)
or chmod-like (u=rw).

ideas from atatat@ and kjk@; okay and lots of help from atatat@.
2006-02-02 16:23:25 +00:00
rpaulo
dcc35c7ff8 Handle net.inet.tcp.debug, net.inet.tcp.debx, net.ns.spp.debug and
net.ns.spp.debx. Bump man page date.
2005-09-06 03:22:58 +00:00
rpaulo
a49638942e net.inet?.*.stats are viewable with netstat(1). 2005-08-28 16:18:04 +00:00
rpaulo
78d05017af Inform the user that net.bpf.stats and net.bpf.peers are viewable with
netstat(1).
2005-08-04 19:44:18 +00:00
christos
2c6eadc9ce Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
2005-06-27 01:00:04 +00:00
christos
29a6465002 Add code to handle cp_id. From atatat. 2005-06-16 14:56:36 +00:00
christos
ad6c31cee3 PPR/29909: Manuel Bouyer: sysctl dumps core if kern.consdev returns unknown
device.  If we cannot determine the device name of the console, print the
console dev_t in hex.
2005-04-06 21:13:03 +00:00
christos
7a221682eb make sysctl -n print the real console tty name and -nn print the numeric
value.
XXX: -n means don't print name, not numeric. We should stop overloading
it and use a different flag.
2005-03-28 04:03:13 +00:00
atatat
0f48b53686 If a "create" or "destroy" operation succeeds, mark the cached tree as
"stale" so that the next time we try to read or write to it, we can
purge (and refresh) it.

Addresses PR 29222.
2005-03-23 03:45:25 +00:00
atatat
160438234d Fix possible segmentation fault when retrieving descriptions. Thought
I committed this a while ago.  I guess the fact that no one filed a pr
meant no one else found it.  :)
2005-03-19 23:19:17 +00:00
atatat
64dd54edba Use regexes instead of static lists of annoying numbers to recognize
sysctl nodes that have "helpers".  This is more concise, imho more
easy to understand, and has the added bonus of making it *possible* to
assign helpers to dynamically numbered nodes.
2005-03-18 04:52:24 +00:00
atatat
6472d0c335 Make requestors of kern.file2 be referred to pstat (the same as
kern.file) and add EINVAL to the list of errno values which are
silently ignored when walking the tree.
2005-03-15 13:59:35 +00:00
atatat
2971543eb5 Pass dynamic buffer pointer to display_string(), not static buffer
pointer.  Causes...misfunction if the kernel says the buffer needs to
be too much larger.
2004-12-17 05:03:03 +00:00
jdolecek
0154132fed constify handlers[] 2004-10-17 11:04:39 +00:00
atatat
605d2000dd When converting a string to a number, also make sure that you didn't
convert an empty string to a zero.

Follow on to PR bin/25115 in private email.
2004-04-25 05:36:49 +00:00
atatat
a929f1c4f7 Allocate adjusted size, not fixed size. 2004-04-23 12:03:39 +00:00
atatat
d528f2f477 Some lint cleaning, strip leading (and sometimes trailing) whitespace
from values to be assigned when processing a file.  Clean up error
reporting (print the name of the file and the line number), and tidy
some numeric conversions.  Continue after most "errors" when
processing a -f argument.

Addresses PR bin/25115.
2004-04-22 03:56:31 +00:00
atatat
de37b59396 If the node was specifically requested but has no description, print
the "no description" message instead of skipping (as happens when
recursing into a subtree).  This does not apply to non-node-type
nodes.
2004-04-14 05:13:50 +00:00
atatat
67f14f8fff Don't copy the size that sysctl gave back directly, copy the size of
the description.  *thwap*
2004-04-08 06:49:03 +00:00
atatat
610ed0d02a Don't copy the size that sysctl gave back directly, copy the size of
the description.
2004-04-08 06:12:43 +00:00
atatat
4f406ff76d Do nothing else for nodes with no children if -d is used (dflag is
set).  Otherwise, some nodes (those with "printers") will also print
the "use foo ..." message.
2004-04-08 04:00:33 +00:00
atatat
fcc6bb1735 Add -d flag to usage message(s). 2004-04-06 19:39:44 +00:00
he
4af725d078 Make this too gcc2-compileable. 2004-03-26 23:55:45 +00:00
atatat
29e15c7932 Move sysctlbyname(), sysctlnametomib(), and sysctlgetmibinfo() from
sysctl(8) into libc, making the minor number jump.  Add prototypes to
sys/sysctl.h, fix sets, modify man pages, etc.  That oughta cover it.
2004-03-25 19:36:26 +00:00