Skip to content

Commit 28d20f1

Browse files
committed
Add argument matching to block syscalls
1 parent fa11c14 commit 28d20f1

11 files changed

Lines changed: 5606 additions & 225 deletions

File tree

Makefile

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ am__make_running_with_option = \
7070
test $$has_opt = yes
7171
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
7272
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
73-
pkgdatadir = $(datadir)/syscall_intercept
74-
pkgincludedir = $(includedir)/syscall_intercept
75-
pkglibdir = $(libdir)/syscall_intercept
76-
pkglibexecdir = $(libexecdir)/syscall_intercept
73+
pkgdatadir = $(datadir)/syscall_interceptor
74+
pkgincludedir = $(includedir)/syscall_interceptor
75+
pkglibdir = $(libdir)/syscall_interceptor
76+
pkglibexecdir = $(libexecdir)/syscall_interceptor
7777
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
7878
install_sh_DATA = $(install_sh) -c -m 644
7979
install_sh_PROGRAM = $(install_sh) -c
@@ -86,8 +86,8 @@ POST_INSTALL = :
8686
NORMAL_UNINSTALL = :
8787
PRE_UNINSTALL = :
8888
POST_UNINSTALL = :
89-
build_triplet = amd64-unknown-freebsd14.0
90-
host_triplet = amd64-unknown-freebsd14.0
89+
build_triplet = x86_64-pc-linux-gnu
90+
host_triplet = x86_64-pc-linux-gnu
9191
subdir = .
9292
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
9393
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
@@ -188,8 +188,8 @@ am__define_uniq_tagged_files = \
188188
done | $(am__uniquify_input)`
189189
DIST_SUBDIRS = $(SUBDIRS)
190190
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in README \
191-
ar-lib compile config.guess config.sub install-sh ltmain.sh \
192-
missing
191+
ar-lib compile config.guess config.sub depcomp install-sh \
192+
ltmain.sh missing
193193
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
194194
distdir = $(PACKAGE)-$(VERSION)
195195
top_distdir = $(distdir)
@@ -234,20 +234,25 @@ distuninstallcheck_listfiles = find . -type f -print
234234
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
235235
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
236236
distcleancheck_listfiles = find . -type f -print
237-
ACLOCAL = ${SHELL} '/home/xen/Projects/syscall-intercept/missing' aclocal-1.16
237+
ACLOCAL = ${SHELL} '/home/xen/Projects/syscall-interceptor/missing' aclocal-1.16
238238
AMTAR = $${TAR-tar}
239239
AM_DEFAULT_VERBOSITY = 1
240240
AR = ar
241-
AUTOCONF = ${SHELL} '/home/xen/Projects/syscall-intercept/missing' autoconf
242-
AUTOHEADER = ${SHELL} '/home/xen/Projects/syscall-intercept/missing' autoheader
243-
AUTOMAKE = ${SHELL} '/home/xen/Projects/syscall-intercept/missing' automake-1.16
241+
AUTOCONF = ${SHELL} '/home/xen/Projects/syscall-interceptor/missing' autoconf
242+
AUTOHEADER = ${SHELL} '/home/xen/Projects/syscall-interceptor/missing' autoheader
243+
AUTOMAKE = ${SHELL} '/home/xen/Projects/syscall-interceptor/missing' automake-1.16
244244
AWK = gawk
245245
CC = gcc
246246
CCDEPMODE = depmode=gcc3
247247
CFLAGS = -g -O2
248+
CPP = gcc -E
248249
CPPFLAGS =
249250
CSCOPE = cscope
250251
CTAGS = ctags
252+
CXX = g++
253+
CXXCPP = g++ -E
254+
CXXDEPMODE = depmode=gcc3
255+
CXXFLAGS = -g -O2
251256
CYGPATH_W = echo
252257
DEFS = -DHAVE_CONFIG_H
253258
DEPDIR = .deps
@@ -268,7 +273,7 @@ INSTALL_DATA = ${INSTALL} -m 644
268273
INSTALL_PROGRAM = ${INSTALL}
269274
INSTALL_SCRIPT = ${INSTALL}
270275
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
271-
LD = /usr/local/bin/ld
276+
LD = /usr/bin/ld -m elf_x86_64
272277
LDFLAGS =
273278
LIBOBJS =
274279
LIBS =
@@ -277,20 +282,20 @@ LIPO =
277282
LN_S = ln -s
278283
LTLIBOBJS =
279284
LT_SYS_LIBRARY_PATH =
280-
MAKEINFO = ${SHELL} '/home/xen/Projects/syscall-intercept/missing' makeinfo
285+
MAKEINFO = ${SHELL} '/home/xen/Projects/syscall-interceptor/missing' makeinfo
281286
MANIFEST_TOOL = :
282-
MKDIR_P = ./install-sh -c -d
283-
NM = /usr/local/bin/nm -B
287+
MKDIR_P = /usr/bin/mkdir -p
288+
NM = /usr/bin/nm -B
284289
NMEDIT =
285290
OBJDUMP = objdump
286291
OBJEXT = o
287292
OTOOL =
288293
OTOOL64 =
289-
PACKAGE = syscall_intercept
294+
PACKAGE = syscall_interceptor
290295
PACKAGE_BUGREPORT = axtlos@disroot.org
291-
PACKAGE_NAME = syscall_intercept
292-
PACKAGE_STRING = syscall_intercept 1.0
293-
PACKAGE_TARNAME = syscall_intercept
296+
PACKAGE_NAME = syscall_interceptor
297+
PACKAGE_STRING = syscall_interceptor 1.0
298+
PACKAGE_TARNAME = syscall_interceptor
294299
PACKAGE_URL =
295300
PACKAGE_VERSION = 1.0
296301
PATH_SEPARATOR = :
@@ -300,39 +305,40 @@ SET_MAKE =
300305
SHELL = /bin/sh
301306
STRIP = strip
302307
VERSION = 1.0
303-
abs_builddir = /home/xen/Projects/syscall-intercept
304-
abs_srcdir = /home/xen/Projects/syscall-intercept
305-
abs_top_builddir = /home/xen/Projects/syscall-intercept
306-
abs_top_srcdir = /home/xen/Projects/syscall-intercept
308+
abs_builddir = /home/xen/Projects/syscall-interceptor
309+
abs_srcdir = /home/xen/Projects/syscall-interceptor
310+
abs_top_builddir = /home/xen/Projects/syscall-interceptor
311+
abs_top_srcdir = /home/xen/Projects/syscall-interceptor
307312
ac_ct_AR = ar
308313
ac_ct_CC = gcc
314+
ac_ct_CXX = g++
309315
ac_ct_DUMPBIN =
310316
am__include = include
311317
am__leading_dot = .
312318
am__quote =
313319
am__tar = $${TAR-tar} chof - "$$tardir"
314320
am__untar = $${TAR-tar} xf -
315321
bindir = ${exec_prefix}/bin
316-
build = amd64-unknown-freebsd14.0
322+
build = x86_64-pc-linux-gnu
317323
build_alias =
318-
build_cpu = amd64
319-
build_os = freebsd14.0
320-
build_vendor = unknown
324+
build_cpu = x86_64
325+
build_os = linux-gnu
326+
build_vendor = pc
321327
builddir = .
322328
datadir = ${datarootdir}
323329
datarootdir = ${prefix}/share
324330
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
325331
dvidir = ${docdir}
326332
exec_prefix = ${prefix}
327-
host = amd64-unknown-freebsd14.0
333+
host = x86_64-pc-linux-gnu
328334
host_alias =
329-
host_cpu = amd64
330-
host_os = freebsd14.0
331-
host_vendor = unknown
335+
host_cpu = x86_64
336+
host_os = linux-gnu
337+
host_vendor = pc
332338
htmldir = ${docdir}
333339
includedir = ${prefix}/include
334340
infodir = ${datarootdir}/info
335-
install_sh = ${SHELL} /home/xen/Projects/syscall-intercept/install-sh
341+
install_sh = ${SHELL} /home/xen/Projects/syscall-interceptor/install-sh
336342
libdir = ${exec_prefix}/lib
337343
libexecdir = ${exec_prefix}/libexec
338344
localedir = ${datarootdir}/locale

Makefile.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ am__define_uniq_tagged_files = \
188188
done | $(am__uniquify_input)`
189189
DIST_SUBDIRS = $(SUBDIRS)
190190
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in README \
191-
ar-lib compile config.guess config.sub install-sh ltmain.sh \
192-
missing
191+
ar-lib compile config.guess config.sub depcomp install-sh \
192+
ltmain.sh missing
193193
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
194194
distdir = $(PACKAGE)-$(VERSION)
195195
top_distdir = $(distdir)
@@ -245,9 +245,14 @@ AWK = @AWK@
245245
CC = @CC@
246246
CCDEPMODE = @CCDEPMODE@
247247
CFLAGS = @CFLAGS@
248+
CPP = @CPP@
248249
CPPFLAGS = @CPPFLAGS@
249250
CSCOPE = @CSCOPE@
250251
CTAGS = @CTAGS@
252+
CXX = @CXX@
253+
CXXCPP = @CXXCPP@
254+
CXXDEPMODE = @CXXDEPMODE@
255+
CXXFLAGS = @CXXFLAGS@
251256
CYGPATH_W = @CYGPATH_W@
252257
DEFS = @DEFS@
253258
DEPDIR = @DEPDIR@
@@ -306,6 +311,7 @@ abs_top_builddir = @abs_top_builddir@
306311
abs_top_srcdir = @abs_top_srcdir@
307312
ac_ct_AR = @ac_ct_AR@
308313
ac_ct_CC = @ac_ct_CC@
314+
ac_ct_CXX = @ac_ct_CXX@
309315
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
310316
am__include = @am__include@
311317
am__leading_dot = @am__leading_dot@

