You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

  1. From a342b11fedb3010630de4909ca707ebdc0862060 Mon Sep 17 00:00:00 2001
  2. From: Eneas U de Queiroz <cotequeiroz@gmail.com>
  3. Date: Fri, 25 Dec 2020 13:54:14 -0300
  4. Subject: [PATCH 1/2] commands: fix check for seccomp notify support
  5. Use HAVE_SECCOMP_NOTIFY instead of HAVE_DECL_SECCOMP_NOTIFY_FD.
  6. Currently the latter will be true if the declaration is found by
  7. configure, even if 'configure --disable-seccomp' is used.
  8. HAVE_SECCOMP_NOTIFY is defined in lxcseccomp.h if both HAVE_SECCOMP and
  9. HAVE_DECL_SECCOMP_NOTIFY_FD are true, which is the correct behavior.
  10. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
  11. --- a/src/lxc/commands.c
  12. +++ b/src/lxc/commands.c
  13. @@ -498,7 +498,7 @@ static int lxc_cmd_get_devpts_fd_callbac
  14. int lxc_cmd_get_seccomp_notify_fd(const char *name, const char *lxcpath)
  15. {
  16. -#if HAVE_DECL_SECCOMP_NOTIFY_FD
  17. +#ifdef HAVE_SECCOMP_NOTIFY
  18. int ret, stopped;
  19. struct lxc_cmd_rr cmd = {
  20. .req = {
  21. @@ -523,7 +523,7 @@ static int lxc_cmd_get_seccomp_notify_fd
  22. struct lxc_handler *handler,
  23. struct lxc_epoll_descr *descr)
  24. {
  25. -#if HAVE_DECL_SECCOMP_NOTIFY_FD
  26. +#ifdef HAVE_SECCOMP_NOTIFY
  27. struct lxc_cmd_rsp rsp = {
  28. .ret = 0,
  29. };