src/security: use #pragma once in headers

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jonathon Jongsma 2019-06-18 11:12:41 -05:00 committed by Ján Tomko
parent d9b16e4436
commit 55474a8ce7
8 changed files with 22 additions and 46 deletions

View File

@ -16,15 +16,12 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_SECURITY_APPARMOR_H
# define LIBVIRT_SECURITY_APPARMOR_H
#pragma once
# include "security_driver.h"
#include "security_driver.h"
extern virSecurityDriver virAppArmorSecurityDriver;
# define AA_PREFIX "libvirt-"
# define PROFILE_NAME_SIZE 8 + VIR_UUID_STRING_BUFLEN /* AA_PREFIX + uuid */
# define MAX_FILE_LEN (1024*1024*10) /* 10MB limit for sanity check */
#endif /* LIBVIRT_SECURITY_APPARMOR_H */
#define AA_PREFIX "libvirt-"
#define PROFILE_NAME_SIZE 8 + VIR_UUID_STRING_BUFLEN /* AA_PREFIX + uuid */
#define MAX_FILE_LEN (1024*1024*10) /* 10MB limit for sanity check */

View File

@ -18,10 +18,9 @@
* POSIX DAC security driver
*/
#ifndef LIBVIRT_SECURITY_DAC_H
# define LIBVIRT_SECURITY_DAC_H
#pragma once
# include "security_driver.h"
#include "security_driver.h"
extern virSecurityDriver virSecurityDriverDAC;
@ -37,5 +36,3 @@ void virSecurityDACSetMountNamespace(virSecurityManagerPtr mgr,
void virSecurityDACSetChownCallback(virSecurityManagerPtr mgr,
virSecurityManagerDACChownCallback chownCallback);
#endif /* LIBVIRT_SECURITY_DAC_H */

View File

@ -16,13 +16,12 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_SECURITY_DRIVER_H
# define LIBVIRT_SECURITY_DRIVER_H
#pragma once
# include "internal.h"
# include "domain_conf.h"
#include "internal.h"
#include "domain_conf.h"
# include "security_manager.h"
#include "security_manager.h"
/*
* Return values for security driver probing: the driver will determine
@ -216,5 +215,3 @@ struct _virSecurityDriver {
virSecurityDriverPtr virSecurityDriverLookup(const char *name,
const char *virtDriver);
#endif /* LIBVIRT_SECURITY_DRIVER_H */

View File

@ -18,12 +18,11 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_SECURITY_MANAGER_H
# define LIBVIRT_SECURITY_MANAGER_H
#pragma once
# include "domain_conf.h"
# include "vircommand.h"
# include "virstoragefile.h"
#include "domain_conf.h"
#include "vircommand.h"
#include "virstoragefile.h"
typedef struct _virSecurityManager virSecurityManager;
typedef virSecurityManager *virSecurityManagerPtr;
@ -36,7 +35,7 @@ typedef enum {
VIR_SECURITY_MANAGER_MOUNT_NAMESPACE = 1 << 5,
} virSecurityManagerNewFlags;
# define VIR_SECURITY_MANAGER_NEW_MASK \
#define VIR_SECURITY_MANAGER_NEW_MASK \
(VIR_SECURITY_MANAGER_DEFAULT_CONFINED | \
VIR_SECURITY_MANAGER_REQUIRE_CONFINED | \
VIR_SECURITY_MANAGER_PRIVILEGED)
@ -207,5 +206,3 @@ virSecurityManagerMetadataLock(virSecurityManagerPtr mgr,
void
virSecurityManagerMetadataUnlock(virSecurityManagerPtr mgr,
virSecurityManagerMetadataLockStatePtr *state);
#endif /* LIBVIRT_SECURITY_MANAGER_H */

View File

@ -17,11 +17,8 @@
*
*/
#ifndef LIBVIRT_SECURITY_NOP_H
# define LIBVIRT_SECURITY_NOP_H
#pragma once
# include "security_driver.h"
#include "security_driver.h"
extern virSecurityDriver virSecurityDriverNop;
#endif /* LIBVIRT_SECURITY_NOP_H */

View File

@ -16,9 +16,6 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_SECURITY_SELINUX_H
# define LIBVIRT_SECURITY_SELINUX_H
#pragma once
extern virSecurityDriver virSecurityDriverSELinux;
#endif /* LIBVIRT_SECURITY_SELINUX_H */

View File

@ -18,10 +18,9 @@
* Stacked security driver
*/
#ifndef LIBVIRT_SECURITY_STACK_H
# define LIBVIRT_SECURITY_STACK_H
#pragma once
# include "security_driver.h"
#include "security_driver.h"
extern virSecurityDriver virSecurityDriverStack;
@ -34,5 +33,3 @@ virSecurityStackGetPrimary(virSecurityManagerPtr mgr);
virSecurityManagerPtr*
virSecurityStackGetNested(virSecurityManagerPtr mgr);
#endif /* LIBVIRT_SECURITY_STACK_H */

View File

@ -16,8 +16,7 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_SECURITY_UTIL_H
# define LIBVIRT_SECURITY_UTIL_H
#pragma once
int
virSecurityGetRememberedLabel(const char *name,
@ -28,5 +27,3 @@ int
virSecuritySetRememberedLabel(const char *name,
const char *path,
const char *label);
#endif /* LIBVIRT_SECURITY_UTIL_H */