diff --git a/find/pred.c b/find/pred.c index 77c2aac..ffc239b 100644 --- a/find/pred.c +++ b/find/pred.c @@ -1061,7 +1061,7 @@ do_fprintf(struct format_val *dest, case 'Z': /* SELinux security context */ { security_context_t scontext; - int rv = (*options.x_getfilecon) (state.rel_pathname, &scontext); + int rv = (*options.x_getfilecon) (pathname, &scontext); if (rv < 0) { /* If getfilecon fails, there will in the general case @@ -1899,7 +1899,7 @@ pred_context (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) { security_context_t scontext; - int rv = (*options.x_getfilecon) (state.rel_pathname, &scontext); + int rv = (*options.x_getfilecon) (pathname, &scontext); if (rv < 0) { error (0, errno, "getfilecon: %s", safely_quote_err_filename (0, pathname));