security: Switch to C99-style struct initialization

This commit is contained in:
Michal Privoznik 2012-05-24 15:11:26 +02:00
parent 81e9e7cf3b
commit 4ab0d6c48a
5 changed files with 129 additions and 130 deletions

View File

@ -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,
};

View File

@ -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,
};

View File

@ -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,
};

View File

@ -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,
};

View File

@ -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,
};