mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-13 23:52:30 +00:00
attach, start: declare PR_{S,G}PR_GET_NO_NEW_PRIVS
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
This commit is contained in:
parent
222ddc91a8
commit
955e2a0237
@ -593,6 +593,10 @@ AM_CONDITIONAL([IS_BIONIC], [test "x$is_bionic" = "xyes"])
|
||||
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
|
||||
AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
|
||||
|
||||
# Some systems lack PR_{G,S}ET_NO_NEW_PRIVS definition => HAVE_DECL_PR_{G,S}ET_NO_NEW_PRIVS
|
||||
AC_CHECK_DECLS([PR_SET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>])
|
||||
AC_CHECK_DECLS([PR_GET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>])
|
||||
|
||||
# Check for some headers
|
||||
AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h])
|
||||
|
||||
|
@ -39,10 +39,18 @@
|
||||
#include <linux/unistd.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#if !HAVE_DECL_PR_CAPBSET_DROP
|
||||
#ifndef HAVE_DECL_PR_CAPBSET_DROP
|
||||
#define PR_CAPBSET_DROP 24
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_PR_SET_NO_NEW_PRIVS
|
||||
#define PR_SET_NO_NEW_PRIVS 38
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_PR_GET_NO_NEW_PRIVS
|
||||
#define PR_GET_NO_NEW_PRIVS 39
|
||||
#endif
|
||||
|
||||
#include "namespace.h"
|
||||
#include "log.h"
|
||||
#include "attach.h"
|
||||
|
@ -50,10 +50,18 @@
|
||||
#include <sys/capability.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_PR_CAPBSET_DROP
|
||||
#ifndef HAVE_DECL_PR_CAPBSET_DROP
|
||||
#define PR_CAPBSET_DROP 24
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_PR_SET_NO_NEW_PRIVS
|
||||
#define PR_SET_NO_NEW_PRIVS 38
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_PR_GET_NO_NEW_PRIVS
|
||||
#define PR_GET_NO_NEW_PRIVS 39
|
||||
#endif
|
||||
|
||||
#include "af_unix.h"
|
||||
#include "bdev.h"
|
||||
#include "caps.h"
|
||||
|
Loading…
Reference in New Issue
Block a user