Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 3160499aacb81f6735941eb4c372d87a > files > 213

kvm-83-164.el5_5.30.src.rpm

From 1e99f19d81e9d44fd3c9e92c5fb1695c2cd16553 Mon Sep 17 00:00:00 2001
From: Juan Quintela <quintela@redhat.com>
Date: Tue, 21 Jul 2009 22:27:05 +0200
Subject: [PATCH 01/16] add option to disable smb user directories

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <91f3a0b8637f893c2229c00f30b9b7c91182d8e8.1248207931.git.quintela@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Bugzilla: 512837
Message-Id: <91f3a0b8637f893c2229c00f30b9b7c91182d8e8.1248095796.git.quintela@redhat.com>
Acked-by: "Daniel P. Berrange" <berrange@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com> (conditional on feature unwanted)
RH-Upstream-status: pending
---
 qemu/configure |    9 +++++++++
 qemu/net.c     |    2 +-
 qemu/vl.c      |    6 +++---
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/qemu/configure b/qemu/configure
index 83a9ebb..95d176b 100755
--- a/qemu/configure
+++ b/qemu/configure
@@ -174,6 +174,7 @@ aio="yes"
 nptl="yes"
 mixemu="no"
 bluez="yes"
+smb="yes"
 kvm="yes"
 kvm_cap_pit="no"
 kvm_cap_device_assignment="no"
@@ -403,6 +404,8 @@ for opt do
   ;;
   --disable-bluez) bluez="no"
   ;;
+  --disable-smb) smb="no"
+  ;;
   --disable-kvm) kvm="no"
   ;;
   --enable-profiler) profiler="yes"
@@ -555,6 +558,7 @@ echo "  --disable-vnc-tls        disable TLS encryption for VNC server"
 echo "  --disable-gcrypt         disable libgcrypt usage"
 echo "  --disable-curses         disable curses output"
 echo "  --disable-bluez          disable bluez stack connectivity"
+echo "  --disable-smb            disable smb user directories"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-system          enable all system emulation targets"
@@ -588,6 +592,7 @@ if test "$mingw32" = "yes" ; then
     oss="no"
     linux_user="no"
     bsd_user="no"
+    smb="no"
 fi
 
 if test ! -x "$(which cgcc 2>/dev/null)"; then
@@ -1283,6 +1288,7 @@ echo "vde support       $vde"
 echo "AIO support       $aio"
 echo "QXL               $qxl"
 echo "Spice             $spice"
+echo "SMB directores    $smb"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1569,6 +1575,9 @@ if test "$bluez" = "yes" ; then
   echo "CONFIG_BLUEZ_LIBS=$bluez_libs" >> $config_mak
   echo "#define CONFIG_BLUEZ 1" >> $config_h
 fi
+if test "$smb" = "yes" ; then
+  echo "#define CONFIG_SMB 1" >> $config_h
+fi
 if test "$aio" = "yes" ; then
   echo "#define CONFIG_AIO 1" >> $config_h
   echo "CONFIG_AIO=yes" >> $config_mak
diff --git a/qemu/net.c b/qemu/net.c
index 5bfbc79..b1c61fa 100644
--- a/qemu/net.c
+++ b/qemu/net.c
@@ -623,7 +623,7 @@ void net_slirp_redir(const char *redir_str)
     exit(1);
 }
 
-#ifndef _WIN32
+#ifdef CONFIG_SMB
 
 static char smb_dir[1024];
 
diff --git a/qemu/vl.c b/qemu/vl.c
index 59c7e8c..6420267 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -4235,7 +4235,7 @@ static void help(int exitcode)
 #ifdef CONFIG_SLIRP
            "-tftp dir       allow tftp access to files in dir [-net user]\n"
            "-bootp file     advertise file in BOOTP replies\n"
-#ifndef _WIN32
+#ifdef CONFIG_SMB
            "-smb dir        allow SMB access to files in 'dir' [-net user]\n"
 #endif
            "-redir [tcp|udp]:host-port:[guest-host]:guest-port\n"
@@ -4508,7 +4508,7 @@ static const QEMUOption qemu_options[] = {
 #ifdef CONFIG_SLIRP
     { "tftp", HAS_ARG, QEMU_OPTION_tftp },
     { "bootp", HAS_ARG, QEMU_OPTION_bootp },
-#ifndef _WIN32
+#ifdef CONFIG_SMB
     { "smb", HAS_ARG, QEMU_OPTION_smb },
 #endif
     { "redir", HAS_ARG, QEMU_OPTION_redir },
@@ -5383,7 +5383,7 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_bootp:
                 bootp_filename = optarg;
                 break;
-#ifndef _WIN32
+#ifdef CONFIG_SMB
             case QEMU_OPTION_smb:
 		net_slirp_smb(optarg);
                 break;
-- 
1.6.3.rc4.29.g8146