summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-03-04 00:24:24 +0000
committerAndrew Tridgell <tridge@samba.org>2002-03-04 00:24:24 +0000
commitc40d0d5783300ee8dfcff1382becf8f6c0f4ff25 (patch)
treeff7bc4b2406aaf7b99d163ee93da7847843fe7ce /source3
parent52b3390ca6f72c7478ededed6aadcabee835e273 (diff)
downloadsamba-c40d0d5783300ee8dfcff1382becf8f6c0f4ff25.tar.gz
samba-c40d0d5783300ee8dfcff1382becf8f6c0f4ff25.tar.bz2
samba-c40d0d5783300ee8dfcff1382becf8f6c0f4ff25.zip
added -k options for kerberos to smbtorture and locktest
(This used to be commit 46b89bc9979229abc6e9f2f8c585a22dd4f22902)
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/locktest.c15
-rw-r--r--source3/torture/torture.c15
2 files changed, 28 insertions, 2 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 0ed8c5f904..ad30537e69 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -25,6 +25,7 @@
static fstring password;
static fstring username;
static int got_pass;
+static BOOL use_kerberos;
static int numops = 1000;
static BOOL showall;
static BOOL analyze;
@@ -173,6 +174,8 @@ struct cli_state *connect_one(char *share)
return NULL;
}
+ c->use_kerberos = use_kerberos;
+
if (!cli_session_request(c, &calling, &called)) {
DEBUG(0,("session request to %s failed\n", called.name));
cli_shutdown(c);
@@ -525,6 +528,7 @@ static void usage(void)
locktest //server1/share1 //server2/share2 [options..]\n\
options:\n\
-U user%%pass\n\
+ -k use kerberos\n\
-s seed\n\
-o numops\n\
-u hide unlock fails\n\
@@ -574,8 +578,17 @@ static void usage(void)
seed = time(NULL);
- while ((opt = getopt(argc, argv, "U:s:ho:aAW:O")) != EOF) {
+ while ((opt = getopt(argc, argv, "U:s:ho:aAW:Ok")) != EOF) {
switch (opt) {
+ 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':
pstrcpy(username,optarg);
p = strchr_m(username,'%');
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 5300bfd274..8fbc5dbeb0 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -32,6 +32,7 @@ static fstring randomfname;
static BOOL use_oplocks;
static BOOL use_level_II_oplocks;
static char *client_txt = "client_oplocks.txt";
+static BOOL use_kerberos;
BOOL torture_showall = False;
@@ -107,6 +108,8 @@ static BOOL open_nbt_connection(struct cli_state *c)
return False;
}
+ c->use_kerberos = use_kerberos;
+
c->timeout = 120000; /* set a really long timeout (2 minutes) */
if (use_oplocks) c->use_oplocks = True;
if (use_level_II_oplocks) c->use_level_II_oplocks = True;
@@ -3197,6 +3200,7 @@ static void usage(void)
printf("\t-d debuglevel\n");
printf("\t-U user%%pass\n");
+ printf("\t-k use kerberos\n");
printf("\t-N numprocs\n");
printf("\t-n my_netbios_name\n");
printf("\t-W workgroup\n");
@@ -3276,7 +3280,7 @@ static void usage(void)
fstrcpy(workgroup, lp_workgroup());
- while ((opt = getopt(argc, argv, "hW:U:n:N:O:o:m:Ld:Ac:")) != EOF) {
+ while ((opt = getopt(argc, argv, "hW:U:n:N:O:o:m:Ld:Ac:k")) != EOF) {
switch (opt) {
case 'W':
fstrcpy(workgroup,optarg);
@@ -3308,6 +3312,15 @@ static void usage(void)
case 'c':
client_txt = optarg;
break;
+ 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':
pstrcpy(username,optarg);
p = strchr_m(username,'%');