1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-01 16:23:49 +03:00
Commit Graph

170 Commits

Author SHA1 Message Date
Andrew Tridgell
3ac8401598 r4244: add more calls to pvfs_xattr_unlink_hook() on file/dir create, to try to beat race
conditions in the tdb xattr backend
2007-10-10 13:07:28 -05:00
Andrew Tridgell
b26828bef5 r4243: a sniff from kukks showed that the ea_set interface in trans2 setfileinfo allows
for multiple EAs to be set at once. This fixes all the ea code to allow for that.
2007-10-10 13:07:28 -05:00
Andrew Tridgell
0c927d912c r4242: added support for storing xattrs in a tdb. This allows all advanced NT
attributes (streams, EAs, NT ACLs, timestamps etc) to be used on
filesystems that don't support xattrs. It also allows for large
streams, although they are very inefficient.

I won't enable this by default, as I really wrote it as a way of
testing large stream support while still using ext3, but perhaps with
a bit more work this could be generally usable.

To enable this use:

   posix:eadb = /home/test/myeas.tdb
2007-10-10 13:07:28 -05:00
Andrew Tridgell
76bd647678 r4230: now that we set the FLAGS2_EXTENDED_ATTRIBUTES flag, we should mark
empty EAs as being of size 4, not size 0
2007-10-10 13:07:28 -05:00
Andrew Tridgell
590e1a91bf r4205: fixed the default acl mapping from posix permissions to use the mapped
uid->sid and gid->sid
2007-10-10 13:07:26 -05:00
Andrew Tridgell
7d981c29c2 r4182: fixed trans2 mkdir, allowing mkdir with an initial EA list 2007-10-10 13:07:23 -05:00
Andrew Tridgell
a56d95ad89 r4173: - new t2open code, that can cope with "create with EAs". Many thanks
to kukks on #samba-technical for the sniffs that allowed me to work
  this out

- much simpler ntvfs open generic mapping code

- added t2open create with EA torture test to RAW-OPEN test
2007-10-10 13:07:22 -05:00
Andrew Tridgell
6d471db13a r4165: added a 100 element name cache to cope with some amount of seeking
back to filenames that have been deleted. This fixes the new os/2
delete test.
2007-10-10 13:07:21 -05:00
Andrew Tridgell
ae14905d95 r4163: 2nd attempt at fixing the OS/2 "del *" problem 2007-10-10 13:07:21 -05:00
Andrew Tridgell
7dfffe4ac0 r4162: this should fix the delete/findnext problem from OS/2 clients. Thanks
again to kukks for the excellent and detailed bug report
2007-10-10 13:07:21 -05:00
Andrew Tridgell
7b446af09b r4147: converted from NT_USER_TOKEN to struct security_token
this is mostly just a tidyup, but also adds the privilege_mask, which
I will be using shortly in ACL checking.

note that I had to move the definition of struct security_token out of
security.idl as pidl doesn't yet handle arrays of pointers, and the
usual workaround (to use a intermediate structure) would make things
too cumbersome for this structure, especially given we never encode it
to NDR.
2007-10-10 13:06:31 -05:00
Andrew Tridgell
6da058a28b r4067: no matches in findnext is not an error 2007-10-10 13:06:22 -05:00
Andrew Tridgell
e3500811b9 r4062: the RAW-ACLS test now passes. The SEC_STD_DELETE bit is rather strange
though - I expect we'll need to tweak that some more.
2007-10-10 13:06:21 -05:00
Andrew Tridgell
c7cbd966d4 r4056: modified the access check code based on results from RAW-ACLS
test. Also added generic mapping bits for pvfs. We don't pass RAW-ACLS
yet, but its close.
2007-10-10 13:06:20 -05:00
Andrew Tridgell
0928b1f5b6 r4037: fixed a bunch of "might be uninitialised" warnings after enabling -O1 in my compile 2007-10-10 13:06:16 -05:00
Andrew Tridgell
17a4e0b3ac r4035: more effort on consistent naming of the access mask bits.
This removes the duplicate named SEC_RIGHTS_MAXIMUM_ALLOWED and
SEC_RIGHTS_FULL_CONTROL, which are just other names for
SEC_FLAG_MAXIMUM_ALLOWED and SEC_RIGHTS_FILE_ALL. The latter names
match the new naming conventions in security.idl

