summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-24 05:56:34 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-24 05:56:34 +0000
commitc29b72cd4f644c7750ee99313dee64441f78f076 (patch)
treeab41e6eb45e07b293524c5a92ff80a2e82343710 /source3/utils
parent1f37fca4c5a827e0fb0467f535ea5a2910274361 (diff)
downloadsamba-c29b72cd4f644c7750ee99313dee64441f78f076.tar.gz
samba-c29b72cd4f644c7750ee99313dee64441f78f076.tar.bz2
samba-c29b72cd4f644c7750ee99313dee64441f78f076.zip
use lp_workgroup()
use \\ in front of filenames get short name via a separate trans2 level 260 call (This used to be commit 5fd4dbf72e317bc47ab11b0b3f2e15d0c58879c8)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/masktest.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/source3/utils/masktest.c b/source3/utils/masktest.c
index a3eb95bcae..dc394dddb5 100644
--- a/source3/utils/masktest.c
+++ b/source3/utils/masktest.c
@@ -26,7 +26,6 @@
extern int DEBUGLEVEL;
static fstring password;
static fstring username;
-static fstring workgroup;
static int got_pass;
static BOOL showall = False;
@@ -124,7 +123,7 @@ struct cli_state *connect_one(char *share)
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;
}
@@ -170,6 +169,15 @@ void listfn(file_info *f, const char *s)
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)
{
@@ -197,10 +205,8 @@ 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);
@@ -223,7 +229,7 @@ static void test_mask(int argc, char *argv[],
int mc_len = strlen(maskchars);
int fc_len = strlen(filechars);
- cli_mkdir(cli, "masktest");
+ cli_mkdir(cli, "\\masktest");
cli_unlink(cli, "\\masktest\\*");
@@ -363,9 +369,6 @@ static void usage(void)
case 'o':
old_list = True;
break;
- case 'W':
- pstrcpy(workgroup, optarg);
- break;
default:
printf("Unknown option %c (%d)\n", (char)opt, opt);
exit(1);