qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

build: rename CONFIG_LIBCAP to CONFIG_LIBCAP_NG

Since we are actually testing for the newer capng library, rename the
symbol to match.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

+10 -10
+1 -1
configure
··· 6720 6720 echo "CONFIG_L2TPV3=y" >> $config_host_mak 6721 6721 fi 6722 6722 if test "$cap_ng" = "yes" ; then 6723 - echo "CONFIG_LIBCAP=y" >> $config_host_mak 6723 + echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak 6724 6724 fi 6725 6725 echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak 6726 6726 for drv in $audio_drv_list; do
+3 -3
qemu-bridge-helper.c
··· 43 43 44 44 #include "net/tap-linux.h" 45 45 46 - #ifdef CONFIG_LIBCAP 46 + #ifdef CONFIG_LIBCAP_NG 47 47 #include <cap-ng.h> 48 48 #endif 49 49 ··· 207 207 return sendmsg(c, &msg, 0); 208 208 } 209 209 210 - #ifdef CONFIG_LIBCAP 210 + #ifdef CONFIG_LIBCAP_NG 211 211 static int drop_privileges(void) 212 212 { 213 213 /* clear all capabilities */ ··· 246 246 int access_allowed, access_denied; 247 247 int ret = EXIT_SUCCESS; 248 248 249 - #ifdef CONFIG_LIBCAP 249 + #ifdef CONFIG_LIBCAP_NG 250 250 /* if we're run from an suid binary, immediately drop privileges preserving 251 251 * cap_net_admin */ 252 252 if (geteuid() == 0 && getuid() != geteuid()) {
+6 -6
scsi/qemu-pr-helper.c
··· 24 24 #include <linux/dm-ioctl.h> 25 25 #include <scsi/sg.h> 26 26 27 - #ifdef CONFIG_LIBCAP 27 + #ifdef CONFIG_LIBCAP_NG 28 28 #include <cap-ng.h> 29 29 #endif 30 30 #include <pwd.h> ··· 70 70 static int noisy; 71 71 static int verbose; 72 72 73 - #ifdef CONFIG_LIBCAP 73 + #ifdef CONFIG_LIBCAP_NG 74 74 static int uid = -1; 75 75 static int gid = -1; 76 76 #endif ··· 97 97 " (default '%s')\n" 98 98 " -T, --trace [[enable=]<pattern>][,events=<file>][,file=<file>]\n" 99 99 " specify tracing options\n" 100 - #ifdef CONFIG_LIBCAP 100 + #ifdef CONFIG_LIBCAP_NG 101 101 " -u, --user=USER user to drop privileges to\n" 102 102 " -g, --group=GROUP group to drop privileges to\n" 103 103 #endif ··· 827 827 num_active_sockets--; 828 828 } 829 829 830 - #ifdef CONFIG_LIBCAP 830 + #ifdef CONFIG_LIBCAP_NG 831 831 static int drop_privileges(void) 832 832 { 833 833 /* clear all capabilities */ ··· 920 920 pidfile = g_strdup(optarg); 921 921 pidfile_specified = true; 922 922 break; 923 - #ifdef CONFIG_LIBCAP 923 + #ifdef CONFIG_LIBCAP_NG 924 924 case 'u': { 925 925 unsigned long res; 926 926 struct passwd *userinfo = getpwnam(optarg); ··· 1056 1056 exit(EXIT_FAILURE); 1057 1057 } 1058 1058 1059 - #ifdef CONFIG_LIBCAP 1059 + #ifdef CONFIG_LIBCAP_NG 1060 1060 if (drop_privileges() < 0) { 1061 1061 error_report("Failed to drop privileges: %s", strerror(errno)); 1062 1062 exit(EXIT_FAILURE);