mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
added -k options for kerberos to smbtorture and locktest
(This used to be commit 46b89bc9979229abc6e9f2f8c585a22dd4f22902)
This commit is contained in:
parent
52b3390ca6
commit
c40d0d5783
@ -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,'%');
|
||||
|
@ -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,'%');
|
||||
|
Loading…
x
Reference in New Issue
Block a user