diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2012-05-24 15:11:26 +0200 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2012-05-24 16:37:51 +0200 |
commit | 4ab0d6c48a1ba9abf056ef22719cb5930663ad43 (patch) | |
tree | 35253d6e2cfc2ed251095bbb8fd640d30bbfb616 /src/security | |
parent | fix building error on non fedora system (diff) | |
download | libvirt-4ab0d6c48a1ba9abf056ef22719cb5930663ad43.tar.gz libvirt-4ab0d6c48a1ba9abf056ef22719cb5930663ad43.tar.bz2 libvirt-4ab0d6c48a1ba9abf056ef22719cb5930663ad43.zip |
security: Switch to C99-style struct initialization
Diffstat (limited to 'src/security')
-rw-r--r-- | src/security/security_apparmor.c | 50 | ||||
-rw-r--r-- | src/security/security_dac.c | 53 | ||||
-rw-r--r-- | src/security/security_nop.c | 52 | ||||
-rw-r--r-- | src/security/security_selinux.c | 52 | ||||
-rw-r--r-- | src/security/security_stack.c | 52 |
5 files changed, 129 insertions, 130 deletions
diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 2d05fd013..62af3c6c2 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -809,39 +809,39 @@ AppArmorSetImageFDLabel(virSecurityManagerPtr mgr, } virSecurityDriver virAppArmorSecurityDriver = { - 0, - SECURITY_APPARMOR_NAME, - AppArmorSecurityManagerProbe, - AppArmorSecurityManagerOpen, - AppArmorSecurityManagerClose, + .privateDataLen = 0, + .name = SECURITY_APPARMOR_NAME, + .probe = AppArmorSecurityManagerProbe, + .open = AppArmorSecurityManagerOpen, + .close = AppArmorSecurityManagerClose, - AppArmorSecurityManagerGetModel, - AppArmorSecurityManagerGetDOI, + .getModel = AppArmorSecurityManagerGetModel, + .getDOI = AppArmorSecurityManagerGetDOI, - AppArmorSecurityVerify, + .domainSecurityVerify = AppArmorSecurityVerify, - AppArmorSetSecurityImageLabel, - AppArmorRestoreSecurityImageLabel, + .domainSetSecurityImageLabel = AppArmorSetSecurityImageLabel, + .domainRestoreSecurityImageLabel = AppArmorRestoreSecurityImageLabel, - AppArmorSetSecurityDaemonSocketLabel, - AppArmorSetSecuritySocketLabel, - AppArmorClearSecuritySocketLabel, + .domainSetSecurityDaemonSocketLabel = AppArmorSetSecurityDaemonSocketLabel, + .domainSetSecuritySocketLabel = AppArmorSetSecuritySocketLabel, + .domainClearSecuritySocketLabel = AppArmorClearSecuritySocketLabel, - AppArmorGenSecurityLabel, - AppArmorReserveSecurityLabel, - AppArmorReleaseSecurityLabel, + .domainGenSecurityLabel = AppArmorGenSecurityLabel, + .domainReserveSecurityLabel = AppArmorReserveSecurityLabel, + .domainReleaseSecurityLabel = AppArmorReleaseSecurityLabel, - AppArmorGetSecurityProcessLabel, - AppArmorSetSecurityProcessLabel, + .domainGetSecurityProcessLabel = AppArmorGetSecurityProcessLabel, + .domainSetSecurityProcessLabel = AppArmorSetSecurityProcessLabel, - AppArmorSetSecurityAllLabel, - AppArmorRestoreSecurityAllLabel, + .domainSetSecurityAllLabel = AppArmorSetSecurityAllLabel, + .domainRestoreSecurityAllLabel = AppArmorRestoreSecurityAllLabel, - AppArmorSetSecurityHostdevLabel, - AppArmorRestoreSecurityHostdevLabel, + .domainSetSecurityHostdevLabel = AppArmorSetSecurityHostdevLabel, + .domainRestoreSecurityHostdevLabel = AppArmorRestoreSecurityHostdevLabel, - AppArmorSetSavedStateLabel, - AppArmorRestoreSavedStateLabel, + .domainSetSavedStateLabel = AppArmorSetSavedStateLabel, + .domainRestoreSavedStateLabel = AppArmorRestoreSavedStateLabel, - AppArmorSetImageFDLabel, + .domainSetSecurityImageFDLabel = AppArmorSetImageFDLabel, }; diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 470861dc2..9182b39c9 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -723,42 +723,41 @@ static char *virSecurityDACGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_U } virSecurityDriver virSecurityDriverDAC = { - sizeof(virSecurityDACData), - "virDAC", + .privateDataLen = sizeof(virSecurityDACData), + .name = "virDAC", + .probe = virSecurityDACProbe, + .open = virSecurityDACOpen, + .close = virSecurityDACClose, - virSecurityDACProbe, - virSecurityDACOpen, - virSecurityDACClose, + .getModel = virSecurityDACGetModel, + .getDOI = virSecurityDACGetDOI, - virSecurityDACGetModel, - virSecurityDACGetDOI, + .domainSecurityVerify = virSecurityDACVerify, - virSecurityDACVerify, + .domainSetSecurityImageLabel = virSecurityDACSetSecurityImageLabel, + .domainRestoreSecurityImageLabel = virSecurityDACRestoreSecurityImageLabel, - virSecurityDACSetSecurityImageLabel, - virSecurityDACRestoreSecurityImageLabel, + .domainSetSecurityDaemonSocketLabel = virSecurityDACSetDaemonSocketLabel, + .domainSetSecuritySocketLabel = virSecurityDACSetSocketLabel, + .domainClearSecuritySocketLabel = virSecurityDACClearSocketLabel, - virSecurityDACSetDaemonSocketLabel, - virSecurityDACSetSocketLabel, - virSecurityDACClearSocketLabel, + .domainGenSecurityLabel = virSecurityDACGenLabel, + .domainReserveSecurityLabel = virSecurityDACReserveLabel, + .domainReleaseSecurityLabel = virSecurityDACReleaseLabel, - virSecurityDACGenLabel, - virSecurityDACReserveLabel, - virSecurityDACReleaseLabel, + .domainGetSecurityProcessLabel = virSecurityDACGetProcessLabel, + .domainSetSecurityProcessLabel = virSecurityDACSetProcessLabel, - virSecurityDACGetProcessLabel, - virSecurityDACSetProcessLabel, + .domainSetSecurityAllLabel = virSecurityDACSetSecurityAllLabel, + .domainRestoreSecurityAllLabel = virSecurityDACRestoreSecurityAllLabel, - virSecurityDACSetSecurityAllLabel, - virSecurityDACRestoreSecurityAllLabel, + .domainSetSecurityHostdevLabel = virSecurityDACSetSecurityHostdevLabel, + .domainRestoreSecurityHostdevLabel = virSecurityDACRestoreSecurityHostdevLabel, - virSecurityDACSetSecurityHostdevLabel, - virSecurityDACRestoreSecurityHostdevLabel, + .domainSetSavedStateLabel = virSecurityDACSetSavedStateLabel, + .domainRestoreSavedStateLabel = virSecurityDACRestoreSavedStateLabel, - virSecurityDACSetSavedStateLabel, - virSecurityDACRestoreSavedStateLabel, + .domainSetSecurityImageFDLabel = virSecurityDACSetImageFDLabel, - virSecurityDACSetImageFDLabel, - - virSecurityDACGetMountOptions, + .domainGetSecurityMountOptions = virSecurityDACGetMountOptions, }; diff --git a/src/security/security_nop.c b/src/security/security_nop.c index b62daf57d..5f90df32c 100644 --- a/src/security/security_nop.c +++ b/src/security/security_nop.c @@ -170,41 +170,41 @@ static char *virSecurityDomainGetMountOptionsNop(virSecurityManagerPtr mgr ATTRI } virSecurityDriver virSecurityDriverNop = { - 0, - "none", - virSecurityDriverProbeNop, - virSecurityDriverOpenNop, - virSecurityDriverCloseNop, + .privateDataLen = 0, + .name = "none", + .probe = virSecurityDriverProbeNop, + .open = virSecurityDriverOpenNop, + .close = virSecurityDriverCloseNop, - virSecurityDriverGetModelNop, - virSecurityDriverGetDOINop, + .getModel = virSecurityDriverGetModelNop, + .getDOI = virSecurityDriverGetDOINop, - virSecurityDomainVerifyNop, + .domainSecurityVerify = virSecurityDomainVerifyNop, - virSecurityDomainSetImageLabelNop, - virSecurityDomainRestoreImageLabelNop, + .domainSetSecurityImageLabel = virSecurityDomainSetImageLabelNop, + .domainRestoreSecurityImageLabel = virSecurityDomainRestoreImageLabelNop, - virSecurityDomainSetDaemonSocketLabelNop, - virSecurityDomainSetSocketLabelNop, - virSecurityDomainClearSocketLabelNop, + .domainSetSecurityDaemonSocketLabel = virSecurityDomainSetDaemonSocketLabelNop, + .domainSetSecuritySocketLabel = virSecurityDomainSetSocketLabelNop, + .domainClearSecuritySocketLabel = virSecurityDomainClearSocketLabelNop, - virSecurityDomainGenLabelNop, - virSecurityDomainReserveLabelNop, - virSecurityDomainReleaseLabelNop, + .domainGenSecurityLabel = virSecurityDomainGenLabelNop, + .domainReserveSecurityLabel = virSecurityDomainReserveLabelNop, + .domainReleaseSecurityLabel = virSecurityDomainReleaseLabelNop, - virSecurityDomainGetProcessLabelNop, - virSecurityDomainSetProcessLabelNop, + .domainGetSecurityProcessLabel = virSecurityDomainGetProcessLabelNop, + .domainSetSecurityProcessLabel = virSecurityDomainSetProcessLabelNop, - virSecurityDomainSetAllLabelNop, - virSecurityDomainRestoreAllLabelNop, + .domainSetSecurityAllLabel = virSecurityDomainSetAllLabelNop, + .domainRestoreSecurityAllLabel = virSecurityDomainRestoreAllLabelNop, - virSecurityDomainSetHostdevLabelNop, - virSecurityDomainRestoreHostdevLabelNop, + .domainSetSecurityHostdevLabel = virSecurityDomainSetHostdevLabelNop, + .domainRestoreSecurityHostdevLabel = virSecurityDomainRestoreHostdevLabelNop, - virSecurityDomainSetSavedStateLabelNop, - virSecurityDomainRestoreSavedStateLabelNop, + .domainSetSavedStateLabel = virSecurityDomainSetSavedStateLabelNop, + .domainRestoreSavedStateLabel = virSecurityDomainRestoreSavedStateLabelNop, - virSecurityDomainSetFDLabelNop, + .domainSetSecurityImageFDLabel = virSecurityDomainSetFDLabelNop, - virSecurityDomainGetMountOptionsNop, + .domainGetSecurityMountOptions = virSecurityDomainGetMountOptionsNop, }; diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 2b8ff1925..ffa65fb54 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1591,41 +1591,41 @@ static char *SELinuxGetSecurityMountOptions(virSecurityManagerPtr mgr, } virSecurityDriver virSecurityDriverSELinux = { - sizeof(virSecuritySELinuxData), - SECURITY_SELINUX_NAME, - SELinuxSecurityDriverProbe, - SELinuxSecurityDriverOpen, - SELinuxSecurityDriverClose, + .privateDataLen = sizeof(virSecuritySELinuxData), + .name = SECURITY_SELINUX_NAME, + .probe = SELinuxSecurityDriverProbe, + .open = SELinuxSecurityDriverOpen, + .close = SELinuxSecurityDriverClose, - SELinuxSecurityGetModel, - SELinuxSecurityGetDOI, + .getModel = SELinuxSecurityGetModel, + .getDOI = SELinuxSecurityGetDOI, - SELinuxSecurityVerify, + .domainSecurityVerify = SELinuxSecurityVerify, - SELinuxSetSecurityImageLabel, - SELinuxRestoreSecurityImageLabel, + .domainSetSecurityImageLabel = SELinuxSetSecurityImageLabel, + .domainRestoreSecurityImageLabel = SELinuxRestoreSecurityImageLabel, - SELinuxSetSecurityDaemonSocketLabel, - SELinuxSetSecuritySocketLabel, - SELinuxClearSecuritySocketLabel, + .domainSetSecurityDaemonSocketLabel = SELinuxSetSecurityDaemonSocketLabel, + .domainSetSecuritySocketLabel = SELinuxSetSecuritySocketLabel, + .domainClearSecuritySocketLabel = SELinuxClearSecuritySocketLabel, - SELinuxGenSecurityLabel, - SELinuxReserveSecurityLabel, - SELinuxReleaseSecurityLabel, + .domainGenSecurityLabel = SELinuxGenSecurityLabel, + .domainReserveSecurityLabel = SELinuxReserveSecurityLabel, + .domainReleaseSecurityLabel = SELinuxReleaseSecurityLabel, - SELinuxGetSecurityProcessLabel, - SELinuxSetSecurityProcessLabel, + .domainGetSecurityProcessLabel = SELinuxGetSecurityProcessLabel, + .domainSetSecurityProcessLabel = SELinuxSetSecurityProcessLabel, - SELinuxSetSecurityAllLabel, - SELinuxRestoreSecurityAllLabel, + .domainSetSecurityAllLabel = SELinuxSetSecurityAllLabel, + .domainRestoreSecurityAllLabel = SELinuxRestoreSecurityAllLabel, - SELinuxSetSecurityHostdevLabel, - SELinuxRestoreSecurityHostdevLabel, + .domainSetSecurityHostdevLabel = SELinuxSetSecurityHostdevLabel, + .domainRestoreSecurityHostdevLabel = SELinuxRestoreSecurityHostdevLabel, - SELinuxSetSavedStateLabel, - SELinuxRestoreSavedStateLabel, + .domainSetSavedStateLabel = SELinuxSetSavedStateLabel, + .domainRestoreSavedStateLabel = SELinuxRestoreSavedStateLabel, - SELinuxSetImageFDLabel, + .domainSetSecurityImageFDLabel = SELinuxSetImageFDLabel, - SELinuxGetSecurityMountOptions, + .domainGetSecurityMountOptions = SELinuxGetSecurityMountOptions, }; diff --git a/src/security/security_stack.c b/src/security/security_stack.c index 6ecd099dc..65d30d6bb 100644 --- a/src/security/security_stack.c +++ b/src/security/security_stack.c @@ -409,41 +409,41 @@ static char *virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE } virSecurityDriver virSecurityDriverStack = { - sizeof(virSecurityStackData), - "stack", - virSecurityStackProbe, - virSecurityStackOpen, - virSecurityStackClose, + .privateDataLen = sizeof(virSecurityStackData), + .name = "stack", + .probe = virSecurityStackProbe, + .open = virSecurityStackOpen, + .close = virSecurityStackClose, - virSecurityStackGetModel, - virSecurityStackGetDOI, + .getModel = virSecurityStackGetModel, + .getDOI = virSecurityStackGetDOI, - virSecurityStackVerify, + .domainSecurityVerify = virSecurityStackVerify, - virSecurityStackSetSecurityImageLabel, - virSecurityStackRestoreSecurityImageLabel, + .domainSetSecurityImageLabel = virSecurityStackSetSecurityImageLabel, + .domainRestoreSecurityImageLabel = virSecurityStackRestoreSecurityImageLabel, - virSecurityStackSetDaemonSocketLabel, - virSecurityStackSetSocketLabel, - virSecurityStackClearSocketLabel, + .domainSetSecurityDaemonSocketLabel = virSecurityStackSetDaemonSocketLabel, + .domainSetSecuritySocketLabel = virSecurityStackSetSocketLabel, + .domainClearSecuritySocketLabel = virSecurityStackClearSocketLabel, - virSecurityStackGenLabel, - virSecurityStackReserveLabel, - virSecurityStackReleaseLabel, + .domainGenSecurityLabel = virSecurityStackGenLabel, + .domainReserveSecurityLabel = virSecurityStackReserveLabel, + .domainReleaseSecurityLabel = virSecurityStackReleaseLabel, - virSecurityStackGetProcessLabel, - virSecurityStackSetProcessLabel, + .domainGetSecurityProcessLabel = virSecurityStackGetProcessLabel, + .domainSetSecurityProcessLabel = virSecurityStackSetProcessLabel, - virSecurityStackSetSecurityAllLabel, - virSecurityStackRestoreSecurityAllLabel, + .domainSetSecurityAllLabel = virSecurityStackSetSecurityAllLabel, + .domainRestoreSecurityAllLabel = virSecurityStackRestoreSecurityAllLabel, - virSecurityStackSetSecurityHostdevLabel, - virSecurityStackRestoreSecurityHostdevLabel, + .domainSetSecurityHostdevLabel = virSecurityStackSetSecurityHostdevLabel, + .domainRestoreSecurityHostdevLabel = virSecurityStackRestoreSecurityHostdevLabel, - virSecurityStackSetSavedStateLabel, - virSecurityStackRestoreSavedStateLabel, + .domainSetSavedStateLabel = virSecurityStackSetSavedStateLabel, + .domainRestoreSavedStateLabel = virSecurityStackRestoreSavedStateLabel, - virSecurityStackSetImageFDLabel, + .domainSetSecurityImageFDLabel = virSecurityStackSetImageFDLabel, - virSecurityStackGetMountOptions, + .domainGetSecurityMountOptions = virSecurityStackGetMountOptions, }; |