1. 01 3月, 2016 22 次提交
    • J
      virsh: Add support for text based polkit authentication · ea48397b
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=872166
      
      When the login session doesn't have an ssh -X type display agent in
      order for libvirtd to run the polkit session authentication, attempts
      to run 'virsh -c qemu:///system list' from an unauthorized user (or one
      that isn't part of the libvirt /etc/group) will fail with the following
      error from libvirtd:
      
      error: authentication unavailable: no polkit agent available to
             authenticate action 'org.libvirt.unix.manage'
      
      In order to handle the local authentication, we will use the new
      virPolkitAgentCreate API in order to create a text based authentication
      agent for our non readonly session to authenticate with.
      
      The new code will execute in a loop allowing 5 failures to authenticate
      before failing out.
      
      With this patch in place, the following occurs:
      
      $ virsh -c qemu:///system list
      ==== AUTHENTICATING FOR org.libvirt.unix.manage ===
      System policy prevents management of local virtualized systems
      Authenticating as: Some User (SUser)
      Password:
      ==== AUTHENTICATION COMPLETE ===
       Id    Name                           State
       ----------------------------------------------------
        1     somedomain                     running
      
      $
      ea48397b
    • J
      util: Introduce API's for Polkit text authentication · 6fb96a7f
      John Ferlan 提交于
      Introduce virPolkitAgentCreate and virPolkitAgentDestroy
      
      virPolkitAgentCreate will run the polkit pkttyagent image as an asynchronous
      command in order to handle the local agent authentication via stdin/stdout.
      The code makes use of the pkttyagent --notify-fd mechanism to let it know
      when the agent is successfully registered.
      
      virPolkitAgentDestroy will close the command effectively reaping our
      child process
      6fb96a7f
    • J
      polkit: Adjust message when authentication agent isn't found · 1d35f6ff
      John Ferlan 提交于
      When there isn't a ssh -X type session running and a user has not
      been added to the libvirt group, attempts to run 'virsh -c qemu:///system'
      commands from an otherwise unprivileged user will fail with rather
      generic or opaque error message:
      
          "error: authentication failed: no agent is available to authenticate"
      
      This patch will adjust the error code and message to help reflect the
      situation that the problem is the requested mechanism is UNAVAILABLE and
      a slightly more descriptive error. The result on a failure then becomes:
      
          "error: authentication unavailable: no polkit agent available to
                  authenticate action 'org.libvirt.unix.manage'"
      
      A bit more history on this - at one time a failure generated the
      following type message when running the 'pkcheck' as a subprocess:
      
      "error: authentication failed: polkit\56retains_authorization_after_challenge=1
      Authorization requires authentication but no agent is available."
      
      but, a patch was generated to adjust the error message to help provide
      more details about what failed. This was pushed as commit id '96a108c9'.
      That patch prepended a "polkit: " to the output. It really didn't solve
      the problem, but gave a hint.
      
      After some time it was deemed using DBus API calls directly was a
      better way to go (since pkcheck calls them anyway). So, commit id
      '1b854c76' (more or less) copied the code from remoteDispatchAuthPolkit
      and adjusted it. Then commit id 'c7542573' adjusted the remote.c
      code to call the new API (virPolkitCheckAuth). Finally, commit id
      '308c0c5a' altered the code to call DBus APIs directly. In doing
      so, it reverted the failing error message to the generic message
      that would have been received from DBus anyway.
      1d35f6ff
    • J
      secret: Rename loadSecrets · 35b20c1f
      John Ferlan 提交于
      Rename to secretLoadAllConfigs and add the 'driver->configDir' as
      a parameter.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      35b20c1f
    • J
      secret: Introduce secretAssignDef · fa9ca7fd
      John Ferlan 提交于
      This new API will allocate the secret, assign the def pointer, and
      insert the secret onto the passed list. Whether that's the temporary
      list in loadSecrets which gets loaded into the driver list or driver
      list during secretDefineXML.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      fa9ca7fd
    • J
      secret: Introduce listUnlinkSecret · 27950465
      John Ferlan 提交于
      Add a temporary helper to search for a specific secret by address
      on the list and remove it if it's found. The following patch will
      introduce a common allocation and listInsert helper. That means
      error paths of the routines calling would need a way to remove the
      secret off the list.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      27950465
    • J
      secret: Create a 'base64File' in virSecretObj · 0250f34a
      John Ferlan 提交于
      This patch removes need for secretBase64Path and secretComputePath. Similar
      to the configFile, create an entry for base64File, which will be generated
      as the driver->configDir, the UUID value, plus the ".base" suffix. Rather
      than generating on the fly, store this in the virSecretObj.
      
      The buildup of the pathname done in loadSecrets where the failure to build
      is ignored which is no different than the failure to generate the name
      in secretLoadValue which would have been ignored in the failure path
      after secretLoad.
      
      This also removes the need for secretComputPath and secretBase64Path.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      0250f34a
    • J
      secret: Create a 'configFile' in virSecretObj · aefe02f5
      John Ferlan 提交于
      This patch removes the need for secretXMLPath. Instead save 'path' during
      loadSecret as 'configFile'. The secretXMLPath is nothing more than an
      open coded virFileBuildPath.  All that code did was concantenate the
      driver->configDir, the UUID of the secret, and the ".xml" suffix to form
      the configFile name which we now will generate and save instead.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      aefe02f5
    • J
      secret: Adjust logic to build file path in secretLoad · 232b7417
      John Ferlan 提交于
      The 'secretLoad' was essentially open coding virFileBuildPath.
      
      Adjust the logic to have the caller build the path and pass it. The net
      sum of ignoring the virFileBuildPath failure is the same as before where
      the failure to virAsprintf the path would have been ignored anyway in
      the secretLoad error path.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      232b7417
    • J
      secret: Rename directory to configDir · 0e458e66
      John Ferlan 提交于
      This follows other drivers usage model.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      0e458e66
    • J
      secret: Use 'secret' instead of 's' for variable name · 72a01218
      John Ferlan 提交于
      Remove one letter variable.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      72a01218
    • J
      secret: Rename virSecretObjPtr 'entry' to 'secret' · ca1eb181
      John Ferlan 提交于
      Just renaming the variable in secretConnectListAllSecrets.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ca1eb181
    • J
      secret: Remove local virSecretPtr 'secret' · bfd25584
      John Ferlan 提交于
      Remove the need for the local 'secret' in secretConnectListAllSecrets.
      A subsequent patch will rename the ObjPtr entry to secret.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      bfd25584
    • J
      secret: Rename virSecretEntry · ea86edba
      John Ferlan 提交于
      Rename to virSecretObj - preparation for future patch, but also follows
      similar code in other drivers.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ea86edba
    • J
      secret: Use virFileRewrite instead of replaceFile · 558a61a3
      John Ferlan 提交于
      Use the common API instead of essentially open coding same functionality.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      558a61a3
    • J
      secret: Various formatting cleanups · d44f5618
      John Ferlan 提交于
      Rather than having it interspersed with other changes, do it once.
      
      Remove a couple ^L, 1 argument per line for functions, less than 80 chars
      per line, use of spacing between logical groups of code, use of one line
      if statements when doing fetch followed by comparison, use direct return
      when no cleanup to be done.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      d44f5618
    • H
      vircgroup: one central point for adding tasks to cgroups · 85d74806
      Henning Schild 提交于
      Use virCgroupAddTaskController in virCgroupAddTask so we have one
      single point where we add tasks to cgroups.
      Signed-off-by: NHenning Schild <henning.schild@siemens.com>
      85d74806
    • P
      qemu: Allow setting pinning of emulator/iohtread with automatic placement · d1277de2
      Peter Krempa 提交于
      We honour the placement bitmaps when starting up, so there's no point in
      having this check. Additionally the check was buggy since it checked
      vm->def all the time even if the user requested to modify the persistent
      definition which had different configuration.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1308317
      d1277de2
    • M
      qemu: add spice opengl support · 937ebba0
      Marc-André Lureau 提交于
      Add Spice graphics gl attribute. qemu 2.6 should have -spice gl=on argument to
      enable opengl rendering context (patches on the ML). This is necessary to
      actually enable virgl rendering.
      
      Add a qemuxml2argv test for virtio-gpu + spice with virgl.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      937ebba0
    • M
      Post-release version bump to 1.3.3 · d0e9d23e
      Michal Privoznik 提交于
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d0e9d23e
    • M
      qemu: Shorten per-domain directory names · a89f05ba
      Martin Kletzander 提交于
      Per-domain directories were introduced in order to be able to
      completely separate security labels for each domain (commit
      f1f68ca3).  However when the domain
      name is long (let's say a ridiculous 110 characters), we cannot
      connect to the monitor socket because on length of UNIX socket address
      is limited.  In order to get around this, let's shorten it in similar
      fashion and in order to avoid conflicts, throw in an ID there as well.
      Also save that into the status XML and load the old status XMLs
      properly (to clean up after older domains).  That way we can change it
      in the future.
      
      The shortening can be seen in qemuxml2argv tests, for example in the
      hugepages-pages2 case.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a89f05ba
    • D
      Release of libvirt-1.3.2 · dca504a1
      Daniel Veillard 提交于
      * docs/news.html.in libvirt.spec.in: update for release
      * po/*.po*: regenerated
      dca504a1
  2. 27 2月, 2016 1 次提交
  3. 26 2月, 2016 15 次提交
  4. 25 2月, 2016 2 次提交