1. 30 7月, 2012 9 次提交
  2. 29 7月, 2012 1 次提交
  3. 28 7月, 2012 1 次提交
    • J
      security: Skip labeling resources when seclabel defaults to none · ce53382b
      Jiri Denemark 提交于
      If a domain is explicitly configured with <seclabel type="none"/> we
      correctly ensure that no labeling will be done by setting
      norelabel=true. However, if no seclabel element is present in domain XML
      and hypervisor is configured not to confine domains by default, we only
      set type to "none" without turning off relabeling. Thus if such a domain
      is being started, security driver wants to relabel resources with
      default label, which doesn't make any sense.
      
      Moreover, with SELinux security driver, the generated image label lacks
      "s0" sensitivity, which causes setfilecon() fail with EINVAL in
      enforcing mode.
      ce53382b
  4. 27 7月, 2012 6 次提交
    • E
      maint: avoid regression on copyright listings · 3ad13c92
      Eric Blake 提交于
      Commit f9ce7dad tried to kill uses of a raw street address, but
      missed a few instances.  Automate things so we don't introduce
      new problems in the future.
      
      * cfg.mk (sc_copyright_address): New rule.
      (exclude_file_name_regexp--sc_copyright_address): Add exemption.
      * bootstrap.conf: Adjust offenders.
      * build-aux/augeas-gentest.pl: Likewise.
      * examples/systemtap/events.stp: Likewise.
      * examples/systemtap/qemu-monitor.stp: Likewise.
      * examples/systemtap/rpc-monitor.stp: Likewise.
      * src/dtrace2systemtap.pl: Likewise.
      * src/esx/esx_vi_generator.py: Likewise.
      * src/hyperv/hyperv_wmi_generator.py: Likewise.
      * src/remote/qemu_protocol.x: Likewise.
      * src/remote/remote_protocol.x: Likewise.
      * src/rpc/gensystemtap.pl: Likewise.
      * src/rpc/virnetprotocol.x: Likewise.
      * tests/object-locking.ml: Likewise.
      * tools/virt-xml-validate.in: Likewise.
      3ad13c92
    • O
      maint: Use consistent copyright. · a4bcefbc
      Osier Yang 提交于
      This is a follow up patch of commit f9ce7dad, it modifies all
      the files which declare the copyright like "See COPYING.LIB for
      the License of this software" to use the detailed/consistent one.
      
      And deserts the outdated comments like:
      
       * libvirt-qemu.h:
       * Summary: qemu specific interfaces
       * Description: Provides the interfaces of the libvirt library to handle
       *              qemu specific methods
       *
       * Copy:  Copyright (C) 2010, 2012 Red Hat, Inc.
      
      Uses the more compact style like:
      
       * libvirt-qemu.h: Interfaces specific for QEMU/KVM driver
       *
       * Copyright (C) 2010, 2012 Red Hat, Inc.
      a4bcefbc
    • D
      Add a test case that checks there are no bogus entries in .syms · 536a1d7d
      Daniel P. Berrange 提交于
      During refactoring of code, it has proved common to forget to
      remove old symbols from the .syms file. While the Win32 linker
      will complain about this, the Linux ELF linker does not. The
      new test case validates that every symbol listed in the .syms
      file actually exists in the built ELF libraries.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      536a1d7d
    • D
      Remove accidentally commited virNetClientSetEOFNotify symbol · 25b09889
      Daniel P. Berrange 提交于
      The virNetClientSetEOFNotify symbol was accidentally added to
      the libvirt_private.syms file due to an out-of-order cherry-pick
      25b09889
    • D
      Remove two non-existant NWFilter driver symbols from .syms · 609df0dc
      Daniel P. Berrange 提交于
      virNWFilterGetIpAddrForIfname and virNWFilterDelIpAddrForIfname
      do not exist, so remove them from libvirt_nwfilter.syms
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      609df0dc
    • E
      maint: don't permit format strings without % · 768007ae
      Eric Blake 提交于
      Any time we have a string with no % passed through gettext, a
      translator can inject a % to cause a stack overread.  When there
      is nothing to format, it's easier to ask for a string that cannot
      be used as a formatter, by using a trivial "%s" format instead.
      
      In the past, we have used --disable-nls to catch some of the
      offenders, but that doesn't get run very often, and many more
      uses have crept in.  Syntax check to the rescue!
      
      The syntax check can catch uses such as
      virReportError(code,
                     _("split "
                       "string"));
      by using a sed script to fold context lines into one pattern
      space before checking for a string without %.
      
      This patch is just mechanical insertion of %s; there are probably
      several messages touched by this patch where we would be better
      off giving the user more information than a fixed string.
      
      * cfg.mk (sc_prohibit_diagnostic_without_format): New rule.
      * src/datatypes.c (virUnrefConnect, virGetDomain)
      (virUnrefDomain, virGetNetwork, virUnrefNetwork, virGetInterface)
      (virUnrefInterface, virGetStoragePool, virUnrefStoragePool)
      (virGetStorageVol, virUnrefStorageVol, virGetNodeDevice)
      (virGetSecret, virUnrefSecret, virGetNWFilter, virUnrefNWFilter)
      (virGetDomainSnapshot, virUnrefDomainSnapshot): Add %s wrapper.
      * src/lxc/lxc_driver.c (lxcDomainSetBlkioParameters)
      (lxcDomainGetBlkioParameters): Likewise.
      * src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML)
      (virDomainDiskDefParseXML, virDomainGraphicsDefParseXML):
      Likewise.
      * src/conf/network_conf.c (virNetworkDNSHostsDefParseXML)
      (virNetworkDefParseXML): Likewise.
      * src/conf/nwfilter_conf.c (virNWFilterIsValidChainName):
      Likewise.
      * src/conf/nwfilter_params.c (virNWFilterVarValueCreateSimple)
      (virNWFilterVarAccessParse): Likewise.
      * src/libvirt.c (virDomainSave, virDomainSaveFlags)
      (virDomainRestore, virDomainRestoreFlags)
      (virDomainSaveImageGetXMLDesc, virDomainSaveImageDefineXML)
      (virDomainCoreDump, virDomainGetXMLDesc)
      (virDomainMigrateVersion1, virDomainMigrateVersion2)
      (virDomainMigrateVersion3, virDomainMigrate, virDomainMigrate2)
      (virStreamSendAll, virStreamRecvAll)
      (virDomainSnapshotGetXMLDesc): Likewise.
      * src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopReqLeaseDel)
      (virNWFilterDHCPSnoopReq): Likewise.
      * src/openvz/openvz_driver.c (openvzUpdateDevice): Likewise.
      * src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
      * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Likewise.
      * src/qemu/qemu_command.c (qemuBuildHubDevStr, qemuBuildChrChardevStr)
      (qemuBuildCommandLine): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/rpc/virnetsaslcontext.c (virNetSASLSessionGetIdentity):
      Likewise.
      * src/rpc/virnetsocket.c (virNetSocketNewConnectUNIX)
      (virNetSocketSendFD, virNetSocketRecvFD): Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskBuildPool): Likewise.
      * src/storage/storage_backend_fs.c
      (virStorageBackendFileSystemProbe)
      (virStorageBackendFileSystemBuild): Likewise.
      * src/storage/storage_backend_rbd.c
      (virStorageBackendRBDOpenRADOSConn): Likewise.
      * src/storage/storage_driver.c (storageVolumeResize): Likewise.
      * src/test/test_driver.c (testInterfaceChangeBegin)
      (testInterfaceChangeCommit, testInterfaceChangeRollback):
      Likewise.
      * src/vbox/vbox_tmpl.c (vboxListAllDomains): Likewise.
      * src/xenxs/xen_sxpr.c (xenFormatSxprDisk, xenFormatSxpr):
      Likewise.
      * src/xenxs/xen_xm.c (xenXMConfigGetUUID, xenFormatXMDisk)
      (xenFormatXM): Likewise.
      768007ae
  5. 26 7月, 2012 1 次提交
  6. 25 7月, 2012 3 次提交
    • J
      conf: Fix typo in virDomainHostdevSubsys comment · f53904e4
      Jiri Denemark 提交于
      f53904e4
    • G
      util: Fix typoes on return value and comments · 72e59a3b
      Guannan Ren 提交于
      virNetDevTapCreateInBridgePort: Fix return value to -1
      virNetDevTapCreate: Fix comments
      72e59a3b
    • M
      fixed SegFault in virauth · 5eef7432
      Martin Kletzander 提交于
      No check for conn->uri being NULL in virAuthGetConfigFilePath (valid
      state) made the client segfault. This happens for example with these
      settings:
       - no virtualbox driver installed (modifies conn->uri)
       - no default URI set (VIRSH_DEFAULT_CONNECT_URI="",
         LIBVIRT_DEFAULT_URI="", uri_default="")
       - auth_sock_rw="sasl"
       - virsh run as root
      
      That are unfortunately the settings with fresh Fedora 17 installation
      with VDSM.
      
      The check ought to be enough as conn->uri being NULL is valid in later
      code and is handled properly.
      5eef7432
  7. 23 7月, 2012 3 次提交
    • D
      Make ESX & Hyper-V code generator safe with parallel builds · 1bfb47df
      Daniel P. Berrange 提交于
      If from a clean GIT checkout 'make -j 8' is run, the ESX
      and Hyper-V code will be generated multiple times over.
      This is because there are multiple files being generated
      from one invocation of the generator script. make does not
      realize this and so invokes the generator once per file.
      This doesn't matter with serialized builds, but with
      parallel builds multiple instances of the generator get
      run at once.
      
      make[2]: Entering directory `/home/berrange/src/virt/libvirt/src'
        GEN    util/virkeymaps.h
        GEN    remote/remote_protocol.h
        GEN    remote/remote_client_bodies.h
        GEN    remote/qemu_protocol.h
        GEN    remote/qemu_client_bodies.h
        GEN    esx/esx_vi_methods.generated.c
        GEN    esx/esx_vi_methods.generated.h
        GEN    esx/esx_vi_methods.generated.macro
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typetostring
        GEN    esx/esx_vi_types.generated.typefromstring
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_methods.generated.h
        GEN    esx/esx_vi_methods.generated.c
        GEN    esx/esx_vi_methods.generated.macro
        GEN    esx/esx_vi.generated.h
        GEN    esx/esx_vi.generated.c
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typetostring
        GEN    esx/esx_vi_types.generated.typefromstring
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_methods.generated.h
        ...snip...
        GEN    hyperv/hyperv_wmi.generated.h
        GEN    libvirt_qemu_probes.h
        GEN    locking/qemu-sanlock.conf
        GEN    hyperv/hyperv_wmi.generated.c
        GEN    rpc/virnetprotocol.h
        GEN    hyperv/hyperv_wmi_classes.generated.typedef
        GEN    hyperv/hyperv_wmi_classes.generated.h
        GEN    hyperv/hyperv_wmi_classes.generated.c
        GEN    rpc/virkeepaliveprotocol.h
        GEN    remote/remote_protocol.c
        GEN    remote/qemu_protocol.c
        GEN    rpc/virkeepaliveprotocol.c
        GEN    rpc/virnetprotocol.c
        GEN    libvirt.def
      
      Prevent this using a timestamp file to control generation,
      as was previously done for the python bindings in commit
      a7868e01Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1bfb47df
    • P
      maint: Clean up coding style and fix error message spelling · 8e0f7faf
      Peter Krempa 提交于
      This patch cleans up coding style breaks some long lines and fixes error
      message spelling on various places in domain_conf.c and in the qemu
      driver.
      8e0f7faf
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  8. 22 7月, 2012 3 次提交
  9. 21 7月, 2012 10 次提交
  10. 20 7月, 2012 3 次提交