Also added names for the generic->specific mappings for files are
directories
2007-10-10 13:06:16 -05:00
Andrew Tridgell
9a9a0d0e79 r4026: added NT ACL checking on pvfs_open() for existing files. I need to
work out some way to do a decent test suite for this.
2007-10-10 13:06:15 -05:00
Andrew Tridgell
01c0fa722f r4011: get rid of rpc_secdes.h and replace it with a single sane set of
definitions for security access masks, in security.idl

The previous definitions were inconsistently named, and contained many
duplicate and misleading entries. I kept finding myself tripping up
while using them.
2007-10-10 13:06:13 -05:00
Andrew Tridgell
01e89697fe r3995: improved the default ACL mapping from unix perms 2007-10-10 13:06:12 -05:00
Andrew Tridgell
9ff6ecbdb6 r3990: take advantage of the uid->sid and gid->sid code to create a much
better default NT ACL in pvfs
2007-10-10 13:06:11 -05:00
Andrew Tridgell
052d91c59f r3983: posix:fakeoplocks should default to False, not True ! 2007-10-10 13:06:11 -05:00
Andrew Tridgell
b31108e492 r3982: split out the sid -> uid/gid mapping routines into a ntvfs_sidmap
subsystem. This is in preparation for adding better default ACL
generation in pvfs, which will require uid/gid -> sid mapping.
2007-10-10 13:06:11 -05:00
Andrew Tridgell
4a52fae82d r3939: - added "posix:fakeoplocks" option for testing with oplocks forced on
- added support for sticky write times after a setfileinfo, by using a
  write_time field in the DosAttrib xattr structure.
2007-10-10 13:06:06 -05:00
Jelmer Vernooij
16d905f6b0 r3881: Split up the LIBNDR_GEN subsystem into NDR_* and RPC_NDR_* subsystems.
This reduces the total size of the samba binaries from 119 Mb to 73 Mb.
Next step will be to have the build system obtain some of this information
by itself, so that we don't have to write ~10 lines per interface manually.
2007-10-10 13:06:01 -05:00
Andrew Tridgell
4468018cb6 r3836: - fixed the handling of NT_STATUS_BUFFER_TOO_SMALL in nttrans server
- fixed revision number on default DACL

- fixed DACL_PRESENT bit in acl query

with these fixes cacls.exe and the GUI ACL editor in w2k both work
against pvfs. The GUI editor is slow as it times out looking up the
SID -> name mappings.
2007-10-10 13:05:58 -05:00
Andrew Tridgell
05ee9179f7 r3835: - added testing of setting an initial ACL on a file using NTTRANS create
- added support for initial ACLs in pvfs backend
2007-10-10 13:05:58 -05:00
Andrew Tridgell
2e19edaa4e r3834: - fixed XATTR_NTACL_NAME
- pvfs now passes RAW-ACLS
2007-10-10 13:05:58 -05:00
Andrew Tridgell
17911eea59 r3833: NTACL is a better xattr name than DosAcl (tpot suggested this) 2007-10-10 13:05:58 -05:00
Andrew Tridgell
3a1f20d874 r3832: added NT ACL query/set to the posix NTVFS backend. The default ACL is
based on the current nttoken, which is completely wrong, but works as a start.

The ACL is stored in the xattr system.DosAcl, using a NDR encoded IDL
union with a version number to allow for future expansion.

pvfs does not yet check the ACL for file access. At the moment the ACL
is just query/set.

We also need to do some RPC work to allow the windows ACL editor to be
used. At the moment is queries the ACL fine, but displays an error
when it fails to map the SIDs via rpc.
2007-10-10 13:05:57 -05:00
Andrew Tridgell
8379ad14e3 r3806: added support to smb_server and pvfs for the NTTRANS Create call. This
call has an optional sec_desc and ea_list.
2007-10-10 13:05:56 -05:00
Andrew Tridgell
b7e4ec4550 r3803: fixed detection of xattr support 2007-10-10 13:05:55 -05:00
Andrew Tridgell
8a6fa43156 r3801: added allocation size rounding. This is needed for ifstest. 2007-10-10 13:05:55 -05:00
Andrew Tridgell
f4b2b1311d r3800: - fixed delete-on-close behaviour for streams
- added a delete-on-close test to RAW-STREAMS

- don't allow rename of streams at the moment (I need to work out if
  its supposed to be allowed first)
