[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-1753-ge3851a9
Jeremy Allison
jra at samba.org
Fri May 22 22:21:40 GMT 2009
The branch, master has been updated
via e3851a9110dfb416c74bc979a0dedc074883067f (commit)
from 202509a3479b7bba9a5dfce58270fb8f46cc496a (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e3851a9110dfb416c74bc979a0dedc074883067f
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 22 15:21:55 2009 -0700
Test that POSIX open of a directory returns NT_STATUS_FILE_IS_A_DIRECTORY (ERRDOS, EISDIR).
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source3/torture/torture.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 6651219..20561a7 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4211,6 +4211,17 @@ static bool run_simple_posix_open_test(int dummy)
goto out;
}
+ /* What happens when we try and POSIX open a directory ? */
+ if (NT_STATUS_IS_OK(cli_posix_open(cli1, dname, O_RDONLY, 0, &fnum1))) {
+ printf("POSIX open of directory %s succeeded, should have failed.\n", fname);
+ goto out;
+ } else {
+ if (!check_error(__LINE__, cli1, ERRDOS, EISDIR,
+ NT_STATUS_FILE_IS_A_DIRECTORY)) {
+ goto out;
+ }
+ }
+
if (!NT_STATUS_IS_OK(cli_posix_rmdir(cli1, dname))) {
printf("POSIX rmdir failed (%s)\n", cli_errstr(cli1));
goto out;
@@ -4223,7 +4234,7 @@ static bool run_simple_posix_open_test(int dummy)
if (fnum1 != (uint16_t)-1) {
cli_close(cli1, fnum1);
- fnum1 = -1;
+ fnum1 = (uint16_t)-1;
}
cli_setatr(cli1, fname, 0, 0);
--
Samba Shared Repository
More information about the samba-cvs
mailing list