> What happens if you run "amadmin xx version"?

(*insecure*)amanda@atsun01:~$ amadmin atlab version
build: VERSION="Amanda-2.4.1p1"
       BUILT_DATE="Tue Jan 23 21:41:04 PST 2001"
       BUILT_MACH="SunOS atsun01 5.7 Generic_106541-14 sun4u sparc
SUNW,Ultra-4"
       CC="gcc"
paths: bindir="/usr/local/bin" sbindir="/usr/local/sbin"
       libexecdir="/usr/local/libexec" mandir="/usr/local/man"
       CONFIG_DIR="/usr/local/etc/amanda" DEV_PREFIX="/dev/dsk/"
       RDEV_PREFIX="/dev/rdsk/" DUMP="/usr/sbin/ufsdump"
       RESTORE="/usr/sbin/ufsrestore"
       SAMBA_CLIENT="/usr/local/samba/bin/smbclient"
       GNUTAR="/usr/local/bin/tar"
       COMPRESS_PATH="/usr/local/bin/gzip"
       UNCOMPRESS_PATH="/usr/local/bin/gzip"
       MAILER="/usr/bin/mailx"
       listed_incr_dir="/usr/local/var/amanda/gnutar-lists"
defs:  DEFAULT_SERVER="atsun01" DEFAULT_CONFIG="atlab"
       DEFAULT_TAPE_SERVER="atsun01"
       DEFAULT_TAPE_DEVICE="/dev/rmt/0hn" HAVE_MMAP HAVE_SYSVSHM
       LOCKING=POSIX_FCNTL SETPGRP_VOID DEBUG_CODE BSD_SECURITY
       USE_AMANDAHOSTS CLIENT_LOGIN="amanda" FORCE_USERID HAVE_GZIP
       COMPRESS_SUFFIX=".gz" COMPRESS_FAST_OPT="--fast"
       COMPRESS_BEST_OPT="--best" UNCOMPRESS_OPT="-dc"

> What about:
>
> and so on until you get to the end of the strings (there should be about
> 25 of them) or the address is 0x24974 (*vp).

(gdb) frame 4
#4  0x11c54 in main (argc=1, argv=0xffbefc34) at amandad.c:174
174             dbprintf(("%s: %s", argv[0], *vp));
(gdb) print version_info
$4 = 0x24920
(gdb) print version_info[0]
$5 = 0xff1cb278 "build: VERSION=\"Amanda-2.4.1p1\"\n"
(gdb) print version_info[1]
$6 = 0xff1cb240 "       BUILT_DATE=\"Tue Jan 23 21:41:04 PST 2001\"\n"
(gdb) print version_info[2]
$7 = 0xff1cb1e8 "       BUILT_MACH=\"SunOS atsun01 5.7 Generic_106541-14
sun4u sparc SUNW,Ultra-4\"\n"
(gdb) print version_info[3]
$8 = 0xff1cb1d0 "       CC=\"gcc\"\n"
(gdb) print version_info[4]
$9 = 0xff1cb190 "paths: bindir=\"/usr/local/bin\"
sbindir=\"/usr/local/sbin\"\n"
(gdb) print version_info[5]
$10 = 0xff1cb150 "       libexecdir=\"/usr/local/libexec\"
mandir=\"/usr/local/man\"\n"
(gdb) print version_info[6]
$11 = 0xff1cb108 "       CONFIG_DIR=\"/usr/local/etc/amanda\"
DEV_PREFIX=\"/dev/dsk/\"\n"
(gdb) print version_info [7]
$12 = 0xff1cb0c8 "       RDEV_PREFIX=\"/dev/rdsk/\"
DUMP=\"/usr/sbin/ufsdump\"\n"
(gdb) print version_info[8]
$13 = 0xff1cb0a0 "       RESTORE=\"/usr/sbin/ufsrestore\"\n"
(gdb) print version_info[9]
$14 = 0xff1cb068 "       SAMBA_CLIENT=\"/usr/local/samba/bin/smbclient\"\n"
(gdb) print version_info[10]
$15 = 0xff1cb040 "       GNUTAR=\"/usr/local/bin/tar\"\n"
(gdb) print version_info[11]
$16 = 0xff1cb010 "       COMPRESS_PATH=\"/usr/local/bin/gzip\"\n"
(gdb) print version_info[12]
$17 = 0xff1cafe0 "       UNCOMPRESS_PATH=\"/usr/local/bin/gzip\"\n"
(gdb) print version_info[13]
$18 = 0xff1cafc0 "       MAILER=\"/usr/bin/mailx\"\n"
(gdb) print version_info[14]
$19 = 0xff1caf80 "
listed_incr_dir=\"/usr/local/var/amanda/gnutar-lists\"\n"
(gdb) print version_info[15]
$20 = 0xff1caf48 "defs:  DEFAULT_SERVER=\"atsun01\"
DEFAULT_CONFIG=\"atlab\"\n"
(gdb) print version_info[16]
$21 = 0xff1caf20 "       DEFAULT_TAPE_SERVER=\"atsun01\"\n"
(gdb) print version_info[17]
$22 = 0xff1caed8 "       DEFAULT_TAPE_DEVICE=\"/dev/rmt/0hn\" HAVE_MMAP
HAVE_SYSVSHM\n"
(gdb) print version_info[18]
$23 = 0xff1cae90 "       LOCKING=POSIX_FCNTL SETPGRP_VOID DEBUG_CODE
BSD_SECURITY\n"
(gdb) print version_info[19]
$24 = 0xff1cae48 "       USE_AMANDAHOSTS CLIENT_LOGIN=\"amanda\"
FORCE_USERID HAVE_GZIP\n"
(gdb) print version_info[20]
$25 = 0xff1cae08 "       COMPRESS_SUFFIX=\".gz\"
COMPRESS_FAST_OPT=\"--fast\"\n"

> How familiar are you with debugging C code?  For instance, if I asked
> you to set a breakpoint at the start of main and examine version_info
> before much else had happened to see if it's getting clobbered or it's
> just plain bad coming in, is that do-able?

Not that familiar with it at all, _however_ I'm reading the doc's as we
type.
Looks pretty straight forward to me as far as setting breakpoints in gdb.

I'd say it's do-able :)

> John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

thanks,
-Ben

Reply via email to