Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
/*
|
2014-03-07 13:38:51 +00:00
|
|
|
* domain_audit.h: Domain audit management
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2006-2011 Red Hat, Inc.
|
|
|
|
* Copyright (C) 2006 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
*
|
|
|
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_DOMAIN_AUDIT_H__
|
|
|
|
# define __VIR_DOMAIN_AUDIT_H__
|
|
|
|
|
|
|
|
# include "domain_conf.h"
|
2012-12-03 15:03:47 +00:00
|
|
|
# include "vircgroup.h"
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
|
|
|
|
void virDomainAuditStart(virDomainObjPtr vm,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
2012-11-20 17:49:25 +00:00
|
|
|
void virDomainAuditInit(virDomainObjPtr vm,
|
2013-03-06 14:56:49 +00:00
|
|
|
pid_t pid,
|
|
|
|
ino_t pidns)
|
2012-11-20 17:49:25 +00:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
void virDomainAuditStop(virDomainObjPtr vm,
|
|
|
|
const char *reason)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
|
|
|
void virDomainAuditDisk(virDomainObjPtr vm,
|
2014-07-03 08:28:12 +00:00
|
|
|
virStorageSourcePtr oldDef,
|
|
|
|
virStorageSourcePtr newDef,
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
2011-07-04 11:00:33 +00:00
|
|
|
void virDomainAuditFS(virDomainObjPtr vm,
|
|
|
|
virDomainFSDefPtr oldDef,
|
|
|
|
virDomainFSDefPtr newDef,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
void virDomainAuditNet(virDomainObjPtr vm,
|
|
|
|
virDomainNetDefPtr oldDef,
|
|
|
|
virDomainNetDefPtr newDef,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
|
|
|
void virDomainAuditNetDevice(virDomainDefPtr vmDef,
|
|
|
|
virDomainNetDefPtr netDef,
|
|
|
|
const char *device,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
|
|
|
void virDomainAuditHostdev(virDomainObjPtr vm,
|
|
|
|
virDomainHostdevDefPtr def,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
|
|
|
void virDomainAuditCgroup(virDomainObjPtr vm,
|
|
|
|
virCgroupPtr group,
|
|
|
|
const char *reason,
|
|
|
|
const char *extra,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
|
|
|
ATTRIBUTE_NONNULL(4);
|
|
|
|
void virDomainAuditCgroupMajor(virDomainObjPtr vm,
|
|
|
|
virCgroupPtr group,
|
|
|
|
const char *reason,
|
|
|
|
int maj,
|
|
|
|
const char *name,
|
|
|
|
const char *perms,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
|
|
|
ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6);
|
|
|
|
void virDomainAuditCgroupPath(virDomainObjPtr vm,
|
|
|
|
virCgroupPtr group,
|
|
|
|
const char *reason,
|
|
|
|
const char *path,
|
|
|
|
const char *perms,
|
|
|
|
int rc)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
|
|
|
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5);
|
|
|
|
void virDomainAuditMemory(virDomainObjPtr vm,
|
|
|
|
unsigned long long oldmem,
|
|
|
|
unsigned long long newmem,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
|
|
|
void virDomainAuditVcpu(virDomainObjPtr vm,
|
|
|
|
unsigned int oldvcpu,
|
|
|
|
unsigned int newvcpu,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
2015-03-18 10:51:12 +00:00
|
|
|
void virDomainAuditIOThread(virDomainObjPtr vm,
|
|
|
|
unsigned int oldiothread,
|
|
|
|
unsigned int newiothread,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
void virDomainAuditSecurityLabel(virDomainObjPtr vm,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1);
|
2011-09-02 15:09:14 +00:00
|
|
|
void virDomainAuditRedirdev(virDomainObjPtr vm,
|
|
|
|
virDomainRedirdevDefPtr def,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
|
2014-07-03 08:59:58 +00:00
|
|
|
void virDomainAuditChardev(virDomainObjPtr vm,
|
|
|
|
virDomainChrDefPtr oldDef,
|
|
|
|
virDomainChrDefPtr newDef,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
2015-01-17 05:09:36 +00:00
|
|
|
void virDomainAuditRNG(virDomainObjPtr vm,
|
|
|
|
virDomainRNGDefPtr oldDef,
|
|
|
|
virDomainRNGDefPtr newDef,
|
|
|
|
const char *reason,
|
|
|
|
bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
2016-08-11 09:40:18 +00:00
|
|
|
void virDomainAuditShmem(virDomainObjPtr vm,
|
|
|
|
virDomainShmemDefPtr def,
|
|
|
|
const char *reason, bool success)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
2015-01-17 05:09:36 +00:00
|
|
|
|
2014-07-03 08:59:58 +00:00
|
|
|
|
Move qemu_audit.h helpers into shared code
The LXC and UML drivers can both make use of auditing. Move
the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
* src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
* src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
* src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
* src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c: Update for changed audit API names
2011-07-04 10:56:13 +00:00
|
|
|
#endif /* __VIR_DOMAIN_AUDIT_H__ */
|