summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-08-19 21:55:13 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-08-20 21:58:07 +1000
commitf9837d15f30c88cc4dca19e3a54433302c11b9ae (patch)
tree0ab0f0ed37adb01dfb19e501f55bce8e89990c9a /source4
parentbf1e27bd8fa509d4039ec617a486589607d0d204 (diff)
downloadsamba-f9837d15f30c88cc4dca19e3a54433302c11b9ae.tar.gz
samba-f9837d15f30c88cc4dca19e3a54433302c11b9ae.tar.bz2
samba-f9837d15f30c88cc4dca19e3a54433302c11b9ae.zip
s4-torture: Show that we cannot have extended attributes on streams
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/raw/streams.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index a9097119f3..593bbe2a94 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -737,10 +737,12 @@ static bool test_stream_names(struct torture_context *tctx,
io.generic.level = RAW_OPEN_NTCREATEX;
io.ntcreatex.in.root_fid.fnum = 0;
io.ntcreatex.in.flags = 0;
- io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
+ io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
io.ntcreatex.in.create_options = 0;
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
- io.ntcreatex.in.share_access = 0;
+ io.ntcreatex.in.share_access =
+ NTCREATEX_SHARE_ACCESS_READ |
+ NTCREATEX_SHARE_ACCESS_WRITE;
io.ntcreatex.in.alloc_size = 0;
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
@@ -751,6 +753,19 @@ static bool test_stream_names(struct torture_context *tctx,
CHECK_STATUS(status, NT_STATUS_OK);
fnum1 = io.ntcreatex.out.file.fnum;
+ torture_comment(tctx, "Adding one EAs to first stream file\n");
+ ZERO_STRUCT(sinfo);
+ sinfo.generic.level = RAW_SFILEINFO_EA_SET;
+ sinfo.generic.in.file.fnum = fnum1;
+ sinfo.ea_set.in.num_eas = 1;
+ sinfo.ea_set.in.eas = talloc_array(tctx, struct ea_struct, 1);
+ sinfo.ea_set.in.eas[0].flags = 0;
+ sinfo.ea_set.in.eas[0].name.s = "STREAMEA";
+ sinfo.ea_set.in.eas[0].value = data_blob_string_const("EA_VALUE1");
+
+ status = smb_raw_setfileinfo(cli->tree, &sinfo);
+ CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
+
/*
* A different stream does not give a sharing violation
*/