[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/4] Turn virSecurityManager into a virObjectLockable



On 02/07/2013 06:46 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
> 
> To enable locking to be introduced to the security manager
> objects later, turn virSecurityManager into a virObjectLockable
> class
> 
> Signed-off-by: Daniel P. Berrange <berrange redhat com>
> ---
>  src/lxc/lxc_controller.c        |  2 +-
>  src/lxc/lxc_driver.c            |  4 ++--
>  src/qemu/qemu_conf.h            |  2 +-
>  src/qemu/qemu_driver.c          |  6 +++---
>  src/security/security_manager.c | 47 ++++++++++++++++++++++++++++++++---------
>  src/security/security_manager.h |  2 --
>  src/security/security_stack.c   |  2 +-
>  tests/seclabeltest.c            |  2 +-
>  8 files changed, 46 insertions(+), 21 deletions(-)
> 
[...]
> diff --git a/src/security/security_manager.c b/src/security/security_manager.c
> index 593c00b..a3f8669 100644
> --- a/src/security/security_manager.c
> +++ b/src/security/security_manager.c
> @@ -163,21 +194,17 @@ virSecurityManagerPtr virSecurityManagerNew(const char *name,
>  
>  void *virSecurityManagerGetPrivateData(virSecurityManagerPtr mgr)
>  {
> -    /* This accesses the memory just beyond mgr, which was allocated
> -     * via VIR_ALLOC_VAR earlier.  */
> -    return mgr + 1;
> +    return mgr->privateData;
>  }
>  
>  
> -void virSecurityManagerFree(virSecurityManagerPtr mgr)
> +static void virSecurityManagerDispose(void *obj)

This makes the syntax-check fail, please squash this in:

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index a4f41ac..cb81497 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1045,7 +1045,6 @@ virSecurityDriverLookup;

 # security_manager.h
 virSecurityManagerClearSocketLabel;
-virSecurityManagerFree;
 virSecurityManagerGenLabel;
 virSecurityManagerGetDOI;
 virSecurityManagerGetModel;
--

Thanks,
Martin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]