/* check if this component exists as-is */
if (stat(test_name, &name->st) == 0) {
if (i<num_components-1 && !S_ISDIR(name->st.st_mode)) {
- return NT_STATUS_NOT_A_DIRECTORY;
+ return NT_STATUS_OBJECT_PATH_NOT_FOUND;
}
talloc_free(partial_name);
partial_name = test_name;
uint_t flags, struct pvfs_filename *name)
{
char *ret, *p, *p_start;
- size_t len;
name->original_name = talloc_strdup(name, cifs_name);
name->stream_name = NULL;
p = ret + strlen(pvfs->base_directory) + 1;
- len = strlen(cifs_name);
- if (len>0 && p[len-1] == '\\') {
- p[len-1] = 0;
- len--;
- }
- if (len>1 && p[len-1] == '.' && p[len-2] == '\\') {
- return NT_STATUS_OBJECT_NAME_INVALID;
- }
-
/* now do an in-place conversion of '\' to '/', checking
for legal characters */
p_start = p;
+
while (*p) {
size_t c_size;
codepoint_t c = next_codepoint(p, &c_size);
of a name */
return NT_STATUS_ILLEGAL_CHARACTER;
}
- *p = '/';
+ if (p > p_start && p[1] == 0) {
+ *p = 0;
+ } else {
+ *p = '/';
+ }
break;
case ':':
if (!(flags & PVFS_RESOLVE_STREAMS)) {
case '?':
case '"':
if (flags & PVFS_RESOLVE_NO_WILDCARD) {
- return NT_STATUS_ILLEGAL_CHARACTER;
+ return NT_STATUS_OBJECT_NAME_INVALID;
}
name->has_wildcard = True;
break;
reduce a name that contains .. components or repeated \ separators
return NULL if it can't be reduced
*/
-const char *pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char *fname)
+static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t flags)
{
codepoint_t c;
size_t c_size, len;
- int i, num_components;
+ int i, num_components, err_count;
char **components;
char *p, *s, *ret;
- s = talloc_strdup(mem_ctx, fname);
- if (s == NULL) return NULL;
+ s = talloc_strdup(mem_ctx, *fname);
+ if (s == NULL) return NT_STATUS_NO_MEMORY;
for (num_components=1, p=s; *p; p += c_size) {
c = next_codepoint(p, &c_size);
if (c == '\\') num_components++;
}
- if (num_components < 2) {
- talloc_free(s);
- return NULL;
- }
components = talloc_array_p(s, char *, num_components+1);
if (components == NULL) {
talloc_free(s);
- return NULL;
+ return NT_STATUS_NO_MEMORY;
}
components[0] = s;
}
components[i+1] = NULL;
+ /*
+ rather bizarre!
+
+ '.' components are not allowed, but the rules for what error
+ code to give don't seem to make sense. This is a close
+ approximation.
+ */
+ for (err_count=i=0;components[i];i++) {
+ if (strcmp(components[i], "") == 0) {
+ continue;
+ }
+ if (strcmp(components[i], ".") == 0 || err_count) {
+ err_count++;
+ }
+ }
+ if (err_count) {
+ if (!(flags & PVFS_RESOLVE_NO_WILDCARD)) err_count--;
+
+ if (err_count==1) {
+ return NT_STATUS_OBJECT_NAME_INVALID;
+ } else {
+ return NT_STATUS_OBJECT_PATH_NOT_FOUND;
+ }
+ }
+
/* remove any null components */
for (i=0;components[i];i++) {
- if (strcmp(components[i], "") == 0 ||
- strcmp(components[i], ".") == 0) {
+ if (strcmp(components[i], "") == 0) {
memmove(&components[i], &components[i+1],
sizeof(char *)*(num_components-i));
i--;
}
if (strcmp(components[i], "..") == 0) {
- if (i < 1) return NULL;
+ if (i < 1) return NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
memmove(&components[i-1], &components[i+1],
sizeof(char *)*(num_components-(i+1)));
i -= 2;
if (components[0] == NULL) {
talloc_free(s);
- return talloc_strdup(mem_ctx, "\\");
+ *fname = talloc_strdup(mem_ctx, "\\");
+ return NT_STATUS_OK;
}
for (len=i=0;components[i];i++) {
ret = talloc(mem_ctx, len+1);
if (ret == NULL) {
talloc_free(s);
- return NULL;
+ return NT_STATUS_NO_MEMORY;
}
for (len=0,i=0;components[i];i++) {
ret[len] = 0;
talloc_free(s);
+
+ *fname = ret;
- return ret;
+ return NT_STATUS_OK;
}
if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD)) {
/* it might contain .. components which need to be reduced */
- cifs_name = pvfs_reduce_name(*name, cifs_name);
- if (cifs_name) {
- status = pvfs_unix_path(pvfs, cifs_name, flags, *name);
+ status = pvfs_reduce_name(*name, &cifs_name, flags);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
+ status = pvfs_unix_path(pvfs, cifs_name, flags, *name);
}
if (!NT_STATUS_IS_OK(status)) {
return status;
}
+static BOOL test_path(struct smbcli_state *cli, const char *path, NTSTATUS res)
+{
+ struct smb_chkpath io;
+ NTSTATUS status;
+ io.in.path = path;
+ status = smb_raw_chkpath(cli->tree, &io);
+ if (!NT_STATUS_EQUAL(status, res)) {
+ printf("%-40s FAILED %s should be %s\n",
+ path, nt_errstr(status), nt_errstr(res));
+ return False;
+ } else {
+ printf("%-40s correct (%s)\n", path, nt_errstr(res));
+
+ }
+ return True;
+}
+
static BOOL test_chkpath(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
struct smb_chkpath io;
status = smb_raw_chkpath(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- io.in.path = BASEDIR "\\nodir";
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR "\\nodir", NT_STATUS_OBJECT_NAME_NOT_FOUND);
fnum = create_complex_file(cli, mem_ctx, BASEDIR "\\test.txt..");
if (fnum == -1) {
goto done;
}
- io.in.path = BASEDIR "\\test.txt..";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_NOT_A_DIRECTORY);
+ ret &= test_path(cli, BASEDIR "\\test.txt..", NT_STATUS_NOT_A_DIRECTORY);
if (!torture_set_file_attribute(cli->tree, BASEDIR, FILE_ATTRIBUTE_HIDDEN)) {
printf("failed to set basedir hidden\n");
goto done;
}
- io.in.path = BASEDIR;
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OK);
-
- io.in.path = "";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OK);
-
- io.in.path = ".";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = ".\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = ".\\.";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = ".\\.\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = ".\\.\\.";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = ".\\.\\.aaaaa";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = "\\.\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = "\\.\\\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = "\\.\\\\\\\\\\\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, BASEDIR, NT_STATUS_OK);
+ ret &= test_path(cli, BASEDIR "\\foo\\..\\test.txt..", NT_STATUS_NOT_A_DIRECTORY);
+ ret &= test_path(cli, "", NT_STATUS_OK);
+ ret &= test_path(cli, ".", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, ".\\", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, "\\\\\\.\\", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, ".\\.", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, "." BASEDIR, NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR "\\.", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, BASEDIR "\\.\\test.txt..", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, ".\\.\\", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, ".\\.\\.", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, ".\\.\\.aaaaa", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, "\\.\\", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, "\\.\\\\", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, "\\.\\\\\\\\\\\\", NT_STATUS_OBJECT_NAME_INVALID);
/* Note that the two following paths are identical but
give different NT status returns for chkpth and findfirst. */
status = single_search(cli, mem_ctx, "\\.\\\\\\\\\\\\.");
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
- io.in.path = "\\.\\\\\\\\\\\\.";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, "\\.\\\\\\\\\\\\.", NT_STATUS_OBJECT_PATH_NOT_FOUND);
/* We expect this open to fail with the same error code as the chkpath below. */
printf("testing Open on %s\n", "\\.\\\\\\\\\\\\.");
CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
- io.in.path = "\\.\\\\xxx";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = "..\\..\\..";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
-
- io.in.path = "\\..";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
-
- io.in.path = "\\.\\\\\\\\\\\\xxx";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR"\\.\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = BASEDIR"\\.\\\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = BASEDIR"\\.\\nt";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR"\\.\\.\\nt";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR"\\nt";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OK);
-
- io.in.path = BASEDIR".\\foo";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = ".\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = ".\\.";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = ".\\.\\.\\.\\foo\\.\\.\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR".\\.\\.\\.\\foo\\.\\.\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR".\\.\\.\\.\\foo\\..\\.\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR".";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
-
- io.in.path = "\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OK);
-
- io.in.path = "\\.";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = "\\..\\";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
-
- io.in.path = "\\..";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
-
- io.in.path = BASEDIR "\\.";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
- io.in.path = BASEDIR "\\..";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OK);
-
- io.in.path = BASEDIR "\\nt\\Visual Studio\\VB98\\vb600";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
-
- io.in.path = BASEDIR "\\nt\\Visual Studio\\VB98\\vb6.exe";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_NOT_A_DIRECTORY);
+ ret &= test_path(cli, "\\.\\\\xxx", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, "..\\..\\..", NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
+ ret &= test_path(cli, "\\..", NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
+ ret &= test_path(cli, "\\.\\\\\\\\\\\\xxx", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR"\\.\\", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, BASEDIR"\\.\\\\", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, BASEDIR"\\.\\nt", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR"\\.\\.\\nt", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR"\\nt", NT_STATUS_OK);
+ ret &= test_path(cli, BASEDIR".\\foo", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR"xx\\foo", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, ".\\", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, ".\\.", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, ".\\.\\.\\.\\foo\\.\\.\\", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR".\\.\\.\\.\\foo\\.\\.\\", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR".\\.\\.\\.\\foo\\..\\.\\", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR".", NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ ret &= test_path(cli, "\\", NT_STATUS_OK);
+ ret &= test_path(cli, "\\.", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, "\\..\\", NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
+ ret &= test_path(cli, "\\..", NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
+ ret &= test_path(cli, BASEDIR "\\.", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, BASEDIR "\\..", NT_STATUS_OK);
+ ret &= test_path(cli, BASEDIR "\\nt\\V S\\VB98\\vb600", NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR "\\nt\\V S\\VB98\\vb6.exe", NT_STATUS_NOT_A_DIRECTORY);
/* We expect this open to fail with the same error code as the chkpath below. */
printf("testing Open on %s\n", BASEDIR".\\.\\.\\.\\foo\\..\\.\\");
/* We expect this open to fail with the same error code as the chkpath below. */
/* findfirst seems to fail with a different error. */
- printf("testing Open on %s\n", BASEDIR "\\nt\\Visual Studio\\VB98\\vb6.exe\\3");
- fnum1 = smbcli_nt_create_full(cli->tree, BASEDIR "\\nt\\Visual Studio\\VB98\\vb6.exe\\3",
+ printf("testing Open on %s\n", BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3");
+ fnum1 = smbcli_nt_create_full(cli->tree, BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3",
0, GENERIC_RIGHTS_FILE_ALL_ACCESS,
FILE_ATTRIBUTE_NORMAL,
NTCREATEX_SHARE_ACCESS_DELETE|
status = smbcli_nt_error(cli->tree);
CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
- io.in.path = BASEDIR "\\nt\\Visual Studio\\VB98\\vb6.exe\\3";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR "\\nt\\Visual Studio\\VB98\\vb6.exe\\3\\foo";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR "\\nt\\3\\foo";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
-
- io.in.path = BASEDIR "\\nt\\Visual Studio\\*\\vb6.exe\\3";
- printf("testing %s\n", io.in.path);
- status = smb_raw_chkpath(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3\\foo", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR "\\nt\\3\\foo", NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ ret &= test_path(cli, BASEDIR "\\nt\\V S\\*\\vb6.exe\\3", NT_STATUS_OBJECT_NAME_INVALID);
+ ret &= test_path(cli, BASEDIR "\\nt\\V S\\*\\*\\vb6.exe\\3", NT_STATUS_OBJECT_NAME_INVALID);
done:
smbcli_close(cli->tree, fnum);
return False;
}
- if (NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR "\\nt\\Visual Studio"))) {
+ if (NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR "\\nt\\V S"))) {
printf("Failed to create " BASEDIR " - %s\n", smbcli_errstr(cli->tree));
return False;
}
- if (NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR "\\nt\\Visual Studio\\VB98"))) {
+ if (NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, BASEDIR "\\nt\\V S\\VB98"))) {
printf("Failed to create " BASEDIR " - %s\n", smbcli_errstr(cli->tree));
return False;
}
- fnum = create_complex_file(cli, mem_ctx, BASEDIR "\\nt\\Visual Studio\\VB98\\vb6.exe");
+ fnum = create_complex_file(cli, mem_ctx, BASEDIR "\\nt\\V S\\VB98\\vb6.exe");
if (fnum == -1) {
- printf("failed to open \\nt\\Visual Studio\\VB98\\vb6.exe - %s\n", smbcli_errstr(cli->tree));
+ printf("failed to open \\nt\\V S\\VB98\\vb6.exe - %s\n", smbcli_errstr(cli->tree));
ret = False;
goto done;
}