Stefan Eßer
9535d9f104
libc: add helper furnction to set sysctl() user.* variables
...
Testing had revealed that trying to retrieve the user.localbase
variable into to small a buffer would return the correct error code,
but would not fill the available buffer space with a partial result.
A partial result is of no use, but this is still a violation of the
documented behavior, which has been fixed in the previous commit to
this function.
I just checked the code for "user.cs_path" and found that it had the
same issue.
Instead of fixing the logic for each user.* sysctl string variable
individually, this commit adds a helper function set_user_str() that
implements the semantics specified in the sysctl() man page.
It is currently only used for "user.cs_path" and "user.localbase",
but it will offer a significant simplification when further such
variables will be added (as I intend to do).
MFC after: 3 days
2022-02-05 13:33:53 +01:00
..
2020-11-28 12:19:20 +00:00
2020-04-13 08:42:13 +00:00
2018-08-19 17:40:50 +00:00
2020-12-11 00:13:39 +00:00
2020-10-12 10:42:14 +00:00
2020-10-12 10:42:14 +00:00
2019-11-17 14:11:08 +00:00
2020-10-10 21:52:00 +00:00
2020-09-27 22:26:41 +00:00
2020-06-16 16:48:52 +00:00
2020-06-16 16:48:52 +00:00
2021-12-30 12:20:32 +01:00
2021-12-30 12:20:32 +01:00
2020-09-27 22:26:41 +00:00
2019-08-01 18:51:06 +00:00
2020-08-04 08:46:28 +00:00
2020-09-27 22:26:41 +00:00
2021-04-06 03:23:08 +03:00
2021-04-09 23:46:24 +03:00
2020-05-22 17:52:09 +00:00
2020-05-15 11:58:01 +00:00
2020-09-02 20:43:08 +00:00
2020-10-24 00:03:11 +00:00
2019-01-17 06:35:45 +00:00
2020-12-27 12:57:26 +02:00
2020-03-24 19:33:21 +00:00
2020-06-10 01:32:13 +00:00
2018-08-07 15:24:19 +00:00
2019-03-26 19:35:41 +00:00
2020-09-27 22:26:41 +00:00
2019-03-26 19:35:41 +00:00
2020-09-27 22:26:41 +00:00
2020-03-12 18:28:23 +00:00
2019-06-30 11:49:58 +00:00
2021-02-15 20:23:32 +01:00
2020-03-23 17:38:20 +00:00
2020-12-11 00:15:57 +00:00
2020-09-27 22:26:41 +00:00
2021-11-29 17:39:50 +02:00
2020-07-13 15:17:29 +00:00
2020-09-09 18:07:13 +00:00
2020-08-03 22:13:02 +00:00
2021-04-18 10:20:11 +02:00
2021-11-29 17:39:50 +02:00
2021-02-23 20:08:10 +02:00
2018-08-16 18:40:16 +00:00
2019-07-17 19:41:44 +00:00
2020-12-03 05:49:59 +00:00
2019-11-02 16:59:53 +00:00
2021-03-01 14:22:47 +00:00
2019-06-23 10:45:50 +00:00
2020-03-23 17:38:20 +00:00
2021-12-30 12:20:32 +01:00
2020-05-14 21:12:08 +00:00
2020-03-30 20:15:19 +00:00
2020-03-30 21:25:00 +00:00
2020-01-29 01:52:27 +00:00
2021-11-30 03:43:54 +02:00
2021-11-30 03:43:54 +02:00
2021-11-30 03:43:54 +02:00
2021-11-30 03:43:54 +02:00
2018-07-26 18:34:38 +00:00
2018-07-26 18:34:38 +00:00
2019-02-13 04:52:01 +00:00
2020-08-17 19:14:09 +00:00
2020-08-31 21:55:25 +00:00
2022-01-03 04:31:40 +02:00
2021-12-30 12:20:32 +01:00
2022-01-03 04:31:40 +02:00
2019-07-18 21:33:55 +00:00
2020-08-03 18:08:04 +00:00
2020-11-13 14:56:34 +00:00
2021-11-29 17:39:51 +02:00
2019-12-12 01:41:55 +00:00
2019-12-12 01:41:55 +00:00
2021-12-30 12:20:32 +01:00
2018-11-19 18:23:17 +00:00
2021-10-19 21:22:57 -04:00
2022-02-05 13:33:53 +01:00
2019-12-29 17:19:57 +00:00
2019-09-18 16:13:10 +00:00
2021-05-13 16:23:44 +02:00
2021-12-31 12:57:01 -05:00
2021-01-02 04:43:32 +02:00
2020-07-15 17:05:37 +00:00
2019-06-23 10:47:07 +00:00
2020-12-25 20:43:09 +02:00
2020-12-11 02:22:42 +00:00
2018-08-10 15:16:36 +00:00
2022-01-10 10:15:15 -07:00
2020-01-21 16:31:08 +00:00
2020-03-23 17:38:20 +00:00
2021-02-11 05:52:55 +02:00
2021-02-23 20:08:10 +02:00