mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
security_dac: Fix the coding style
Pushed under trivial rule.
This commit is contained in:
parent
0fc5d09cbb
commit
fb6a05e75d
@ -46,29 +46,32 @@ struct _virSecurityDACData {
|
|||||||
bool dynamicOwnership;
|
bool dynamicOwnership;
|
||||||
};
|
};
|
||||||
|
|
||||||
void virSecurityDACSetUser(virSecurityManagerPtr mgr,
|
void
|
||||||
|
virSecurityDACSetUser(virSecurityManagerPtr mgr,
|
||||||
uid_t user)
|
uid_t user)
|
||||||
{
|
{
|
||||||
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
||||||
priv->user = user;
|
priv->user = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
void virSecurityDACSetGroup(virSecurityManagerPtr mgr,
|
void
|
||||||
|
virSecurityDACSetGroup(virSecurityManagerPtr mgr,
|
||||||
gid_t group)
|
gid_t group)
|
||||||
{
|
{
|
||||||
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
||||||
priv->group = group;
|
priv->group = group;
|
||||||
}
|
}
|
||||||
|
|
||||||
void virSecurityDACSetDynamicOwnership(virSecurityManagerPtr mgr,
|
void
|
||||||
|
virSecurityDACSetDynamicOwnership(virSecurityManagerPtr mgr,
|
||||||
bool dynamicOwnership)
|
bool dynamicOwnership)
|
||||||
{
|
{
|
||||||
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
||||||
priv->dynamicOwnership = dynamicOwnership;
|
priv->dynamicOwnership = dynamicOwnership;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static int
|
||||||
int parseIds(const char *label, uid_t *uidPtr, gid_t *gidPtr)
|
parseIds(const char *label, uid_t *uidPtr, gid_t *gidPtr)
|
||||||
{
|
{
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
uid_t theuid;
|
uid_t theuid;
|
||||||
@ -114,8 +117,8 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* returns 1 if label isn't found, 0 on success, -1 on error */
|
/* returns 1 if label isn't found, 0 on success, -1 on error */
|
||||||
static
|
static int
|
||||||
int virSecurityDACParseIds(virDomainDefPtr def, uid_t *uidPtr, gid_t *gidPtr)
|
virSecurityDACParseIds(virDomainDefPtr def, uid_t *uidPtr, gid_t *gidPtr)
|
||||||
{
|
{
|
||||||
uid_t uid;
|
uid_t uid;
|
||||||
gid_t gid;
|
gid_t gid;
|
||||||
@ -141,8 +144,8 @@ int virSecurityDACParseIds(virDomainDefPtr def, uid_t *uidPtr, gid_t *gidPtr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static int
|
||||||
int virSecurityDACGetIds(virDomainDefPtr def, virSecurityDACDataPtr priv,
|
virSecurityDACGetIds(virDomainDefPtr def, virSecurityDACDataPtr priv,
|
||||||
uid_t *uidPtr, gid_t *gidPtr)
|
uid_t *uidPtr, gid_t *gidPtr)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -174,8 +177,8 @@ int virSecurityDACGetIds(virDomainDefPtr def, virSecurityDACDataPtr priv,
|
|||||||
|
|
||||||
|
|
||||||
/* returns 1 if label isn't found, 0 on success, -1 on error */
|
/* returns 1 if label isn't found, 0 on success, -1 on error */
|
||||||
static
|
static int
|
||||||
int virSecurityDACParseImageIds(virDomainDefPtr def,
|
virSecurityDACParseImageIds(virDomainDefPtr def,
|
||||||
uid_t *uidPtr, gid_t *gidPtr)
|
uid_t *uidPtr, gid_t *gidPtr)
|
||||||
{
|
{
|
||||||
uid_t uid;
|
uid_t uid;
|
||||||
@ -202,8 +205,8 @@ int virSecurityDACParseImageIds(virDomainDefPtr def,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static int
|
||||||
int virSecurityDACGetImageIds(virDomainDefPtr def, virSecurityDACDataPtr priv,
|
virSecurityDACGetImageIds(virDomainDefPtr def, virSecurityDACDataPtr priv,
|
||||||
uid_t *uidPtr, gid_t *gidPtr)
|
uid_t *uidPtr, gid_t *gidPtr)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -253,12 +256,14 @@ virSecurityDACClose(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const char * virSecurityDACGetModel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
|
static const char *
|
||||||
|
virSecurityDACGetModel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return SECURITY_DAC_NAME;
|
return SECURITY_DAC_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char * virSecurityDACGetDOI(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
|
static const char *
|
||||||
|
virSecurityDACGetDOI(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
@ -809,8 +814,7 @@ virSecurityDACSetSecurityTPMFileLabel(virSecurityManagerPtr mgr,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virSecurityDACRestoreSecurityTPMFileLabel(
|
virSecurityDACRestoreSecurityTPMFileLabel(virSecurityManagerPtr mgr,
|
||||||
virSecurityManagerPtr mgr,
|
|
||||||
virDomainTPMDefPtr tpm)
|
virDomainTPMDefPtr tpm)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -1183,8 +1187,10 @@ virSecurityDACSetTapFDLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *virSecurityDACGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
|
static char *
|
||||||
virDomainDefPtr vm ATTRIBUTE_UNUSED) {
|
virSecurityDACGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
|
||||||
|
virDomainDefPtr vm ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user