svn commit: samba r10142 - in branches/tmp/samba4-winsrepl: .
source/build/smb_build source/librpc/ndr source/ntvfs
source/torture/raw
metze at samba.org
metze at samba.org
Sat Sep 10 08:47:16 GMT 2005
Author: metze
Date: 2005-09-10 08:47:15 +0000 (Sat, 10 Sep 2005)
New Revision: 10142
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10142
Log:
r12115 at SERNOX (orig r10132): jra | 2005-09-09 23:45:36 +0200
Confirm that openX with OPEN_EXEC implies read only.
Jeremy.
r12121 at SERNOX (orig r10138): jra | 2005-09-10 04:21:44 +0200
Fix the mapping table (as tested in smbtorture). EXEC_ACCESS
should map to SEC_RIGHTS_FILE_READ, not READ|WRITE.
Jeremy.
r12123 at SERNOX (orig r10140): metze | 2005-09-10 10:41:57 +0200
reorder some stuff, for nicer output
metze
r12124 at SERNOX (orig r10141): metze | 2005-09-10 10:46:28 +0200
if some of the LIBNDR_ALIGN_* flags and LIBNDR_FLAG_REMAINING are set,
ndr_pull_data_blob() doesn't work correct. so make them exclute each other.
jelmer, tridge: does that look correct? it fixes a problem, abartlet had
with krb5pac.idl, where the align flags are inherited from the parent, and we want to get the
[flag(NDR_REMAINING)] DATA_BLOB signature;
metze
Modified:
branches/tmp/samba4-winsrepl/
branches/tmp/samba4-winsrepl/source/build/smb_build/makefile.pm
branches/tmp/samba4-winsrepl/source/librpc/ndr/ndr.c
branches/tmp/samba4-winsrepl/source/ntvfs/ntvfs_generic.c
branches/tmp/samba4-winsrepl/source/torture/raw/open.c
Changeset:
Property changes on: branches/tmp/samba4-winsrepl
___________________________________________________________________
Name: svk:merge
- 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10129
3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495
a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11627
+ 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10141
3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495
a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11627
Modified: branches/tmp/samba4-winsrepl/source/build/smb_build/makefile.pm
===================================================================
--- branches/tmp/samba4-winsrepl/source/build/smb_build/makefile.pm 2005-09-10 08:46:28 UTC (rev 10141)
+++ branches/tmp/samba4-winsrepl/source/build/smb_build/makefile.pm 2005-09-10 08:47:15 UTC (rev 10142)
@@ -72,19 +72,23 @@
{
return << "__EOD__";
SHELL=$config{SHELL}
+
PERL=$config{PERL}
+
CC=$config{CC}
-CFLAGS=-I\$(srcdir)/include -I\$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -I\$(srcdir)/lib $config{CFLAGS} $config{CPPFLAGS}
+CFLAGS=-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -D_SAMBA_BUILD_ -DHAVE_CONFIG_H $config{CFLAGS} $config{CPPFLAGS}
+CPP=$config{CPP}
+CPPFLAGS=$config{CPPFLAGS}
+
LD=$config{LD}
-GCOV=$config{GCOV}
LD_FLAGS=$config{LDFLAGS}
STLD=$config{AR}
STLD_FLAGS=-rc
SHLD=$config{CC}
-SHLD_FLAGS=$config{LDSHFLAGS}
+SHLD_FLAGS=$config{LDSHFLAGS}
XSLTPROC=$config{XSLTPROC}
@@ -92,7 +96,7 @@
YACC=$config{YACC}
YAPP=$config{YAPP}
-CPP=$config{CPP}
+GCOV=$config{GCOV}
DEFAULT_TEST_TARGET=$config{DEFAULT_TEST_TARGET}
Modified: branches/tmp/samba4-winsrepl/source/librpc/ndr/ndr.c
===================================================================
--- branches/tmp/samba4-winsrepl/source/librpc/ndr/ndr.c 2005-09-10 08:46:28 UTC (rev 10141)
+++ branches/tmp/samba4-winsrepl/source/librpc/ndr/ndr.c 2005-09-10 08:47:15 UTC (rev 10142)
@@ -246,6 +246,12 @@
if (new_flags & LIBNDR_FLAG_BIGENDIAN) {
(*pflags) &= ~LIBNDR_FLAG_LITTLE_ENDIAN;
}
+ if (new_flags & LIBNDR_FLAG_REMAINING) {
+ (*pflags) &= ~LIBNDR_ALIGN_FLAGS;
+ }
+ if (new_flags & LIBNDR_ALIGN_FLAGS) {
+ (*pflags) &= ~LIBNDR_FLAG_REMAINING;
+ }
(*pflags) |= new_flags;
}
Modified: branches/tmp/samba4-winsrepl/source/ntvfs/ntvfs_generic.c
===================================================================
--- branches/tmp/samba4-winsrepl/source/ntvfs/ntvfs_generic.c 2005-09-10 08:46:28 UTC (rev 10141)
+++ branches/tmp/samba4-winsrepl/source/ntvfs/ntvfs_generic.c 2005-09-10 08:47:15 UTC (rev 10142)
@@ -259,6 +259,7 @@
switch (open_mode & OPENX_MODE_ACCESS_MASK) {
case OPENX_MODE_ACCESS_READ:
+ case OPENX_MODE_ACCESS_EXEC:
io2->generic.in.access_mask = SEC_RIGHTS_FILE_READ;
break;
case OPENX_MODE_ACCESS_WRITE:
@@ -266,7 +267,6 @@
break;
case OPENX_MODE_ACCESS_RDWR:
case OPENX_MODE_ACCESS_FCB:
- case OPENX_MODE_ACCESS_EXEC:
io2->generic.in.access_mask =
SEC_RIGHTS_FILE_READ |
SEC_RIGHTS_FILE_WRITE;
Modified: branches/tmp/samba4-winsrepl/source/torture/raw/open.c
===================================================================
--- branches/tmp/samba4-winsrepl/source/torture/raw/open.c 2005-09-10 08:46:28 UTC (rev 10141)
+++ branches/tmp/samba4-winsrepl/source/torture/raw/open.c 2005-09-10 08:47:15 UTC (rev 10142)
@@ -265,6 +265,7 @@
union smb_open io;
union smb_fileinfo finfo;
const char *fname = BASEDIR "\\torture_openx.txt";
+ const char *fname_exe = BASEDIR "\\torture_openx.exe";
NTSTATUS status;
int fnum = -1, fnum2;
BOOL ret = True;
@@ -444,8 +445,33 @@
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ /* Check the mapping for open exec. */
+
+ /* First create an .exe file. */
+ smbcli_unlink(cli->tree, fname_exe);
+ fnum = create_complex_file(cli, mem_ctx, fname_exe);
+ smbcli_close(cli->tree, fnum);
+
+ io.openx.level = RAW_OPEN_OPENX;
+ io.openx.in.fname = fname_exe;
+ io.openx.in.flags = OPENX_FLAGS_ADDITIONAL_INFO;
+ io.openx.in.open_mode = OPENX_MODE_ACCESS_EXEC | OPENX_MODE_DENY_NONE;
+ io.openx.in.search_attrs = 0;
+ io.openx.in.file_attrs = 0;
+ io.openx.in.write_time = 0;
+ io.openx.in.size = 0;
+ io.openx.in.timeout = 0;
+ status = smb_raw_open(cli->tree, mem_ctx, &io);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ /* Can we read and write ? */
+ CHECK_RDWR(io.openx.out.fnum, RDWR_RDONLY);
+ smbcli_close(cli->tree, io.openx.out.fnum);
+ smbcli_unlink(cli->tree, fname);
+
done:
smbcli_close(cli->tree, fnum);
+ smbcli_unlink(cli->tree, fname_exe);
smbcli_unlink(cli->tree, fname);
return ret;
More information about the samba-cvs
mailing list