#include <ApparmorReporting.hpp>
Public Member Functions | |
| ApparmorReportingConfig (BLOCXX_NAMESPACE::String &xmlPath="/etc/apparmor/reports.conf", BLOCXX_NAMESPACE::String &crontabPath="/etc/apparmor/reports.crontab") | |
| ~ApparmorReportingConfig () | |
| ReportConfig | readConfig () |
| bool | writeConfig (ReportConfig &config) |
| void | removeReport (BLOCXX_NAMESPACE::String &name) |
| void | writeReport (BLOCXX_NAMESPACE::String ¤tName, BLOCXX_NAMESPACE::String &newName, ReportData &reportData) |
| bool | reportExists (BLOCXX_NAMESPACE::String &name) |
| ReportData | findReport (BLOCXX_NAMESPACE::String &name) |
| BLOCXX_NAMESPACE::String | getXMLPath () |
| void | setXMLPath (BLOCXX_NAMESPACE::String &xmlPath) |
| BLOCXX_NAMESPACE::String | getCrontabPath () |
| void | setCrontabPath (BLOCXX_NAMESPACE::String &crontabPath) |
Private Member Functions | |
| void | loadXML () |
| BLOCXX_NAMESPACE::String | find_text (xmlNodePtr currentElement, char *tag) |
| BLOCXX_NAMESPACE::String | find_attribute (xmlNodePtr currentElement, char *tag, char *attribute) |
| bool | find_crontab_data (ReportData &data) |
Private Attributes | |
| BLOCXX_NAMESPACE::COWIntrusiveReference < Data > | m_data |
| limal::apparmor_reporting::ApparmorReportingConfig::ApparmorReportingConfig | ( | BLOCXX_NAMESPACE::String & | xmlPath = "/etc/apparmor/reports.conf", |
|
| BLOCXX_NAMESPACE::String & | crontabPath = "/etc/apparmor/reports.crontab" | |||
| ) |
Construct a ApparmorReporting object.
| limal::apparmor_reporting::ApparmorReportingConfig::~ApparmorReportingConfig | ( | ) |
Destructor of ApparmorReporting.
| ReportConfig limal::apparmor_reporting::ApparmorReportingConfig::readConfig | ( | ) |
Parses the XML and returns a map of structs containing the data.
| bool limal::apparmor_reporting::ApparmorReportingConfig::writeConfig | ( | ReportConfig & | config | ) |
Writes the config map to reports.conf and reports.crontab.
| void limal::apparmor_reporting::ApparmorReportingConfig::removeReport | ( | BLOCXX_NAMESPACE::String & | name | ) |
Removes an entry from disk. Note that none of the three "special" reports are allowed to be removed from the configuration file.
| [in] | The | name of the report to remove. |
| void limal::apparmor_reporting::ApparmorReportingConfig::writeReport | ( | BLOCXX_NAMESPACE::String & | currentName, | |
| BLOCXX_NAMESPACE::String & | newName, | |||
| ReportData & | reportData | |||
| ) |
Modifies an existing report or inserts a new one.
| [in] | The | current name of the report. |
| [in] | The | new name of the report. |
| [in] | The | ReportData to write. |
| bool limal::apparmor_reporting::ApparmorReportingConfig::reportExists | ( | BLOCXX_NAMESPACE::String & | name | ) |
Returns true if there is a report by that name.
| [in] | The | name of the report. |
| ReportData limal::apparmor_reporting::ApparmorReportingConfig::findReport | ( | BLOCXX_NAMESPACE::String & | name | ) |
Returns the data from an individual report.
| [in] | The | name of the report to look up. |
| BLOCXX_NAMESPACE ::String limal::apparmor_reporting::ApparmorReportingConfig::getXMLPath | ( | ) |
| void limal::apparmor_reporting::ApparmorReportingConfig::setXMLPath | ( | BLOCXX_NAMESPACE::String & | xmlPath | ) |
| BLOCXX_NAMESPACE ::String limal::apparmor_reporting::ApparmorReportingConfig::getCrontabPath | ( | ) |
| void limal::apparmor_reporting::ApparmorReportingConfig::setCrontabPath | ( | BLOCXX_NAMESPACE::String & | crontabPath | ) |
| void limal::apparmor_reporting::ApparmorReportingConfig::loadXML | ( | ) | [private] |
| BLOCXX_NAMESPACE ::String limal::apparmor_reporting::ApparmorReportingConfig::find_text | ( | xmlNodePtr | currentElement, | |
| char * | tag | |||
| ) | [private] |
| BLOCXX_NAMESPACE ::String limal::apparmor_reporting::ApparmorReportingConfig::find_attribute | ( | xmlNodePtr | currentElement, | |
| char * | tag, | |||
| char * | attribute | |||
| ) | [private] |
| bool limal::apparmor_reporting::ApparmorReportingConfig::find_crontab_data | ( | ReportData & | data | ) | [private] |
BLOCXX_NAMESPACE ::COWIntrusiveReference<Data> limal::apparmor_reporting::ApparmorReportingConfig::m_data [private] |
1.5.3