summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/locktest.c5
-rw-r--r--source3/torture/torture.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 5f9a63802b..63b9590dd6 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -24,6 +24,7 @@
static fstring password[2];
static fstring username[2];
+static int got_user;
static int got_pass;
static BOOL use_kerberos;
static int numops = 1000;
@@ -602,13 +603,13 @@ static void usage(void)
case 'k':
#ifdef HAVE_KRB5
use_kerberos = True;
- got_pass = True;
#else
d_printf("No kerberos support compiled in\n");
exit(1);
#endif
break;
case 'U':
+ got_user = 1;
if (got_pass == 2) {
d_printf("Max of 2 usernames\n");
exit(1);
@@ -663,6 +664,8 @@ static void usage(void)
}
}
+ if(use_kerberos && !got_user) got_pass = True;
+
argc -= optind;
argv += optind;
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 56b8da768e..97e864de96 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4082,6 +4082,7 @@ static void usage(void)
{
int opt, i;
char *p;
+ int gotuser = 0;
int gotpass = 0;
extern char *optarg;
extern int optind;
@@ -4167,13 +4168,13 @@ static void usage(void)
case 'k':
#ifdef HAVE_KRB5
use_kerberos = True;
- gotpass = True;
#else
d_printf("No kerberos support compiled in\n");
exit(1);
#endif
break;
case 'U':
+ gotuser = 1;
fstrcpy(username,optarg);
p = strchr_m(username,'%');
if (p) {
@@ -4188,6 +4189,7 @@ static void usage(void)
}
}
+ if(use_kerberos && !gotuser) gotpass = True;
while (!gotpass) {
p = getpass("Password:");