1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-30 08:23:49 +03:00
Commit Graph

294 Commits

Author SHA1 Message Date
Andrew Tridgell
e22de9734f r4160: fixed the file_type in ntcreatex reply on a named pipe. NT4 requires this to be right. 2007-10-10 13:07:20 -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
35ca4e1e81 r4060: removed an unused file 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
eec698254f r4055: fixed more places to use type safe allocation macros 2007-10-10 13:06:20 -05:00
Andrew Tridgell
b0f6e21481 r4054: got rid of Realloc(), replacing it with the type safe macro realloc_p() 2007-10-10 13:06:19 -05:00
Andrew Tridgell
80d15fa340 r4052: fixed a bunch of code to use the type safe _p allocation macros 2007-10-10 13:06:18 -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
54209ed056 r3993: use distinctive fnums in the ipc backend, to make monitoring sniffs easier 2007-10-10 13:06:12 -05:00
Andrew Tridgell
e611405109 r3992: provide hooks for lsa to lookup sids allocated using the linear id->sid mapping 2007-10-10 13:06:11 -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
8f57343975 r3989: added a linear algorithmic mapping for uid->sid and gid->sid within
our local domain. Note that this linear mapping does not suffer from
the "foreign sid" problems of the linear mappings we have previously
rejected for the sid->uid problem.

the mapping allows for 1 billion automatically allocated users or
groups for the local domain.
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
Stefan Metzmacher
234166606d r3971: fix compiler warnings
metze
2007-10-10 13:06:09 -05:00
Stefan Metzmacher
7d24b98f3f r3969: fix compiler warnings
metze
2007-10-10 13:06:09 -05:00
Stefan Metzmacher
3bfb732187 r3962: fix compiler warnings
metze
2007-10-10 13:06:08 -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
218e01441a r3597: implement a suggestion from abartlet. By taking a refernce to the
database in the opendb lck, we ensure that the database is not closed
before the lock is gone. That ensures the lock destructor doesn't work
on a closed database.
2007-10-10 13:05:37 -05:00