diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-03-04 00:24:24 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-03-04 00:24:24 +0000 |
commit | 46b89bc9979229abc6e9f2f8c585a22dd4f22902 (patch) | |
tree | 331b7e6bfbddf72b08f72d3f7f964dd7250665f2 /source/torture | |
parent | fd172ec603de590dae6c3a91c7baf39c0afebea8 (diff) | |
download | samba-46b89bc9979229abc6e9f2f8c585a22dd4f22902.tar.gz samba-46b89bc9979229abc6e9f2f8c585a22dd4f22902.tar.xz samba-46b89bc9979229abc6e9f2f8c585a22dd4f22902.zip |
added -k options for kerberos to smbtorture and locktest
Diffstat (limited to 'source/torture')
-rw-r--r-- | source/torture/locktest.c | 15 | ||||
-rw-r--r-- | source/torture/torture.c | 15 |
2 files changed, 28 insertions, 2 deletions
diff --git a/source/torture/locktest.c b/source/torture/locktest.c index 0ed8c5f9048..ad30537e69b 100644 --- a/source/torture/locktest.c +++ b/source/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/source/torture/torture.c b/source/torture/torture.c index 5300bfd2749..8fbc5dbeb01 100644 --- a/source/torture/torture.c +++ b/source/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,'%'); |