1. 17 8月, 2017 35 次提交
  2. 16 8月, 2017 2 次提交
    • M
      libvirtd.conf: Drop max_requests · 733359a6
      Michal Privoznik 提交于
      Since its introduction in f6134117 it was never
      implemented nor there are plans to implement it. Drop it.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      733359a6
    • J
      qemu: Fix bug assuming usage of default UUID for certificate passphrase · fdab78b5
      John Ferlan 提交于
      If an environment specific _tls_x509_cert_dir is provided, then
      do not VIR_STRDUP the defaultTLSx509secretUUID as that would be
      for the "default" environment and not the vnc, spice, chardev, or
      migrate environments. If the environment needs a secret to decode
      it's certificate, then it must provide the secret. If the secrets
      happen to be the same, then configuration would use the same UUID
      as the default (but we cannot assume that nor can we assume that
      the secret would be necessary).
      fdab78b5
  3. 15 8月, 2017 3 次提交
    • J
      util: Add object checking for virObject{Ref|Unref} · d3e17259
      John Ferlan 提交于
      Rather than assuming that what's passed to virObject{Ref|Unref}
      would be a virObjectPtr as long as it's not NULL, let's do the
      similar checks virObjectIsClass in order to prevent a possible
      increment or decrement to some field at the obj->u.s.refs offset.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      d3e17259
    • J
      util: Add magic number check for object validity · dfa0efbb
      John Ferlan 提交于
      The virObjectIsClass API has only ever checked object validity
      based on if the @obj is not NULL and it was derived from some class.
      While this has worked well in general, there is one additional
      check that could be made prior to calling virClassIsDerivedFrom
      which loops through the classes checking the magic number against
      the klass expected magic number.
      
      If by chance a non virObject is passed, rather than assuming the
      void * @obj is a _virObject and thus offsetting to obj->klass,
      obj->magic, and obj->parent, let's check that the void * @obj
      has at least the "base part" of the magic number in the right
      place and generate a more specific VIR_WARN message if not.
      
      There are many consumers to virObjectIsClass, include the locking
      primitives virObject{Lock|Unlock}, virObjectRWLock{Read|Write},
      and virObjectRWUnlock. For those callers, the locking call will
      not fail, but it also will not attempt a virMutex* call which
      will "most likely" fail since the &obj->lock is used.
      
      In order to avoid some possible future wrap on the 0xCAFExxxx
      value, add a check during initialization that some new class
      won't cause the wrap. Should be good for a few years at least!
      
      It is still left up to the caller to handle the failed API calls
      just as it would be if it passed a NULL opaque pointer anyobj.
      dfa0efbb
    • J
      util: Create common error path for invalid object · 19f43952
      John Ferlan 提交于
      If virObjectIsClass fails "internally" to virobject.c, create a
      macro to generate the VIR_WARN describing what the problem is.
      Also improve the checks and message a bit to indicate which was
      the failure - whether the obj was NULL or just not the right class
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      19f43952