e080f22cd5
Thanks to jcs@ for patch assist and testing.
30 lines
893 B
Plaintext
30 lines
893 B
Plaintext
$OpenBSD: patch-sqlsamdump_c,v 1.2 2002/09/24 02:21:44 mark Exp $
|
|
--- sqlsamdump.c.orig Mon Dec 3 10:08:30 2001
|
|
+++ sqlsamdump.c Sun Sep 22 23:32:40 2002
|
|
@@ -22,7 +22,6 @@
|
|
#include "sqllib.h"
|
|
#include "util.h"
|
|
#include "constants.h"
|
|
-#include <getopt.h>
|
|
|
|
/*
|
|
Set a few default values
|
|
@@ -71,6 +70,7 @@ int hackSQLServer(struct args_struct arg
|
|
int i, nDirCount = 4;
|
|
TDSLOGIN *login;
|
|
TDSSOCKET *tds;
|
|
+ TDSCONTEXT *context = NULL;
|
|
char sTMP[256];
|
|
FILE *pRepFD;
|
|
char repfile[128];
|
|
@@ -117,7 +117,8 @@ int hackSQLServer(struct args_struct arg
|
|
if ( args.verbose )
|
|
printf("-- Logging in to %s --\n", args.sIP);
|
|
|
|
- if( (tds = tds_connect(login)) !=NULL ) {
|
|
+ context = tds_alloc_context();
|
|
+ if( (tds = tds_connect(login, context, NULL)) !=NULL ) {
|
|
|
|
if ( !ifExistsXP(tds, "xp_cmdshell") ) {
|
|
fprintf(stderr, "WARNING: could not find xp_cmdshell\n");
|