Veritas-bu

[Veritas-bu] bpgp is gone from 6.5 and now bpdir too !?

2008-02-22 11:16:49
Subject: [Veritas-bu] bpgp is gone from 6.5 and now bpdir too !?
From: parsonsa <netbackup-forum AT backupcentral DOT com>
To: VERITAS-BU AT mailman.eng.auburn DOT edu
Date: Fri, 22 Feb 2008 06:25:37 -0800
This took all day to suss out.

If you have gdb installed on your NBU6.5 server, then this script will start 
nbgp with some suitable args and then sets a breakpoint when it calls it's 
internal function "copy_file_from_server". At this point we squirt in a new 
filename then continue execution and bingo, you can pull whatever you want from 
any client.

Usage: scriptname <client> <src> <dest>

eg: my_bpgp.ksh my_server01 /etc/passwd /tmp/passwd_from_01

Here's the script: apart from the shebang it's all one line. Take off the 
dev/null 2>&1 if you don't trust me on my first post and want to see what it's 
doing. I won't be insulted :) The printf is 'typing' instructions to gdb, 
passing in dummy args (-po DBEXT and -job 2). Unhindered, the program would 
attempt to fetch /usr/openv/tmp/blahblah_DBEXT.2.trace_file - nbgp is like bpgp 
except it only pulls certain files. What we do is trap it's internal call to 
the function copy_file_from_server and clobber in our own filename.

#!/bin/ksh
printf "set write\nbreak *copy_file_from_client+0x10\nrun LOG -cl $1 -po DBEXT 
-job 2 -lfn $3\ncont\nset \$i3=\"$2\"\ncont\nq\n" | gdb 
/usr/openv/netbackup/bin/nbgp > /dev/null 2>&1

+----------------------------------------------------------------------
|This was sent by parsonsa AT visa DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------


_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu