提交 4ab0d6c4 编写于 作者: M Michal Privoznik

security: Switch to C99-style struct initialization

上级 81e9e7cf
...@@ -809,39 +809,39 @@ AppArmorSetImageFDLabel(virSecurityManagerPtr mgr, ...@@ -809,39 +809,39 @@ AppArmorSetImageFDLabel(virSecurityManagerPtr mgr,
} }
virSecurityDriver virAppArmorSecurityDriver = { virSecurityDriver virAppArmorSecurityDriver = {
0, .privateDataLen = 0,
SECURITY_APPARMOR_NAME, .name = SECURITY_APPARMOR_NAME,
AppArmorSecurityManagerProbe, .probe = AppArmorSecurityManagerProbe,
AppArmorSecurityManagerOpen, .open = AppArmorSecurityManagerOpen,
AppArmorSecurityManagerClose, .close = AppArmorSecurityManagerClose,
AppArmorSecurityManagerGetModel, .getModel = AppArmorSecurityManagerGetModel,
AppArmorSecurityManagerGetDOI, .getDOI = AppArmorSecurityManagerGetDOI,
AppArmorSecurityVerify, .domainSecurityVerify = AppArmorSecurityVerify,
AppArmorSetSecurityImageLabel, .domainSetSecurityImageLabel = AppArmorSetSecurityImageLabel,
AppArmorRestoreSecurityImageLabel, .domainRestoreSecurityImageLabel = AppArmorRestoreSecurityImageLabel,
AppArmorSetSecurityDaemonSocketLabel, .domainSetSecurityDaemonSocketLabel = AppArmorSetSecurityDaemonSocketLabel,
AppArmorSetSecuritySocketLabel, .domainSetSecuritySocketLabel = AppArmorSetSecuritySocketLabel,
AppArmorClearSecuritySocketLabel, .domainClearSecuritySocketLabel = AppArmorClearSecuritySocketLabel,
AppArmorGenSecurityLabel, .domainGenSecurityLabel = AppArmorGenSecurityLabel,
AppArmorReserveSecurityLabel, .domainReserveSecurityLabel = AppArmorReserveSecurityLabel,
AppArmorReleaseSecurityLabel, .domainReleaseSecurityLabel = AppArmorReleaseSecurityLabel,
AppArmorGetSecurityProcessLabel, .domainGetSecurityProcessLabel = AppArmorGetSecurityProcessLabel,
AppArmorSetSecurityProcessLabel, .domainSetSecurityProcessLabel = AppArmorSetSecurityProcessLabel,
AppArmorSetSecurityAllLabel, .domainSetSecurityAllLabel = AppArmorSetSecurityAllLabel,
AppArmorRestoreSecurityAllLabel, .domainRestoreSecurityAllLabel = AppArmorRestoreSecurityAllLabel,
AppArmorSetSecurityHostdevLabel, .domainSetSecurityHostdevLabel = AppArmorSetSecurityHostdevLabel,
AppArmorRestoreSecurityHostdevLabel, .domainRestoreSecurityHostdevLabel = AppArmorRestoreSecurityHostdevLabel,
AppArmorSetSavedStateLabel, .domainSetSavedStateLabel = AppArmorSetSavedStateLabel,
AppArmorRestoreSavedStateLabel, .domainRestoreSavedStateLabel = AppArmorRestoreSavedStateLabel,
AppArmorSetImageFDLabel, .domainSetSecurityImageFDLabel = AppArmorSetImageFDLabel,
}; };
...@@ -723,42 +723,41 @@ static char *virSecurityDACGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_U ...@@ -723,42 +723,41 @@ static char *virSecurityDACGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_U
} }
virSecurityDriver virSecurityDriverDAC = { virSecurityDriver virSecurityDriverDAC = {
sizeof(virSecurityDACData), .privateDataLen = sizeof(virSecurityDACData),
"virDAC", .name = "virDAC",
.probe = virSecurityDACProbe,
.open = virSecurityDACOpen,
.close = virSecurityDACClose,
virSecurityDACProbe, .getModel = virSecurityDACGetModel,
virSecurityDACOpen, .getDOI = virSecurityDACGetDOI,
virSecurityDACClose,
virSecurityDACGetModel, .domainSecurityVerify = virSecurityDACVerify,
virSecurityDACGetDOI,
virSecurityDACVerify, .domainSetSecurityImageLabel = virSecurityDACSetSecurityImageLabel,
.domainRestoreSecurityImageLabel = virSecurityDACRestoreSecurityImageLabel,
virSecurityDACSetSecurityImageLabel, .domainSetSecurityDaemonSocketLabel = virSecurityDACSetDaemonSocketLabel,
virSecurityDACRestoreSecurityImageLabel, .domainSetSecuritySocketLabel = virSecurityDACSetSocketLabel,
.domainClearSecuritySocketLabel = virSecurityDACClearSocketLabel,
virSecurityDACSetDaemonSocketLabel, .domainGenSecurityLabel = virSecurityDACGenLabel,
virSecurityDACSetSocketLabel, .domainReserveSecurityLabel = virSecurityDACReserveLabel,
virSecurityDACClearSocketLabel, .domainReleaseSecurityLabel = virSecurityDACReleaseLabel,
virSecurityDACGenLabel, .domainGetSecurityProcessLabel = virSecurityDACGetProcessLabel,
virSecurityDACReserveLabel, .domainSetSecurityProcessLabel = virSecurityDACSetProcessLabel,
virSecurityDACReleaseLabel,
virSecurityDACGetProcessLabel, .domainSetSecurityAllLabel = virSecurityDACSetSecurityAllLabel,
virSecurityDACSetProcessLabel, .domainRestoreSecurityAllLabel = virSecurityDACRestoreSecurityAllLabel,
virSecurityDACSetSecurityAllLabel, .domainSetSecurityHostdevLabel = virSecurityDACSetSecurityHostdevLabel,
virSecurityDACRestoreSecurityAllLabel, .domainRestoreSecurityHostdevLabel = virSecurityDACRestoreSecurityHostdevLabel,
virSecurityDACSetSecurityHostdevLabel, .domainSetSavedStateLabel = virSecurityDACSetSavedStateLabel,
virSecurityDACRestoreSecurityHostdevLabel, .domainRestoreSavedStateLabel = virSecurityDACRestoreSavedStateLabel,
virSecurityDACSetSavedStateLabel, .domainSetSecurityImageFDLabel = virSecurityDACSetImageFDLabel,
virSecurityDACRestoreSavedStateLabel,
virSecurityDACSetImageFDLabel, .domainGetSecurityMountOptions = virSecurityDACGetMountOptions,
virSecurityDACGetMountOptions,
}; };
...@@ -170,41 +170,41 @@ static char *virSecurityDomainGetMountOptionsNop(virSecurityManagerPtr mgr ATTRI ...@@ -170,41 +170,41 @@ static char *virSecurityDomainGetMountOptionsNop(virSecurityManagerPtr mgr ATTRI
} }
virSecurityDriver virSecurityDriverNop = { virSecurityDriver virSecurityDriverNop = {
0, .privateDataLen = 0,
"none", .name = "none",
virSecurityDriverProbeNop, .probe = virSecurityDriverProbeNop,
virSecurityDriverOpenNop, .open = virSecurityDriverOpenNop,
virSecurityDriverCloseNop, .close = virSecurityDriverCloseNop,
virSecurityDriverGetModelNop, .getModel = virSecurityDriverGetModelNop,
virSecurityDriverGetDOINop, .getDOI = virSecurityDriverGetDOINop,
virSecurityDomainVerifyNop, .domainSecurityVerify = virSecurityDomainVerifyNop,
virSecurityDomainSetImageLabelNop, .domainSetSecurityImageLabel = virSecurityDomainSetImageLabelNop,
virSecurityDomainRestoreImageLabelNop, .domainRestoreSecurityImageLabel = virSecurityDomainRestoreImageLabelNop,
virSecurityDomainSetDaemonSocketLabelNop, .domainSetSecurityDaemonSocketLabel = virSecurityDomainSetDaemonSocketLabelNop,
virSecurityDomainSetSocketLabelNop, .domainSetSecuritySocketLabel = virSecurityDomainSetSocketLabelNop,
virSecurityDomainClearSocketLabelNop, .domainClearSecuritySocketLabel = virSecurityDomainClearSocketLabelNop,
virSecurityDomainGenLabelNop, .domainGenSecurityLabel = virSecurityDomainGenLabelNop,
virSecurityDomainReserveLabelNop, .domainReserveSecurityLabel = virSecurityDomainReserveLabelNop,
virSecurityDomainReleaseLabelNop, .domainReleaseSecurityLabel = virSecurityDomainReleaseLabelNop,
virSecurityDomainGetProcessLabelNop, .domainGetSecurityProcessLabel = virSecurityDomainGetProcessLabelNop,
virSecurityDomainSetProcessLabelNop, .domainSetSecurityProcessLabel = virSecurityDomainSetProcessLabelNop,
virSecurityDomainSetAllLabelNop, .domainSetSecurityAllLabel = virSecurityDomainSetAllLabelNop,
virSecurityDomainRestoreAllLabelNop, .domainRestoreSecurityAllLabel = virSecurityDomainRestoreAllLabelNop,
virSecurityDomainSetHostdevLabelNop, .domainSetSecurityHostdevLabel = virSecurityDomainSetHostdevLabelNop,
virSecurityDomainRestoreHostdevLabelNop, .domainRestoreSecurityHostdevLabel = virSecurityDomainRestoreHostdevLabelNop,
virSecurityDomainSetSavedStateLabelNop, .domainSetSavedStateLabel = virSecurityDomainSetSavedStateLabelNop,
virSecurityDomainRestoreSavedStateLabelNop, .domainRestoreSavedStateLabel = virSecurityDomainRestoreSavedStateLabelNop,
virSecurityDomainSetFDLabelNop, .domainSetSecurityImageFDLabel = virSecurityDomainSetFDLabelNop,
virSecurityDomainGetMountOptionsNop, .domainGetSecurityMountOptions = virSecurityDomainGetMountOptionsNop,
}; };
...@@ -1591,41 +1591,41 @@ static char *SELinuxGetSecurityMountOptions(virSecurityManagerPtr mgr, ...@@ -1591,41 +1591,41 @@ static char *SELinuxGetSecurityMountOptions(virSecurityManagerPtr mgr,
} }
virSecurityDriver virSecurityDriverSELinux = { virSecurityDriver virSecurityDriverSELinux = {
sizeof(virSecuritySELinuxData), .privateDataLen = sizeof(virSecuritySELinuxData),
SECURITY_SELINUX_NAME, .name = SECURITY_SELINUX_NAME,
SELinuxSecurityDriverProbe, .probe = SELinuxSecurityDriverProbe,
SELinuxSecurityDriverOpen, .open = SELinuxSecurityDriverOpen,
SELinuxSecurityDriverClose, .close = SELinuxSecurityDriverClose,
SELinuxSecurityGetModel, .getModel = SELinuxSecurityGetModel,
SELinuxSecurityGetDOI, .getDOI = SELinuxSecurityGetDOI,
SELinuxSecurityVerify, .domainSecurityVerify = SELinuxSecurityVerify,
SELinuxSetSecurityImageLabel, .domainSetSecurityImageLabel = SELinuxSetSecurityImageLabel,
SELinuxRestoreSecurityImageLabel, .domainRestoreSecurityImageLabel = SELinuxRestoreSecurityImageLabel,
SELinuxSetSecurityDaemonSocketLabel, .domainSetSecurityDaemonSocketLabel = SELinuxSetSecurityDaemonSocketLabel,
SELinuxSetSecuritySocketLabel, .domainSetSecuritySocketLabel = SELinuxSetSecuritySocketLabel,
SELinuxClearSecuritySocketLabel, .domainClearSecuritySocketLabel = SELinuxClearSecuritySocketLabel,
SELinuxGenSecurityLabel, .domainGenSecurityLabel = SELinuxGenSecurityLabel,
SELinuxReserveSecurityLabel, .domainReserveSecurityLabel = SELinuxReserveSecurityLabel,
SELinuxReleaseSecurityLabel, .domainReleaseSecurityLabel = SELinuxReleaseSecurityLabel,
SELinuxGetSecurityProcessLabel, .domainGetSecurityProcessLabel = SELinuxGetSecurityProcessLabel,
SELinuxSetSecurityProcessLabel, .domainSetSecurityProcessLabel = SELinuxSetSecurityProcessLabel,
SELinuxSetSecurityAllLabel, .domainSetSecurityAllLabel = SELinuxSetSecurityAllLabel,
SELinuxRestoreSecurityAllLabel, .domainRestoreSecurityAllLabel = SELinuxRestoreSecurityAllLabel,
SELinuxSetSecurityHostdevLabel, .domainSetSecurityHostdevLabel = SELinuxSetSecurityHostdevLabel,
SELinuxRestoreSecurityHostdevLabel, .domainRestoreSecurityHostdevLabel = SELinuxRestoreSecurityHostdevLabel,
SELinuxSetSavedStateLabel, .domainSetSavedStateLabel = SELinuxSetSavedStateLabel,
SELinuxRestoreSavedStateLabel, .domainRestoreSavedStateLabel = SELinuxRestoreSavedStateLabel,
SELinuxSetImageFDLabel, .domainSetSecurityImageFDLabel = SELinuxSetImageFDLabel,
SELinuxGetSecurityMountOptions, .domainGetSecurityMountOptions = SELinuxGetSecurityMountOptions,
}; };
...@@ -409,41 +409,41 @@ static char *virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE ...@@ -409,41 +409,41 @@ static char *virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE
} }
virSecurityDriver virSecurityDriverStack = { virSecurityDriver virSecurityDriverStack = {
sizeof(virSecurityStackData), .privateDataLen = sizeof(virSecurityStackData),
"stack", .name = "stack",
virSecurityStackProbe, .probe = virSecurityStackProbe,
virSecurityStackOpen, .open = virSecurityStackOpen,
virSecurityStackClose, .close = virSecurityStackClose,
virSecurityStackGetModel, .getModel = virSecurityStackGetModel,
virSecurityStackGetDOI, .getDOI = virSecurityStackGetDOI,
virSecurityStackVerify, .domainSecurityVerify = virSecurityStackVerify,
virSecurityStackSetSecurityImageLabel, .domainSetSecurityImageLabel = virSecurityStackSetSecurityImageLabel,
virSecurityStackRestoreSecurityImageLabel, .domainRestoreSecurityImageLabel = virSecurityStackRestoreSecurityImageLabel,
virSecurityStackSetDaemonSocketLabel, .domainSetSecurityDaemonSocketLabel = virSecurityStackSetDaemonSocketLabel,
virSecurityStackSetSocketLabel, .domainSetSecuritySocketLabel = virSecurityStackSetSocketLabel,
virSecurityStackClearSocketLabel, .domainClearSecuritySocketLabel = virSecurityStackClearSocketLabel,
virSecurityStackGenLabel, .domainGenSecurityLabel = virSecurityStackGenLabel,
virSecurityStackReserveLabel, .domainReserveSecurityLabel = virSecurityStackReserveLabel,
virSecurityStackReleaseLabel, .domainReleaseSecurityLabel = virSecurityStackReleaseLabel,
virSecurityStackGetProcessLabel, .domainGetSecurityProcessLabel = virSecurityStackGetProcessLabel,
virSecurityStackSetProcessLabel, .domainSetSecurityProcessLabel = virSecurityStackSetProcessLabel,
virSecurityStackSetSecurityAllLabel, .domainSetSecurityAllLabel = virSecurityStackSetSecurityAllLabel,
virSecurityStackRestoreSecurityAllLabel, .domainRestoreSecurityAllLabel = virSecurityStackRestoreSecurityAllLabel,
virSecurityStackSetSecurityHostdevLabel, .domainSetSecurityHostdevLabel = virSecurityStackSetSecurityHostdevLabel,
virSecurityStackRestoreSecurityHostdevLabel, .domainRestoreSecurityHostdevLabel = virSecurityStackRestoreSecurityHostdevLabel,
virSecurityStackSetSavedStateLabel, .domainSetSavedStateLabel = virSecurityStackSetSavedStateLabel,
virSecurityStackRestoreSavedStateLabel, .domainRestoreSavedStateLabel = virSecurityStackRestoreSavedStateLabel,
virSecurityStackSetImageFDLabel, .domainSetSecurityImageFDLabel = virSecurityStackSetImageFDLabel,
virSecurityStackGetMountOptions, .domainGetSecurityMountOptions = virSecurityStackGetMountOptions,
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册