From: William Roberts <william.c.roberts@xxxxxxxxx> Now that matchpathcon is marked deprecated, create an matchpathcon2 interface for internal users. Signed-off-by: William Roberts <william.c.roberts@xxxxxxxxx> --- libselinux/src/matchpathcon.c | 8 ++++++-- libselinux/src/matchpathcon_internal.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c index 8515c88c2bb8..88539e627f5d 100644 --- a/libselinux/src/matchpathcon.c +++ b/libselinux/src/matchpathcon.c @@ -433,7 +433,11 @@ out: return rc; } -int matchpathcon(const char *path, mode_t mode, char ** con) +int matchpathcon(const char *path, mode_t mode, char ** con) { + return matchpathcon2(path, mode, con); +} + +int matchpathcon2(const char *path, mode_t mode, char ** con) { char stackpath[PATH_MAX + 1]; char *p = NULL; @@ -456,7 +460,7 @@ int matchpathcon(const char *path, mode_t mode, char ** con) int matchpathcon_index(const char *name, mode_t mode, char ** con) { - int i = matchpathcon(name, mode, con); + int i = matchpathcon2(name, mode, con); if (i < 0) return -1; diff --git a/libselinux/src/matchpathcon_internal.h b/libselinux/src/matchpathcon_internal.h index 3affa687327f..c63bcecfec89 100644 --- a/libselinux/src/matchpathcon_internal.h +++ b/libselinux/src/matchpathcon_internal.h @@ -3,4 +3,6 @@ void matchpathcon_fini2(void); +int matchpathcon2(const char *path, mode_t mode, char ** con); + #endif -- 2.17.1