diff options
author | dsmith <dsmith> | 2007-08-14 19:48:35 +0000 |
---|---|---|
committer | dsmith <dsmith> | 2007-08-14 19:48:35 +0000 |
commit | 5165afb2d98a125c4e43cc2faf62b23c3756f295 (patch) | |
tree | 4ca7be912d0be99592d9a5ac246b9da652fb16cf /runtime | |
parent | bcde1b029b8c27e4328a90c1cac7028767dbd154 (diff) | |
download | systemtap-steved-5165afb2d98a125c4e43cc2faf62b23c3756f295.tar.gz systemtap-steved-5165afb2d98a125c4e43cc2faf62b23c3756f295.tar.xz systemtap-steved-5165afb2d98a125c4e43cc2faf62b23c3756f295.zip |
2007-08-14 David Smith <dsmith@redhat.com>
Merge from setuid-branch. Changes also by Martin Hunt
<hunt@redhat.com>.
* staprun.c (init_staprun): Drop CAP_SYS_ADMIN when we're done
with it.
(main): Calls parse_modpath instead of path_parse_modname. Just
call parse_modpath with argv[optind]. Let it allocate and set
modpath and modname. If no modulename was given, display usage
and exit. Drop CAP_SYS_NICE when we're done with it. Set
atexit(exit_cleanup) so cleanup always gets called and modules get
removed. Call handle_symbols.
(run_stapio): Set argv[0] to stapio so that it executes as itself
instead of staprun.
(cleanup): Only do cleanups once and only try to remove module
when appropriate.
(exit_cleanup): New. Calls cleanup().
(mountfs): Sets uid to root before making directory and then
restores uid.
(setup_ctl_channel): Uses DEBUGFS define and improved
error message.
(setup_relayfs): Ditto.
(setup_oldrelayfs): Uses DEBUGFS and RELAYFS defines.
(run_stp_check): Replaced by mountfs().
(mountfs): New function. Replaces an external script with C code.
(init_staprun): Calls mountfs() instead of run_stp_check().
* staprun.h: Renamed path_parse_modname to parse_modpath. Added
MODULE_NAME_LEN define. Added [_][p]err macros. Removed
VERSION_CMD.
* mainloop.c (cleanup_and_exit): Make sure initialized is 2
before exiting with code 2.
(stp_main_loop): Set initialized to 2 when STP_TRANSPORT
is received. Call cleanup_and_exit() with proper status.
(start_cmd): exit 1 instead of -1.
(system_cmd): Ditto.
(init_staprun): Renamed init_stapio.
(cleanup_and_exit): Set exit status.
* cap.c: New file.
* common.c: New file.
* stapio.c: New file.
* staprun_funcs.c: New file.
* Makefile: Removed.
* symbols.c (get_sections): Move the filter code up so that
uninteresting section names are filtered out before
attempting to open them.
(do_kernel_symbols): Better detect overfow conditions and realloc
new space.
(do_module): After sending all modules, send a null message to
indicate we are finished.
* ctl.c (init_ctl_channel): When attempting to attach, if the
control channel doesn't exist, print a better error message.
* relay_old.c (init_oldrelayfs): Errors out if
open_relayfs_files() couldn't open any files.
PR 4795
* mainloop.c (send_request): Fixed buffer overflow check.
* staprun.h: Added buffer overflow checking versions of
strcpy/sprintf/snprintf.
* common.c (path_parse_modname): Checks for overflows on
strcpy/sprintf/snprintf.
(read_buffer_info): Ditto.
* ctl.c (init_ctl_channel): Ditto.
* relay.c (init_relayfs): Ditto.
* relay_old.c (open_relayfs_files): Ditto.
(init_oldrelayfs): Ditto.
* staprun_funcs.c (insert_module): Ditto.
(check_path): Ditto.
* symbols.c (get_sections): Ditto.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/staprun/Makefile | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/runtime/staprun/Makefile b/runtime/staprun/Makefile deleted file mode 100644 index 097aead3..00000000 --- a/runtime/staprun/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -CFLAGS = -Wall -std=gnu99 -D_GNU_SOURCE -fexceptions -Wall -Werror -Wshadow -Wunused -Wp,-D_FORTIFY_SOURCE=2 - -all: staprun stap_merge - -staprun: staprun.c mainloop.c relay.c ctl.c symbols.c ../transport/transport_msgs.h staprun.h - gcc -O3 $(CFLAGS) -o staprun staprun.c mainloop.c symbols.c ctl.c relay.c relay_old.c -lpthread - -stap_merge: stap_merge.c - gcc -O3 $(CFLAGS) -o stap_merge stap_merge.c - -debug: staprun.c mainloop.c relay.c ctl.c symbols.c ../transport/transport_msgs.h staprun.h - gcc -g -D DEBUG $(CFLAGS) -o staprun staprun.c mainloop.c symbols.c ctl.c relay.c relay_old.c -lpthread - -clean: - /bin/rm -f staprun stap_merge *.o *~ |