Skip to content

Commit

Permalink
Use blocked paths in symlink probe
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-cerny committed Dec 18, 2023
1 parent 65a40c5 commit 1604943
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/OVAL/probes/unix/symlink_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ static int collect_symlink(SEXP_t *ent, probe_ctx *ctx)
if (pathname == NULL) {
return PROBE_EINVAL;
}
if (probe_path_is_blocked(pathname, ctx->blocked_paths)) {
free(pathname);
return 0;
}

if (lstat(pathname, &sb) == -1) {
if (errno == ENOENT) {
Expand Down

0 comments on commit 1604943

Please sign in to comment.