2007-10-10 13:05:55 -05:00
Andrew Tridgell
c1a48a7542 r3799: - added the bit for FS_ATTR_NAMED_STREAMS support into qfsinfo filesystem attribute reply
- pvfs passes the RAW-STREAMS test
2007-10-10 13:05:55 -05:00
Andrew Tridgell
b6452c4a20 r3798: added support for alternate data streams in xattrs into pvfs.
The trickiest part about this was getting the sharing and locking
rules right, as alternate streams are separate locking spaces from the
main file for the purposes of byte range locking, and separate for
most share violation rules.

I suspect there are still problems with delete on close with alternate
data streams. I'll look at that next.
2007-10-10 13:05:54 -05:00
Andrew Tridgell
e7afd4403c r3747: - added some of the infrastructure needed for streams support in pvfs
(the IDL, and the load/save meta-data logic)

- changed pvfs_resolve_name() to default to non-wildcard, needing
  PVFS_RESOLVE_WILDCARD to enable wildcards. Most callers don't want
  wildcards, so defaulting this way makes more sense.

- fixed deletion of EAs
2007-10-10 13:05:50 -05:00
Andrew Tridgell
ad7815faba r3741: FILE_ATTRIBUTE_DIRECTORY is illegal in open of a file 2007-10-10 13:05:49 -05:00
Jelmer Vernooij
0d7bb2c40b r3737: - Get rid of the register_subsystem() and register_backend() functions.
- Re-disable tdbtool (it was building fine on my Debian box but other
					machines were having problems)
2007-10-10 13:05:48 -05:00
Jelmer Vernooij
64826da834 r3733: More build system fixes/features:
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure
 - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities)
2007-10-10 13:05:47 -05:00
Andrew Tridgell
5af815ffc3 r3729: permission changes on directories always include the FILE_ATTRIBUTE_DIRECTORY bit 2007-10-10 13:05:47 -05:00
Andrew Tridgell
3d50982f54 r3718: added support for the ntrename level in pvfs_rename(). 2007-10-10 13:05:46 -05:00
Andrew Tridgell
e255d1c3a8 r3717: - expanded the RAW-RENAME test a little
- added support for wildcard rename in pvfs

- made more consistent use of pvfs_map_errno()
2007-10-10 13:05:46 -05:00
Andrew Tridgell
31ac31398b r3694: added support for the RENAME_INFORMATION level of setfileinfo and
setpathinfo. pvfs now passes the RAW-SFILEINFO test.
2007-10-10 13:05:45 -05:00
Andrew Tridgell
4b3afc6c39 r3658: use handle->fd == -1 as the primary indicator of a directory. This
fixes a directory creation problem from WinXP
2007-10-10 13:05:42 -05:00
Andrew Tridgell
bdabb3f836 r3635: fixed the crash from the BASE-DISCONNECT test 2007-10-10 13:05:41 -05:00
Andrew Tridgell
bfca9eb7cb r3631: a couple of tweaks to the talloc hierarchy for async requests in
pvfs. This prevents a possible crash due to free ordering on
unexpected disconnect.
2007-10-10 13:05:41 -05:00
Andrew Tridgell
aa09df22ee r3618: - this adds the special case for DENY_DOS semantics, as shown by the BASE-DENYDOS test.
- pvfs now passes BASE-DENY1 and BASE-DENYDOS.
2007-10-10 13:05:40 -05:00
Andrew Tridgell
6e4fdf01d1 r3615: split out struct pvfs_file_handle from struct pvfs_file. This is in
preparation for adding code to pass the BASE-DENY1 and BASE-DENYDOS
tests, which require a shared filesystem handle for some specific
combinations of two DENY_DOS opens on the same connection.
2007-10-10 13:05:40 -05:00
Andrew Tridgell
20fc3a25ef r3596: MODE_INFORMATION tests now pass. Only RENAME_INFORMATION level left to
support RAW-SFILEINFO
2007-10-10 13:05:37 -05:00
Andrew Tridgell
e53ec2f6b6 r3595: - fixed a talloc_free ordering problem on cleanup with pending requests
- added initial support for MODE_INFORMATION in setfileinfo (I have no
  idea what "mode information" on a file is - it takes a value of 0,
  2, 4 or 6. What could it be?)
2007-10-10 13:05:37 -05:00