From 56e3106e934796f993decd08b3c4224d3830209a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 10 Nov 2007 17:31:31 +0100 Subject: install+SELinux: reduce a 12x performance hit to ~1.5x * src/install.c (setdefaultfilecon): Call matchpathcon_init_prefix, to mitigate what would otherwise be a large performance hit due to the use of matchpathcon. Dan Walsh suggested the use of matchpathcon_init_prefix. * gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define. Signed-off-by: Jim Meyering --- gl/lib/se-selinux.in.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gl/lib/se-selinux.in.h') diff --git a/gl/lib/se-selinux.in.h b/gl/lib/se-selinux.in.h index 7bfe4c5ff..7be1e702a 100644 --- a/gl/lib/se-selinux.in.h +++ b/gl/lib/se-selinux.in.h @@ -51,4 +51,7 @@ static inline int security_compute_create (security_context_t scon, security_class_t tclass, security_context_t *newcon) { errno = ENOTSUP; return -1; } +static inline int matchpathcon_init_prefix (char const *path, + char const *prefix) + { errno = ENOTSUP; return -1; } #endif -- cgit v1.2.3-70-g09d2