svn commit: samba r16842 - in branches/SAMBA_4_0/source/torture/raw: .

vlendec at samba.org vlendec at samba.org
Thu Jul 6 20:34:18 GMT 2006


Author: vlendec
Date: 2006-07-06 20:34:18 +0000 (Thu, 06 Jul 2006)
New Revision: 16842

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16842

Log:
Jeremy, I almost don't dare checking this in.....

Volker

Modified:
   branches/SAMBA_4_0/source/torture/raw/samba3misc.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/samba3misc.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/samba3misc.c	2006-07-06 20:10:23 UTC (rev 16841)
+++ branches/SAMBA_4_0/source/torture/raw/samba3misc.c	2006-07-06 20:34:18 UTC (rev 16842)
@@ -243,6 +243,10 @@
 	}
 	smbcli_close(cli_nt->tree, fnum);
 
+	/*
+	 * Do a whole bunch of error code checks on chkpath
+	 */
+
 	status = smbcli_chkpath(cli_nt->tree, fpath);
 	CHECK_STATUS(status, NT_STATUS_NOT_A_DIRECTORY);
 	status = smbcli_chkpath(cli_dos->tree, fpath);
@@ -278,6 +282,46 @@
 	status = smbcli_chkpath(cli_dos->tree, "<\\bla");
 	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
 
+	/*
+	 * .... And the same gang against getatr. Note that the error codes
+	 * differ....
+	 */
+
+	status = smbcli_getatr(cli_nt->tree, fpath, NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_OK);
+	status = smbcli_getatr(cli_dos->tree, fpath, NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_OK);
+
+	status = smbcli_getatr(cli_nt->tree, "..", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
+	status = smbcli_getatr(cli_dos->tree, "..", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidpath));
+
+	status = smbcli_getatr(cli_nt->tree, ".", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	status = smbcli_getatr(cli_dos->tree, ".", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+
+	status = smbcli_getatr(cli_nt->tree, "\t", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	status = smbcli_getatr(cli_dos->tree, "\t", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+
+	status = smbcli_getatr(cli_nt->tree, "\t\\bla", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	status = smbcli_getatr(cli_dos->tree, "\t\\bla", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+
+	status = smbcli_getatr(cli_nt->tree, "<", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	status = smbcli_getatr(cli_dos->tree, "<", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+
+	status = smbcli_getatr(cli_nt->tree, "<\\bla", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+	status = smbcli_getatr(cli_dos->tree, "<\\bla", NULL, NULL, NULL);
+	CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+
 	goto done;
 
  fail:



More information about the samba-cvs mailing list