1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-06 08:23:50 +03:00
Commit Graph

202 Commits

Author SHA1 Message Date
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Andrew Tridgell
4adbd01812 r4956: - moved the definition of the mangle context structure into a pvfs_shortname
- made the mangle cache size configurable
2007-10-10 13:09:09 -05:00
Andrew Tridgell
7f981b9ed9 r4944: every event_add_*() caller was having to call talloc_steal() to take
control of the event, so instead build that into the function. If you
pass NULL as mem_ctx then it leaves it as a child of the events
structure.
2007-10-10 13:09:08 -05:00
Andrew Tridgell
a3c7417cfe r4943: Smplified the events handling code a lot. The first source of
complexity was that events didn't automatically cleanup
themselves. This was because the events code was written before we had
talloc destructors, so you needed to call event_remove_XX() to clean
the event out of the event lists from every piece of code that used
events. I have now added automatic event destructors, which in turn
allowed me to simplify a lot of the calling code.

The 2nd source of complexity was caused by the ref_count, which was
needed to cope with event handlers destroying events while handling
them, which meant the linked lists became invalid, so the ref_count ws
used to mark events for later destruction.

The new system is much simpler. I now have a ev->destruction_count,
which is incremented in all event destructors. The event dispatch code
checks for changes to this and handles it.
2007-10-10 13:09:08 -05:00
Andrew Tridgell
a034556faa r4887: removed a bogus cast 2007-10-10 13:09:03 -05:00
Stefan Metzmacher
d5fa02746c r4728: split up server_services into:
- stream_socket services
  the smb, ldap and rpc service which sets up a srtam socket end then
  waits for connections
and
- task services
  which this you can create a seperate task that do something
  (this is also going through the process_model subsystem
  so with -M standard a new process for this created
  with -M thread a new thread ...

I'll add datagram services later when we whave support for datagram sockets in lib/socket/

see the next commit as an example for service_task's

metze
2007-10-10 13:08:49 -05:00
Andrew Tridgell
0e61a422bd r4615: added acl checking on directory search in pvfs 2007-10-10 13:08:33 -05:00
Andrew Tridgell
5a1a17d3fc r4595: on create check access against parent not child ... 2007-10-10 13:08:31 -05:00
Andrew Tridgell
6e7754abd0 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
2007-10-10 13:08:30 -05:00
Andrew Tridgell
e729061bcd r4584: fix pvfs backend to pass the new enhanced RAW-ACLS test. Easy once I really the
strange behaviour I saw was a w2k3 bug :-)
2007-10-10 13:08:29 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Andrew Tridgell
e6c81d7c9f r4547: - added talloc_new(ctx) macro that is a neater form of the common talloc(ctx, 0) call.
- cleaned up some talloc usage in various files

I'd like to get to the point that we have no calls to talloc(), at
which point we will rename talloc_p() to talloc(), to encourage
everyone to use the typesafe functions.
2007-10-10 13:08:20 -05:00
Andrew Tridgell
1df985a49b r4501: when copying files it is common for clients to copy the ACL. When the
ACL is the default ACL this menas the copied file would have an xattr
but the original would not. Avoid this by checking if the ACL being
set is the original ACL, and avoid the copy.
2007-10-10 13:08:15 -05:00
Andrew Tridgell
0a29fb45c3 r4464: added pvfs backend support for the special CREATOR_OWNER and CREATOR_GROUP inheritance rules 2007-10-10 13:07:53 -05:00
Andrew Tridgell
5761fa35ab r4448: - fixed access_mask checking on acl set
- honor the change ownership requests of acl set, changing the underlying
  unix owner/group

- fix the access mask on file create with SEC_FLAG_MAXIMUM_ALLOWED
2007-10-10 13:07:51 -05:00
Stefan Metzmacher
c44f4d44b5 r4423: give lp_parm_int() and lp_parm_ulong() default values
metze
2007-10-10 13:07:47 -05:00
Andrew Tridgell
96d017e521 r4412: SEC_FILE_READ_ATTRIBUTE is always granted, even if not requested. This was being done
in the full ACL code, but not in the unix access check code, which meant that qfileinfo
was failing for some parameters
2007-10-10 13:07:45 -05:00
Andrew Tridgell
30b4c20b1c r4411: when checking for create permissions, we need to check the parent, not the child! 2007-10-10 13:07:45 -05:00
Andrew Tridgell
babf3480a4 r4410: pvfs_rename_one() should not check for create permissions, as the rename
is always in the same directory
2007-10-10 13:07:44 -05:00
Andrew Tridgell
75e7229476 r4409: fixed handling of zero access masks for the POSITION_INFORMATION query/set levels 2007-10-10 13:07:44 -05:00
Andrew Tridgell
5fe51807d6 r4408: added the remaining access check hooks into pvfs. All calls should now have acl checking,
and obey the various inheritance rules.
2007-10-10 13:07:44 -05:00
Andrew Tridgell
fa44e3cce0 r4406: - don't call the xattr unlink hook on unlink unless the link count is 1, otherwise
the xattrs of the remaining link are removed

- fix the handling of attribute set on directories
2007-10-10 13:07:44 -05:00
Andrew Tridgell
b44d4d17df r4405: added acl inheritance to the mkdir and t2mkdir backends. 2007-10-10 13:07:44 -05:00
Andrew Tridgell
f4dfb63d53 r4403: - added ACL inheritance in the pvfs backend. ACLs are now inherited on
file and directory creation via ntcreatex. pvfs now passes the
  inheritance test in RAW-ACLS

- cleaned up the error handling a bit in pvfs_open()
2007-10-10 13:07:43 -05:00
Andrew Tridgell
16967f7502 r4391: bring the default ACL inline with what w2k3 uses 2007-10-10 13:07:42 -05:00
Andrew Tridgell
f25c469693 r4314: added ACL checking on unlink 2007-10-10 13:07:33 -05:00
Andrew Tridgell
c66b5a100c r4313: fixed a bug in handling new xattrs in the tdb xattr backend 2007-10-10 13:07:33 -05:00
Andrew Tridgell
89845388ea r4264: fix acl handling on systems without xattr support 2007-10-10 13:07:30 -05:00
Andrew Tridgell
25189b8fbf r4263: added support for the trans2 RAW_SEARCH_EA_LIST information
level. This is quite a strange level that we've never seen before, but
is used by the os2 workplace shell.

note w2k screws up this level when unicode is negotiated, so it only
passes the RAW-SEARCH test when you force non-unicode
2007-10-10 13:07:29 -05:00
Andrew Tridgell
7251f1fcdd r4262: a sniff from kukks showed that the FILE_ATTRIBUTE_NORMAL handling in
pvfs was not correct. This should fix a xcopy bug on OS/2.
2007-10-10 13:07:29 -05:00
Andrew Tridgell
0b76d405a7 r4261: added the RAW_FILEINFO_EA_LIST trans2 qfileinfo and qpathinfo
level. Interestingly, this level did now show up on our trans2 scanner
previously as we didn't have the FLAGS2_EXTENDED_ATTRIBUTES bit set in
the client code. Now that we set that bit, new levels appear in
windows servers.
2007-10-10 13:07:29 -05:00
Andrew Tridgell
795897b64f r4247: two more places that need the unlink hook 2007-10-10 13:07:29 -05:00
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