svn commit: samba r6529 - in branches/SAMBA_4_0/source/torture: .
tridge at samba.org
tridge at samba.org
Sat Apr 30 09:47:32 GMT 2005
Author: tridge
Date: 2005-04-30 09:47:32 +0000 (Sat, 30 Apr 2005)
New Revision: 6529
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6529
Log:
fixed locktest with new credentials code
Modified:
branches/SAMBA_4_0/source/torture/locktest.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/locktest.c
===================================================================
--- branches/SAMBA_4_0/source/torture/locktest.c 2005-04-30 09:04:14 UTC (rev 6528)
+++ branches/SAMBA_4_0/source/torture/locktest.c 2005-04-30 09:47:32 UTC (rev 6529)
@@ -454,7 +454,8 @@
{
char *share[NSERVERS];
int opt;
- int seed, server, i;
+ int seed, server;
+ int username_count=0;
setlinebuf(stdout);
@@ -480,15 +481,21 @@
servers[0] = cli_credentials_init(talloc_autofree_context());
servers[1] = cli_credentials_init(talloc_autofree_context());
+ cli_credentials_guess(servers[0]);
+ cli_credentials_guess(servers[1]);
seed = time(NULL);
while ((opt = getopt(argc, argv, "U:s:ho:aAW:OR:B:M:EZW:")) != EOF) {
switch (opt) {
case 'U':
- i = servers[0]->username?1:0;
- cli_credentials_parse_string(servers[i], optarg, CRED_SPECIFIED);
-
+ if (username_count == 2) {
+ usage();
+ exit(1);
+ }
+ cli_credentials_parse_string(servers[username_count],
+ optarg, CRED_SPECIFIED);
+ username_count++;
break;
case 'R':
lock_range = strtol(optarg, NULL, 0);
@@ -535,13 +542,12 @@
}
}
- if (!servers[0]->username) {
+ if (username_count == 0) {
usage();
return -1;
}
- if (!servers[1]->username) {
- servers[1]->username = servers[0]->username;
- servers[1]->password = servers[0]->password;
+ if (username_count == 1) {
+ servers[1] = servers[0];
}
locktest_init_subsystems;
@@ -557,3 +563,4 @@
return(0);
}
+
More information about the samba-cvs
mailing list