patched client.c to avoid segfaults on user/pass list exhaustion

updated port to comply with -current changes
This commit is contained in:
obecian 2000-09-18 08:51:31 +00:00
parent a66a96575b
commit 2abc3ac9e1
4 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,28 @@
# patch from palante@subterrain.net
--- client.c.orig Tue Jul 11 16:01:35 2000
+++ client.c Tue Jul 11 16:03:20 2000
@@ -3612,8 +3612,9 @@ phase_3: /* smb session setup/auth */
done = 0;
username[0] = '\0';
while (!done) {
- if (!userfd || !passfd)
- uppair();
+ if (!userfd || !passfd) {
+ if (!uppair()) done++;
+ }
else {
if (fgets(password, sizeof(password), passfd) == NULL) {
rewind(passfd);
@@ -3635,8 +3636,9 @@ phase_3: /* smb session setup/auth */
}
}
- if ((! *username) && (! *password))
- uppair(); /* sleaze for NT */
+ if ((! *username) && (! *password)) {
+ if (!uppair()) done++;
+ }
#ifdef VERBOSE
natprintf("[*]--- Attempting to connect with Username: `%s' Password: `%s'\n",

View File

@ -1,2 +1,3 @@
@comment $OpenBSD: PLIST,v 1.2 2000/09/18 08:51:32 obecian Exp $
bin/nbaudit
man/man1/nbaudit.1