Skip to content

Commit

Permalink
Execs: Postprocess native dynamic binaries with C code
Browse files Browse the repository at this point in the history
- Part of Lua code (sb_execve_postprocess_native_executable()
  in argvenvp.lua) was implemented in C (=> added new file
  execs/exec_postprocess.c)
  • Loading branch information
lauri-aarnio committed Mar 20, 2012
1 parent aee5e70 commit 3f042f3
Show file tree
Hide file tree
Showing 5 changed files with 663 additions and 3 deletions.
1 change: 1 addition & 0 deletions execs/Makefile
Expand Up @@ -4,6 +4,7 @@ objs := $(D)/exec_ruletree_maint.o \
$(D)/exec_policy_selection.o \
$(D)/exec_map_script_interp.o \
$(D)/exec_policy_ruletree.o \
$(D)/exec_postprocess.o \
$(D)/sb_exec.o

$(D)/sb_exec.o: preload/exported.h
Expand Down
9 changes: 7 additions & 2 deletions execs/exec_policy_ruletree.c
Expand Up @@ -50,8 +50,13 @@ const char *exec_policy_get_string(exec_policy_handle_t eph,
offs = ruletree_catalog_find_value_from_catalog(
eph.exec_policy_offset, s_name);
str = offset_to_ruletree_string_ptr(offs, NULL);
SB_LOG(SB_LOGLEVEL_NOISE,
"%s: %s='%s'", __func__, s_name, str, fldoffs);
if (str) {
SB_LOG(SB_LOGLEVEL_NOISE,
"%s: %s='%s'", __func__, s_name, str, fldoffs);
} else {
SB_LOG(SB_LOGLEVEL_NOISE,
"%s: No %s", __func__, s_name, fldoffs);
}
return(str);
}
return(NULL);
Expand Down

0 comments on commit 3f042f3

Please sign in to comment.