config.h.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
/* Define to 1 if you have the `' library (-l). */
1010
#undef HAVE_LIB
1111

12+
/* Define to 1 if you have the <libsyscall_intercept_hook_point.h> header
13+
file. */
14+
#undef HAVE_LIBSYSCALL_INTERCEPT_HOOK_POINT_H
15+
16+
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
17+
to 0 otherwise. */
18+
#undef HAVE_MALLOC
19+
1220
/* Define to 1 if you have the <stdint.h> header file. */
1321
#undef HAVE_STDINT_H
1422

@@ -33,6 +41,9 @@
3341
/* Define to 1 if you have the <unistd.h> header file. */
3442
#undef HAVE_UNISTD_H
3543

44+
/* Define to 1 if the system has the type `_Bool'. */
45+
#undef HAVE__BOOL
46+
3647
/* Define to the sub-directory where libtool stores uninstalled libraries. */
3748
#undef LT_OBJDIR
3849

@@ -64,3 +75,6 @@
6475

6576
/* Version number of package */
6677
#undef VERSION
78+
79+
/* Define to rpl_malloc if the replacement function should be used. */
80+
#undef malloc

config.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ syscalls:
44
log: true
55
block: true
66
arg0: "/usr"
7-
arg1: "rw"
8-
- mount:
7+
arg0_char: true
8+
arg1: 1
9+
arg1_char: false
10+
- umount2:
911
log: false
1012
block: true
11-
arg0: "/etc/important"
13+
arg0: "/home/xen/Projects/syscall-interceptor/test"
14+
arg0_char: true
15+
arg1: 2
16+
arg1_char: false
1217
- fsmount:
1318
log: true
1419
block: false
1520
arg0: "/etc/abroot.conf"
21+
arg0_char: true

0 commit comments

Comments
 (0)