config: print default value for logging.audit

This commit is contained in:
Thomas Haller
2016-10-06 22:14:01 +02:00
parent 64e02a0ac7
commit 8bca7704c9
4 changed files with 13 additions and 10 deletions

View File

@@ -524,16 +524,16 @@ else
fi fi
if test "$have_libaudit" = "yes"; then if test "$have_libaudit" = "yes"; then
AC_DEFINE(HAVE_LIBAUDIT, 1, [Define if you have libaudit support]) AC_DEFINE(HAVE_LIBAUDIT, 1, [Define if you have libaudit support])
if test "$with_libaudit" = "yes-disabled-by-default"; then if test "$with_libaudit" = "yes-disabled-by-default"; then
AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, FALSE, [The default value of the logging.audit configuration option]) AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, "false", [The default value of the logging.audit configuration option])
NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='false' NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='false'
else else
AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, TRUE, [The default value of the logging.audit configuration option]) AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, "true", [The default value of the logging.audit configuration option])
NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='true' NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='true'
fi fi
else else
AC_DEFINE(HAVE_LIBAUDIT, 0, [Define if you have libaudit support]) AC_DEFINE(HAVE_LIBAUDIT, 0, [Define if you have libaudit support])
AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, FALSE, [The default value of the logging.audit configuration option]) AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, "false", [The default value of the logging.audit configuration option])
NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='false' NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='false'
fi fi
AC_SUBST(NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT) AC_SUBST(NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT)

View File

@@ -336,7 +336,7 @@ init_auditd (NMAuditManager *self)
if (nm_config_data_get_value_boolean (data, NM_CONFIG_KEYFILE_GROUP_LOGGING, if (nm_config_data_get_value_boolean (data, NM_CONFIG_KEYFILE_GROUP_LOGGING,
NM_CONFIG_KEYFILE_KEY_AUDIT, NM_CONFIG_KEYFILE_KEY_AUDIT,
NM_CONFIG_DEFAULT_LOGGING_AUDIT)) { NM_CONFIG_DEFAULT_LOGGING_AUDIT_BOOL)) {
if (priv->auditd_fd < 0) { if (priv->auditd_fd < 0) {
priv->auditd_fd = audit_open (); priv->auditd_fd = audit_open ();
if (priv->auditd_fd < 0) if (priv->auditd_fd < 0)

View File

@@ -544,6 +544,7 @@ static struct {
{ NM_CONFIG_KEYFILE_GROUP_MAIN, "rc-manager", NM_CONFIG_DEFAULT_DNS_RC_MANAGER }, { NM_CONFIG_KEYFILE_GROUP_MAIN, "rc-manager", NM_CONFIG_DEFAULT_DNS_RC_MANAGER },
{ NM_CONFIG_KEYFILE_GROUP_MAIN, "auth-polkit", NM_CONFIG_DEFAULT_AUTH_POLKIT }, { NM_CONFIG_KEYFILE_GROUP_MAIN, "auth-polkit", NM_CONFIG_DEFAULT_AUTH_POLKIT },
{ NM_CONFIG_KEYFILE_GROUP_LOGGING, "backend", NM_CONFIG_LOGGING_BACKEND_DEFAULT }, { NM_CONFIG_KEYFILE_GROUP_LOGGING, "backend", NM_CONFIG_LOGGING_BACKEND_DEFAULT },
{ NM_CONFIG_KEYFILE_GROUP_LOGGING, "audit", NM_CONFIG_DEFAULT_LOGGING_AUDIT },
}; };
void void

View File

@@ -182,7 +182,9 @@ extern char *_nm_config_match_env;
/*****************************************************************************/ /*****************************************************************************/
#define NM_CONFIG_DEVICE_STATE_DIR ""NMRUNDIR"/devices" #define NM_CONFIG_DEVICE_STATE_DIR ""NMRUNDIR"/devices"
#define NM_CONFIG_DEFAULT_AUTH_POLKIT_BOOL (nm_streq0 (NM_CONFIG_DEFAULT_AUTH_POLKIT, "true"))
#define NM_CONFIG_DEFAULT_AUTH_POLKIT_BOOL (nm_streq (""NM_CONFIG_DEFAULT_AUTH_POLKIT, "true"))
#define NM_CONFIG_DEFAULT_LOGGING_AUDIT_BOOL (nm_streq (""NM_CONFIG_DEFAULT_LOGGING_AUDIT, "true"))
typedef enum { typedef enum {
NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_UNKNOWN = -1, NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_UNKNOWN = -1,