diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-01-20 18:47:39 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-09-17 23:54:58 -0400 |
commit | 55e6516104e223ca777a30b6a757894ff36a0ef3 (patch) | |
tree | 8e4b4df74db7b6efd59997ee258db24181093586 | |
parent | f8ff3f4b1109ed2993e2d47d04f77bf18ad594d5 (diff) |
Use the new libselinux selinux_colors_path() function.
This replaces the temporary scheme introduced in commit
31dc3b2ee71319283be4dac4b62a2ec027bcf5c1.
-rw-r--r-- | src/mcscolor.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/mcscolor.c b/src/mcscolor.c index f4be97c..ebe5be0 100644 --- a/src/mcscolor.c +++ b/src/mcscolor.c @@ -246,24 +246,6 @@ static int process_color(char *buffer, int line) { return 0; } -static char *get_color_path(void) -{ - static char path[256]; - char *poltype; - int rc; - - *path = '\0'; - - rc = selinux_getpolicytype(&poltype); - if (rc == 0) { - strncat(path, "/etc/selinux/", 16); - strncat(path, poltype, 128); - strncat(path, "/secolor.conf", 16); - } - syslog(LOG_ERR, "%s", path); - return path; -} - /* Read in color file. */ int init_colors(void) { @@ -274,7 +256,7 @@ int init_colors(void) { getcon(&my_context); - cfg = fopen(get_color_path(), "r"); + cfg = fopen(selinux_colors_path(), "r"); if (!cfg) return 1; __fsetlocking(cfg, FSETLOCKING_BYCALLER); |