1. 25 3月, 2014 3 次提交
  2. 18 3月, 2014 5 次提交
  3. 11 3月, 2014 1 次提交
  4. 10 3月, 2014 1 次提交
  5. 27 2月, 2014 1 次提交
    • J
      sanlock: Truncate domain names longer than SANLK_NAME_LEN · 8f10c1e7
      Jiri Denemark 提交于
      Libvirt uses a domain name to fill in owner_name in sanlock_options in
      virLockManagerSanlockAcquire. Unfortunately, owner_name is limited to
      SANLK_NAME_LEN characters (including trailing '\0'), which means domains
      with longer names fail to start when sanlock is enabled. However, we can
      truncate the name when setting owner_name as explained by sanlock's
      author:
      
      Setting sanlk_options or the owner_name is unnecessary, and has very
      little to no benefit.  If you do provide something in owner_name, it can
      be anything, sanlock doesn't care or use it.
      
      If you run the command "sanlock status", the output will display a list
      of clients connected to the sanlock daemon.  This client list is
      displayed as "pid owner_name" if the client has provided an owner_name
      via sanlk_options. This debugging output is the only usage of
      owner_name, so its only benefit is to potentially provide a more human
      friendly output for debugging purposes.
      8f10c1e7
  6. 22 1月, 2014 1 次提交
  7. 09 1月, 2014 1 次提交
  8. 06 1月, 2014 1 次提交
    • E
      maint: improve VIR_ERR_OPERATION_DENIED usage · d219826c
      Eric Blake 提交于
      Some of our operation denied messages are outright stupid; for
      example, if virIdentitySetAttr fails:
      
      error: operation Identity attribute is already set forbidden for read only access
      
      This patch fixes things to a saner:
      
      error: operation forbidden: Identity attribute is already set
      
      It also consolidates the most common usage pattern for operation
      denied errors: read-only connections preventing a public API.  In
      this case, 'virsh -r -c test:///default destroy test' changes from:
      
      error: operation virDomainDestroy forbidden for read only access
      
      to:
      
      error: operation forbidden: read only access prevents virDomainDestroy
      
      Note that we were previously inconsistent on which APIs used
      VIR_FROM_DOM (such as virDomainDestroy) vs. VIR_FROM_NONE (such as
      virDomainPMSuspendForDuration).  After this patch, all uses
      consistently use VIR_FROM_NONE, on the grounds that it is unlikely
      that a caller learning that a call is denied can do anything in
      particular with extra knowledge which error domain the call belongs
      to (similar to what we did in commit baa72449).
      
      * src/util/virerror.c (virErrorMsg): Rework OPERATION_DENIED error
      message.
      * src/internal.h (virCheckReadOnlyGoto): New macro.
      * src/util/virerror.h (virReportRestrictedError): New macro.
      * src/libvirt-lxc.c: Use new macros.
      * src/libvirt-qemu.c: Likewise.
      * src/libvirt.c: Likewise.
      * src/locking/lock_daemon.c (virLockDaemonClientNew): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d219826c
  9. 10 12月, 2013 5 次提交
  10. 20 11月, 2013 1 次提交
  11. 21 10月, 2013 2 次提交
  12. 03 9月, 2013 1 次提交
  13. 30 8月, 2013 1 次提交
  14. 19 8月, 2013 1 次提交
    • D
      Make max_clients in virtlockd configurable · 9f5b4b1f
      David Weber 提交于
      Each new VM requires a new connection from libvirtd to virtlockd.
      The default max clients limit in virtlockd of 20 is thus woefully
      insufficient. virtlockd sockets are only accessible to matching
      users, so there is no security need for such a tight limit. Make
      it configurable and default to 1024.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9f5b4b1f
  15. 13 8月, 2013 1 次提交
    • D
      Properly handle -h / -V for --help/--version aliases in virtlockd/libvirtd · 63ba687f
      Daniel P. Berrange 提交于
      The virtlockd/libvirtd daemons had listed '?' as the short option
      for --help. getopt_long uses '?' for any unknown option. We want
      to be able to distinguish unknown options (which use EXIT_FAILURE)
      from correct usage of help (which should use EXIT_SUCCESS). Thus
      we should use 'h' as a short option for --help. Also add this to
      the man page docs
      
      The virtlockd/libvirtd daemons did not list any short option
      for the --version arg. Add -V as a valid short option, since
      -v is already used for --verbose.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      63ba687f
  16. 09 8月, 2013 2 次提交
  17. 05 8月, 2013 1 次提交
    • M
      Introduce max_queued_clients · 1199edb1
      Michal Privoznik 提交于
      This configuration knob lets user to set the length of queue of
      connection requests waiting to be accept()-ed by the daemon. IOW, it
      just controls the @backlog passed to listen:
      
        int listen(int sockfd, int backlog);
      1199edb1
  18. 11 7月, 2013 1 次提交
  19. 10 7月, 2013 1 次提交
  20. 24 6月, 2013 1 次提交
    • D
      Add ACL annotations to all RPC messages · e341435e
      Daniel P. Berrange 提交于
      Introduce annotations to all RPC messages to declare what
      access control checks are required. There are two new
      annotations defined:
      
       @acl: <object>:<permission>
       @acl: <object>:<permission>:<flagname>
      
        Declare the access control requirements for the API. May be repeated
        multiple times, if multiple rules are required.
      
          <object> is one of 'connect', 'domain', 'network', 'storagepool',
                   'interface', 'nodedev', 'secret'.
          <permission> is one of the permissions in access/viraccessperm.h
          <flagname> indicates the rule only applies if the named flag
          is set in the API call
      
       @aclfilter: <object>:<permission>
      
        Declare an access control filter that will be applied to a list
        of objects being returned by an API. This allows the returned
        list to be filtered to only show those the user has permissions
        against
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      e341435e
  21. 05 6月, 2013 1 次提交
  22. 21 5月, 2013 1 次提交
  23. 09 5月, 2013 1 次提交
  24. 08 5月, 2013 1 次提交
  25. 03 5月, 2013 3 次提交
  26. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88