Skip to content

Commit 1604943

Browse files
committed
Use blocked paths in symlink probe
1 parent 65a40c5 commit 1604943

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/OVAL/probes/unix/symlink_probe.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ static int collect_symlink(SEXP_t *ent, probe_ctx *ctx)
5858
if (pathname == NULL) {
5959
return PROBE_EINVAL;
6060
}
61+
if (probe_path_is_blocked(pathname, ctx->blocked_paths)) {
62+
free(pathname);
63+
return 0;
64+
}
6165

6266
if (lstat(pathname, &sb) == -1) {
6367
if (errno == ENOENT) {

0 commit comments

Comments
 (0)