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-04-13 08:42:13 +00:00
2020-12-11 00:13:39 +00:00
2019-08-01 18:51:06 +00:00
2020-05-15 11:58:01 +00:00
2020-10-24 00:03:11 +00:00
2020-12-27 12:57:26 +02:00
2018-08-07 15:24:19 +00:00
2020-03-12 18:28:23 +00:00
2021-02-15 20:23:32 +01:00
2020-09-09 18:07:13 +00:00
2021-04-18 10:20:11 +02:00
2021-02-23 20:08:10 +02:00
2019-07-17 19:41:44 +00:00
2020-12-03 05:49:59 +00:00
2020-03-30 21:25:00 +00:00
2020-08-31 21:55:25 +00:00
2020-11-13 14:56:34 +00:00
2021-05-13 16:23:44 +02:00
2021-12-31 12:57:01 -05:00
2022-01-10 10:15:15 -07:00
2020-01-21 16:31:08 +00:00
2021-02-23 20:08:10 +02:00