Robert Watson
a78d3eaffc
Tighten up the string->integer conversion in sysctl(8):
...
(1) Reject zero-length strings for CTLTYPE_INT, _UINT, _LONG,
_ULONG. Do not silently convert to 0.
(2) When converting CTLTYPE_INT, _UINT, _LONG, and _ULONG, check the
end pointer generated by strtol() and strtoul() rather than
discarding it. Reject the string if either none of the string
was useful for conversion to an integer, or if there was
trailing garbage.
I.e., we will not allow you to set a numeric sysctl to a value unless
we can completely convert the string argument to a numeric value.
I tripped over this when I put the following in /etc/sysctl.conf:
kern.maxfiles="4000"
Ouch.
2003-06-15 06:26:08 +00:00
..
2003-05-03 18:41:59 +00:00
2003-05-05 10:28:37 +00:00
2003-05-02 06:46:24 +00:00
2003-06-08 12:40:50 +00:00
2003-06-07 22:02:01 +00:00
2003-06-14 05:28:01 +00:00
2003-06-09 21:50:41 +00:00
2003-05-03 18:41:59 +00:00
2003-05-03 18:41:59 +00:00
2002-07-06 19:34:18 +00:00
2003-05-03 18:41:59 +00:00
2003-05-17 22:21:27 +00:00
2002-12-09 13:06:34 +00:00
2003-03-25 03:16:53 +00:00
2003-05-19 19:52:29 +00:00
2003-05-02 07:08:52 +00:00
2003-06-08 12:51:28 +00:00
2003-06-09 09:26:02 +00:00
2003-05-07 19:37:51 +00:00
2003-05-03 18:41:59 +00:00
2003-05-01 14:30:59 +00:00
2003-06-11 23:24:31 +00:00
2003-04-25 01:12:35 +00:00
2003-05-03 18:41:59 +00:00
2003-06-08 12:53:07 +00:00
2002-09-16 14:18:43 +00:00
2002-11-27 02:18:58 +00:00
2003-06-01 13:47:51 +00:00
2003-06-02 11:19:24 +00:00
2003-06-11 23:24:31 +00:00
2003-05-14 16:22:16 +00:00
2003-06-08 12:51:28 +00:00
2003-03-25 11:27:46 +00:00
2003-06-06 11:30:50 +00:00
2002-03-26 10:09:09 +00:00
2003-06-06 11:30:50 +00:00
2003-06-04 01:17:37 +00:00
2003-06-06 11:30:50 +00:00
2003-06-06 11:30:50 +00:00
2003-05-03 18:41:59 +00:00
2003-05-03 18:41:59 +00:00
2003-05-03 18:41:59 +00:00
2003-05-03 18:41:59 +00:00
2003-05-08 17:25:41 +00:00
2002-11-01 06:34:35 +00:00
2003-05-03 18:41:59 +00:00
2003-06-11 06:38:24 +00:00
2003-05-17 22:31:48 +00:00
2003-03-25 18:43:10 +00:00
2003-05-24 19:53:08 +00:00
2003-05-17 22:35:35 +00:00
2002-08-21 18:11:48 +00:00
2003-01-01 18:49:04 +00:00
2002-12-27 12:15:40 +00:00
2002-08-21 18:11:48 +00:00
2003-05-17 22:53:44 +00:00
2002-08-21 18:11:48 +00:00
2003-02-05 13:50:41 +00:00
2002-08-21 18:11:48 +00:00
2002-08-21 18:11:48 +00:00
2002-12-30 09:38:46 +00:00
2002-11-05 20:06:01 +00:00
2002-12-12 05:56:36 +00:00
2002-12-12 17:26:04 +00:00
2002-12-12 17:26:04 +00:00
2003-06-13 22:15:42 +00:00
2003-05-22 18:38:54 +00:00
2003-01-30 15:09:21 +00:00
2003-05-03 18:41:59 +00:00
2002-07-06 19:34:18 +00:00
2002-09-16 19:46:20 +00:00
2003-06-02 10:01:59 +00:00
2002-12-06 02:11:31 +00:00
2003-05-03 18:41:59 +00:00
2003-05-18 21:05:22 +00:00
2002-11-25 16:23:03 +00:00
2003-05-03 18:41:59 +00:00
2003-06-08 12:51:28 +00:00
2003-04-16 12:06:53 +00:00
2003-06-08 12:55:55 +00:00
2001-12-04 02:19:58 +00:00
2003-01-01 18:49:04 +00:00
2003-04-16 09:53:29 +00:00
2003-05-05 22:49:23 +00:00
2003-01-08 06:43:27 +00:00
2003-05-03 18:41:59 +00:00
2003-05-05 22:49:23 +00:00
2003-06-01 13:47:51 +00:00
2003-05-03 18:41:59 +00:00
2003-06-15 06:26:08 +00:00
2003-05-03 18:41:59 +00:00
2003-05-19 19:58:29 +00:00
2003-06-12 05:55:59 +00:00
2003-05-17 20:40:42 +00:00
2001-12-04 02:19:58 +00:00