e080f22cd5
Thanks to jcs@ for patch assist and testing.
34 lines
902 B
Plaintext
34 lines
902 B
Plaintext
$OpenBSD: patch-sqldict_c,v 1.2 2002/09/24 02:21:44 mark Exp $
|
|
--- sqldict.c.orig Mon Dec 3 11:51:11 2001
|
|
+++ sqldict.c Sun Sep 22 23:32:40 2002
|
|
@@ -21,7 +21,6 @@
|
|
#include "sqldict.h"
|
|
#include "constants.h"
|
|
#include "util.h"
|
|
-#include <getopt.h>
|
|
|
|
/*
|
|
Set a few default values
|
|
@@ -73,7 +72,8 @@ void initArguments(ARGS *pArgs) {
|
|
int doHack(const ARGS *pArgs) {
|
|
|
|
TDSLOGIN *login;
|
|
- TDSSOCKET *tds;
|
|
+ TDSSOCKET *tds;
|
|
+ TDSCONTEXT *context = NULL;
|
|
char user[64];
|
|
char pass[64];
|
|
char ip[16];
|
|
@@ -100,8 +100,9 @@ int doHack(const ARGS *pArgs) {
|
|
tds_set_server(login, ip);
|
|
tds_set_passwd(login, pass);
|
|
tds_set_user(login, user);
|
|
-
|
|
- if( (tds = tds_connect(login)) !=NULL ) {
|
|
+
|
|
+ context = tds_alloc_context();
|
|
+ if( (tds = tds_connect(login, context, NULL)) !=NULL ) {
|
|
fprintf(stdout, "IP: %-15s User: %-14s Pass: %-14s\n",
|
|
ip, user, pass);
|
|
|