extern int DEBUGLEVEL;
static fstring password;
static fstring username;
-static fstring workgroup;
static int got_pass;
static BOOL showall = False;
if (!cli_session_setup(c, username,
password, strlen(password),
password, strlen(password),
- workgroup)) {
+ lp_workgroup())) {
DEBUG(0,("session setup failed: %s\n", cli_errstr(c)));
return NULL;
}
finfo = f;
}
+static void get_short_name(struct cli_state *cli,
+ char *name, fstring short_name)
+{
+ cli_list(cli, name, aHIDDEN | aDIR, listfn);
+ if (finfo) {
+ fstrcpy(short_name, finfo->short_name);
+ strlower(short_name);
+ }
+}
static void testpair(struct cli_state *cli, char *mask, char *file)
{
cli_list_old(cli, mask, aHIDDEN | aDIR, listfn);
} else {
cli_list(cli, mask, aHIDDEN | aDIR, listfn);
- }
- if (finfo) {
- fstrcpy(short_name, finfo->short_name);
- strlower(short_name);
+ finfo = NULL;
+ get_short_name(cli, file, short_name);
}
res2 = reg_test(mask, file, short_name);
int mc_len = strlen(maskchars);
int fc_len = strlen(filechars);
- cli_mkdir(cli, "masktest");
+ cli_mkdir(cli, "\\masktest");
cli_unlink(cli, "\\masktest\\*");
case 'o':
old_list = True;
break;
- case 'W':
- pstrcpy(workgroup, optarg);
- break;
default:
printf("Unknown option %c (%d)\n", (char)opt, opt);
exit(1);