However, it doesn't seem to work with the gdb thing..
After recompiling with -ggdb and re-installing the binaries gdb errors when I type run after a gdb /sbin/gradm, then set args :
- Starting program: /sbin/gradm -F -L llog2 -O lacl2
warning: Cannot insert breakpoint -1:
Cannot access memory at address 0x80480e0
Update: It helped when I disabled all pax flags with chpax.
-Jens Andersen
Here is the output:
- #0 0x8054d9f in display_ip_node (node=0xbfffe26c, unused=0x0,
contype=2 '\002', stream=0x80ccba8) at gradm_newlearn.c:1162
#1 0x8054ae5 in traverse_ip_tree (base=0x82a05a0, optarg=0x0,
act=0x8054b70 <display_ip_node>, contype=108 'l', stream=0x80ccba8)
at gradm_newlearn.c:1057
#2 0x8054f40 in display_ip_tree (base=0x82a05a0, contype=2 '\002',
stream=0x80ccba8) at gradm_newlearn.c:1223
#3 0x8054a2d in display_leaf (node=0x8326ef8, unused1=0x0, stream=0x80ccba8)
at gradm_newlearn.c:1031
#4 0x8053b2d in traverse_file_tree (base=0x8326ef8,
act=0x8054840 <display_leaf>, optarg=0x0, stream=0x80ccba8)
at gradm_newlearn.c:362
#5 0x8053b4d in traverse_file_tree (base=0x8326f80,
act=0x8054840 <display_leaf>, optarg=0x0, stream=0x80ccba8)
at gradm_newlearn.c:370
#6 0x805483c in display_tree (base=0x8326d68, stream=0x80ccba8)
at gradm_newlearn.c:971
#7 0x805367a in display_role (group=0x80d5560, user=0x0, stream=0x80ccba8)
at gradm_newlearn.c:198
#8 0x80535bd in traverse_roles (grouplist=0x815e398,
act=0x80535fc <display_role>, stream=0x80ccba8) at gradm_newlearn.c:166
#9 0x8053720 in display_roles (grouplist=0x815e398, stream=0x80ccba8)
at gradm_newlearn.c:214
#10 0x8055f2d in generate_full_learned_acls (
learn_log=0x80ccb78 "/etc/grsec/llog2", stream=0x80ccba8)
at gradm_fulllearn.c:229
#11 0x804e91e in parse_args (argc=6, argv=0xbffff774) at gradm_arg.c:277
#12 0x8049e32 in main (argc=6, argv=0xbffff774) at ./gradm.l:325
#13 0x8059ee5 in __libc_start_main (main=0x8049ddc <main>, argc=6,
ubp_av=0xbffff774, init=0x80480b4 <_init>, fini=0x80a8380 <_fini>,
rtld_fini=0, stack_end=0xbffff76c) at ../sysdeps/generic/libc-start.c:129
Update2:
I figured it might be the contents of some of the structures passed to the functions so here is output of print *node and print *stream:
http://rayman.skumler.net/gdbgradminfo.txt