2013-10-10 12:09:08 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Since virt-login-shell will be setuid, we must do everything
|
|
|
|
* we can to avoid linking to other libraries. Many of them do
|
|
|
|
* unsafe things in functions marked __atttribute__((constructor)).
|
2016-09-20 18:52:15 +00:00
|
|
|
* The only way to avoid such deps is to re-compile the
|
2013-10-10 12:09:08 +00:00
|
|
|
* functions with the code in question disabled, and for that we
|
|
|
|
* must override the main config.h rules. Hence this file :-(
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef LIBVIRT_SETUID_RPC_CLIENT
|
|
|
|
# undef HAVE_LIBNL
|
|
|
|
# undef HAVE_LIBNL3
|
|
|
|
# undef HAVE_LIBSASL2
|
2016-11-22 10:14:08 +00:00
|
|
|
# undef HAVE_SYS_ACL_H
|
2013-10-10 12:09:08 +00:00
|
|
|
# undef WITH_CAPNG
|
|
|
|
# undef WITH_CURL
|
2016-04-14 14:16:22 +00:00
|
|
|
# undef WITH_DBUS
|
2016-12-12 12:33:42 +00:00
|
|
|
# undef WITH_DEVMAPPER
|
2013-10-10 12:09:08 +00:00
|
|
|
# undef WITH_DTRACE_PROBES
|
|
|
|
# undef WITH_GNUTLS
|
2016-11-09 14:28:35 +00:00
|
|
|
# undef WITH_LIBSSH
|
2013-10-10 12:09:08 +00:00
|
|
|
# undef WITH_MACVTAP
|
|
|
|
# undef WITH_NUMACTL
|
|
|
|
# undef WITH_SASL
|
|
|
|
# undef WITH_SSH2
|
2016-04-14 14:16:22 +00:00
|
|
|
# undef WITH_SYSTEMD_DAEMON
|
2013-10-10 12:09:08 +00:00
|
|
|
# undef WITH_VIRTUALPORT
|
2018-08-13 11:40:02 +00:00
|
|
|
# undef WITH_YAJL
|
|
|
|
# undef WITH_YAJL2
|
2013-10-10 12:09:08 +00:00
|
|
|
#endif
|
2016-02-14 10:38:37 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* With the NSS module it's the same story as virt-login-shell. See the
|
|
|
|
* explanation above.
|
|
|
|
*/
|
|
|
|
#ifdef LIBVIRT_NSS
|
|
|
|
# undef HAVE_LIBNL
|
|
|
|
# undef HAVE_LIBNL3
|
|
|
|
# undef HAVE_LIBSASL2
|
2016-11-22 10:14:08 +00:00
|
|
|
# undef HAVE_SYS_ACL_H
|
2016-02-14 10:38:37 +00:00
|
|
|
# undef WITH_CAPNG
|
|
|
|
# undef WITH_CURL
|
2016-12-12 12:33:42 +00:00
|
|
|
# undef WITH_DEVMAPPER
|
2016-02-14 10:38:37 +00:00
|
|
|
# undef WITH_DTRACE_PROBES
|
|
|
|
# undef WITH_GNUTLS
|
2016-11-09 14:28:35 +00:00
|
|
|
# undef WITH_LIBSSH
|
2016-02-14 10:38:37 +00:00
|
|
|
# undef WITH_MACVTAP
|
|
|
|
# undef WITH_NUMACTL
|
|
|
|
# undef WITH_SASL
|
|
|
|
# undef WITH_SSH2
|
|
|
|
# undef WITH_VIRTUALPORT
|
|
|
|
# undef WITH_SECDRIVER_SELINUX
|
|
|
|
# undef WITH_SECDRIVER_APPARMOR
|
|
|
|
# undef WITH_CAPNG
|
|
|
|
#endif /* LIBVIRT_NSS */
|
2016-06-09 00:50:35 +00:00
|
|
|
|
2017-07-05 09:35:32 +00:00
|
|
|
#ifndef __GNUC__
|
|
|
|
# error "Libvirt requires GCC >= 4.4, or CLang"
|
|
|
|
#endif
|
|
|
|
|
2016-06-09 00:50:35 +00:00
|
|
|
/*
|
2017-07-05 09:59:53 +00:00
|
|
|
* Define __GNUC_PREREQ to a sane default if it isn't yet defined.
|
2016-06-09 00:50:35 +00:00
|
|
|
* This is done here so that it's included as early as possible; gnulib relies
|
|
|
|
* on this to be defined in features.h, which should be included from ctype.h.
|
|
|
|
* This doesn't happen on many non-glibc systems.
|
2017-07-05 09:59:53 +00:00
|
|
|
* When __GNUC_PREREQ is not defined, gnulib defines it to 0, which breaks things.
|
2016-06-09 00:50:35 +00:00
|
|
|
*/
|
2017-07-05 09:35:32 +00:00
|
|
|
#ifndef __GNUC_PREREQ
|
2017-11-03 12:09:47 +00:00
|
|
|
# define __GNUC_PREREQ(maj, min) \
|
2017-07-05 09:35:32 +00:00
|
|
|
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !(__GNUC_PREREQ(4, 4) || defined(__clang__))
|
|
|
|
# error "Libvirt requires GCC >= 4.4, or CLang"
|
2016-06-09 00:50:35 +00:00
|
|
|
#endif
|