Skip to content

Commit

Permalink
add test for security_path_rmdir
Browse files Browse the repository at this point in the history
Signed-off-by: Achref ben saad <achref@accuknox.com>
  • Loading branch information
achrefbensaad committed Oct 14, 2022
1 parent 742834c commit 290188e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions KubeArmor/BPF/tests/checks/security_path_rmdir.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright 2022 Authors of KubeArmor */

#ifndef KBUILD_MODNAME
#define KBUILD_MODNAME "kubearmor_syscall_check"
#endif

#ifdef BTF_SUPPORTED
#include "vmlinux.h"
#else
#include <linux/bpf.h>
#endif

#include <bpf_helpers.h>

// CFlag=-DSECURITY_PATH
SEC("kprobe/security_path_rmdir")
int kprobe__security_path_rmdir(struct pt_regs *ctx){
return 0;
}

0 comments on commit 290188e

Please sign in to comment.