1. 14 7月, 2017 1 次提交
  2. 27 4月, 2017 9 次提交
  3. 26 4月, 2017 3 次提交
  4. 09 1月, 2017 1 次提交
  5. 06 12月, 2016 1 次提交
    • M
      util: Introduce virFileRewriteStr · b9b664c5
      Michal Privoznik 提交于
      There are couple of places where we have a string and want to
      save it to a file. Atomically. In all those places we use
      virFileRewrite() but also implement the very same callback which
      takes the string and write it into temp file. This makes no
      sense. Unify the callbacks and move them to one place.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b9b664c5
  6. 09 9月, 2016 1 次提交
    • J
      conf: Add new secret type "tls" · 13350a17
      John Ferlan 提交于
      Add a new secret usage type known as "tls" - it will handle adding the
      secret objects for various TLS objects that need to provide some sort
      of passphrase in order to access the credentials.
      
      The format is:
      
         <secret ephemeral='no' private='no'>
           <description>Sample TLS secret</description>
           <usage type='tls'>
             <name>mumblyfratz</name>
           </usage>
      </secret>
      
      Once defined and a passphrase set, future patches will allow the UUID
      to be set in the qemu.conf file and thus used as a secret for various
      TLS options such as a chardev serial TCP connection, a NBD client/server
      connection, and migration.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      13350a17
  7. 15 7月, 2016 1 次提交
  8. 02 7月, 2016 1 次提交
    • J
      conf: Add new secret type "passphrase" · c8438010
      John Ferlan 提交于
      Add a new secret type known as "passphrase" - it will handle adding the
      secret objects that need a passphrase without a specific username.
      
      The format is:
      
         <secret ...>
           <uuid>...</uuid>
           ...
           <usage type='passphrase'>
             <name>mumblyfratz</name>
           </usage>
         </secret>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      c8438010
  9. 24 6月, 2016 3 次提交
  10. 20 5月, 2016 1 次提交
  11. 16 5月, 2016 1 次提交
  12. 26 4月, 2016 12 次提交
    • J
      secret: Change virSecretDef variable names · 662bf30c
      John Ferlan 提交于
      Change 'ephemeral' to 'isephemeral' and 'private' to 'isprivate' since
      both are bools.
      662bf30c
    • J
      secret: Introduce virSecretObjGetValue and virSecretObjGetValueSize · 43d3e3c1
      John Ferlan 提交于
      Introduce the final accessor's to _virSecretObject data and move the
      structure from virsecretobj.h to virsecretobj.c
      
      The virSecretObjSetValue logic will handle setting both the secret
      value and the value_size. Some slight adjustments to the error path
      over what was in secretSetValue were made.
      
      Additionally, a slight logic change in secretGetValue where we'll
      check for the internalFlags and error out before checking for
      and erroring out for a NULL secret->value. That way, it won't be
      obvious to anyone that the secret value wasn't set rather they'll
      just know they cannot get the secret value since it's private.
      43d3e3c1
    • J
      secret: Introduce virSecretObj{Get|Set}Def · 9e1e5621
      John Ferlan 提交于
      Introduce fetch and set accessor to the secretObj->def field for usage
      by the driver to avoid the driver needing to know the format of virSecretObj
      9e1e5621
    • J
      secret: Introduce virSecretObjSave{Config|Data} · ac9ffd60
      John Ferlan 提交于
      Move and rename the secretRewriteFile, secretSaveDef, and secretSaveValue
      from secret_driver to virsecretobj
      
      Need to make some slight adjustments since the secretSave* functions
      called secretEnsureDirectory, but otherwise mostly just a move of code.
      ac9ffd60
    • J
      secret: Introduce virSecretObjDelete{Config|Data} · d467ac07
      John Ferlan 提交于
      Move and rename secretDeleteSaved from secret_driver into virsecretobj and
      split it up into two parts since there is error path code that looks to
      just delete the secret data file
      d467ac07
    • J
      secret: Move and rename secretLoadAllConfigs · 85ec94f8
      John Ferlan 提交于
      Move to secret_conf.c and rename to virSecretLoadAllConfigs. Also includes
      moving/renaming the supporting virSecretLoad, virSecretLoadValue, and
      virSecretLoadValidateUUID.
      85ec94f8
    • J
      secret: Introduce virSecretObjListGetUUIDs · bb1fba62
      John Ferlan 提交于
      Add function to return counted listed of uuids to from the hashed secrets
      object list. This will replace the guts of secretConnectListSecrets.
      bb1fba62
    • J
      secret: Introduce virSecretObjListExport · d12c6721
      John Ferlan 提交于
      Add function to return a "match" filtered list of secret objects. This
      function replaces the guts of secretConnectListAllSecrets.
      
      Need to also move and make global virSecretUsageIDForDef since it'll
      be used by both secret_driver.c and secret_conf.c
      d12c6721
    • J
      secret: Introduce virSecretObjListNumOfSecrets · 5249d076
      John Ferlan 提交于
      Add function to count the hashed secret obj list with filters. This
      will replace the guts of secret_driver's secretConnectNumOfSecrets.
      5249d076
    • J
      secret: Introduce virSecretObjListAdd* and virSecretObjListRemove · d4287b98
      John Ferlan 提交于
      Add the functions to add/remove elements from the hashed secret obj list.
      These will replace secret_driver functions secretAssignDef and secretObjRemove.
      
      The virSecretObjListAddLocked will perform the necessary lookups and
      decide whether to replace an existing hash entry or create a new one.
      This includes setting up the configPath and base64Path as well as being
      able to support the caller's need to restore from a previous definition
      in case something goes wrong in the caller.
      d4287b98
    • J
      secret: Introduce virSecretObjListFindBy{UUID|Usage} support · 00a3f0d0
      John Ferlan 提交于
      New API's including unlocked and Locked versions in order to be able
      to use in either manner.
      
      Support for searching hash object lists instead of linked lists will
      replace existing secret_driver functions secretFindByUUID and
      secretFindByUsage
      00a3f0d0
    • J
      secret: Create virsecretobj.c and virsecretconf.h · 4652b158
      John Ferlan 提交于
      Move virSecretObj from secret_driver.c to virsecretobj.h
      
      To support being able to create a hashed secrets list, move the
      virSecretObj to virsecretobj.h so that the code can at least find
      the definition.
      
      This should be a temporary situation while the virsecretobj.c code
      is patched in order to support a hashed secret object while still
      having the linked list support in secret_driver.c. Eventually, the
      goal is to move the virSecretObj into virsecretobj.c, although it
      is notable that the existing model from which virSecretObj was
      derived has virDomainObj in src/conf/domain_conf.h and virNetworkObj
      in src/conf/network_conf.h, so virSecretObj wouldn't be unique if
      it were to remain in virsecretobj.h  Still adding accessors to fetch
      and store hashed object data will be the end goal.
      
      Add definitions and infrastucture in virsecretobj.c to create and
      handle a hashed virSecretObj and virSecretObjList including the class,
      object, lock setup, and disposal API's. Nothing will call these yet.
      
      This infrastructure will replace the forward linked list logic
      within the secret_driver, eventually.
      4652b158