linux: mute the "unsupported prctl option 23" warnings

Make the PR_CAPBSET_READ prctl(2) return EINVAL without logging
any warnings; this is way too noisy with Focal.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Edward Tomasz Napierala 2021-01-12 14:47:44 +00:00
parent a6b7689718
commit ec2700e015
2 changed files with 11 additions and 0 deletions

View File

@ -2041,6 +2041,16 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args)
*/
error = EINVAL;
break;
case LINUX_PR_CAPBSET_READ:
#if 0
/*
* This makes too much noise with Ubuntu Focal.
*/
linux_msg(td, "unsupported prctl PR_CAPBSET_READ %d",
(int)args->arg2);
#endif
error = EINVAL;
break;
case LINUX_PR_SET_NO_NEW_PRIVS:
linux_msg(td, "unsupported prctl PR_SET_NO_NEW_PRIVS");
error = EINVAL;

View File

@ -58,6 +58,7 @@
#define LINUX_PR_GET_NAME 16 /* Get process name. */
#define LINUX_PR_GET_SECCOMP 21
#define LINUX_PR_SET_SECCOMP 22
#define LINUX_PR_CAPBSET_READ 23
#define LINUX_PR_SET_NO_NEW_PRIVS 38
#define LINUX_PR_SET_PTRACER 1499557217