diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/settings/plugins/keyfile/common.h | 3 | ||||
-rw-r--r-- | src/settings/plugins/keyfile/utils.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/settings/plugins/keyfile/common.h b/src/settings/plugins/keyfile/common.h index 6c8f9cebb8..7d94a7053e 100644 --- a/src/settings/plugins/keyfile/common.h +++ b/src/settings/plugins/keyfile/common.h @@ -23,9 +23,6 @@ #include <glib.h> -#define SWP_TAG ".swp" -#define SWPX_TAG ".swpx" - #define KEYFILE_PLUGIN_NAME "keyfile" #define KEYFILE_PLUGIN_INFO "(c) 2007 - 2010 Red Hat, Inc. To report bugs please use the NetworkManager mailing list." diff --git a/src/settings/plugins/keyfile/utils.c b/src/settings/plugins/keyfile/utils.c index 7b93a245d5..f353117221 100644 --- a/src/settings/plugins/keyfile/utils.c +++ b/src/settings/plugins/keyfile/utils.c @@ -74,6 +74,11 @@ check_suffix (const char *base, const char *tag) return FALSE; } +#define SWP_TAG ".swp" +#define SWPX_TAG ".swpx" +#define PEM_TAG ".pem" +#define DER_TAG ".der" + gboolean nm_keyfile_plugin_utils_should_ignore_file (const char *filename) { @@ -88,6 +93,8 @@ nm_keyfile_plugin_utils_should_ignore_file (const char *filename) /* Ignore files with certain patterns */ if ( (check_prefix (base, ".") && check_suffix (base, SWP_TAG)) /* vim temporary files: .filename.swp */ || (check_prefix (base, ".") && check_suffix (base, SWPX_TAG)) /* vim temporary files: .filename.swpx */ + || check_suffix (base, PEM_TAG) /* 802.1x certificates and keys */ + || check_suffix (base, DER_TAG) /* 802.1x certificates and keys */ || check_mkstemp_suffix (base) /* temporary files created by mkstemp() */ || base[strlen (base) - 1] == '~') ignore = TRUE; |