svn commit: samba r20508 - in
branches/SAMBA_4_0/source/torture/raw: .
vlendec at samba.org
vlendec at samba.org
Wed Jan 3 12:02:44 GMT 2007
Author: vlendec
Date: 2007-01-03 12:02:44 +0000 (Wed, 03 Jan 2007)
New Revision: 20508
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20508
Log:
Confirm a special case in samba3 reply_getatr that getatr("") always returns
HIDDEN.
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 2007-01-03 12:01:17 UTC (rev 20507)
+++ branches/SAMBA_4_0/source/torture/raw/samba3misc.c 2007-01-03 12:02:44 UTC (rev 20508)
@@ -340,6 +340,11 @@
status = smbcli_chkpath(cli_dos->tree, "<\\bla");
CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+ status = smbcli_chkpath(cli_nt->tree, "");
+ CHECK_STATUS(status, NT_STATUS_OK);
+ status = smbcli_chkpath(cli_dos->tree, "");
+ CHECK_STATUS(status, NT_STATUS_OK);
+
/*
* .... And the same gang against getatr. Note that the DOS error codes
* differ....
@@ -380,6 +385,35 @@
status = smbcli_getatr(cli_dos->tree, "<\\bla", NULL, NULL, NULL);
CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+ {
+ uint16_t attr;
+
+ status = smbcli_getatr(cli_nt->tree, "", &attr, NULL, NULL);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ if (attr != (FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_DIRECTORY)) {
+ d_printf("(%s) getatr(\"\") returned 0x%x, expected "
+ "0x%x\n", __location__, attr,
+ FILE_ATTRIBUTE_HIDDEN
+ |FILE_ATTRIBUTE_DIRECTORY);
+ ret = False;
+ }
+
+ status = smbcli_setatr(cli_nt->tree, "",
+ FILE_ATTRIBUTE_DIRECTORY, -1);
+ CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
+ status = smbcli_setatr(cli_dos->tree, "",
+ FILE_ATTRIBUTE_DIRECTORY, -1);
+ CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRnoaccess));
+
+ status = smbcli_setatr(cli_nt->tree, ".",
+ FILE_ATTRIBUTE_DIRECTORY, -1);
+ CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+ status = smbcli_setatr(cli_dos->tree, ".",
+ FILE_ATTRIBUTE_DIRECTORY, -1);
+ CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
+ }
+
+
/* Try the same set with openX. */
status = raw_smbcli_open(cli_nt->tree, "..", O_RDONLY, DENY_NONE, NULL);
More information about the samba-cvs
mailing list