1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

94 Commits

Author SHA1 Message Date
Jeremy Allison
1b3977c536 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
-
Jeremy Allison
aba243ca08 Fixed nasty little bug found by Gerald where we were corrupting the mode
bits before checking if we should change them on non-acl systems.
Jeremy.
-
Jeremy Allison
0db8a61d71 Made "security XXX" masks apply to ACL set. By default they have no effect.
Removed "restrict acl with mask" - redundent.
Jeremy.
-
Jeremy Allison
f100e091ab Fix for bad profile perms. Ensure r on files and rwx on directories.
Jeremy.
-
Jeremy Allison
7792e32ba7 Fixed SHM_R/SHM_W warnings by moving sys/ipc.h and sys/shm.h into includes.h
and using autoconf tests.
Added "restrict acl with mask" parameter.
Jeremy.
-
Jeremy Allison
a60ecb4e53 Tidy up args to DEBUG Statements - found by gcc on Solaris.
Jeremy.
-
Jeremy Allison
f02e67a096 Sync with default perm changes in 2.2.
Jeremy.
-
Jeremy Allison
5870e6019b Michael Davidson <md@sco.COM> pointed out that acl_get_qualifier can potentially
return a malloced area so added sys_acl_free_qualifier() calls to all supported
ACL interfaces to code with this (only Linux needs actual free call).
Jeremy.
-
Jeremy Allison
fe38692643 Fixed extern ref typo for file generic perms. 2am coding strikes again :-).
Jeremy.
-
Jeremy Allison
51987684bd This is a big, rather ugly patch. Whilst investigating the files not truncated
when copying to a full disk problem, I discovered that we were not allowing
the delete on close flag to be set properly, this led to other things, and
after investigation of the proper delete on close semantics and their relationship
to the file_share_delete flag I discovered there were some cases where we
weren't doing the deny modes properly. And this after only 5 years working
on them..... :-) :-).
So here's the latest attempt. I realised the delete on close flag needs to
be set across all smbds with a dev/ino pair open - in addition, the delete
on close flag, allow share delete and delete access requested all need to
be stored in the share mode tdb.
The "delete_on_close" entry in the fsp struct is now redundant and should
really be removed. This may also mean we can get rid of the "iterate_fsp"
calls that I didn't like adding in the first place. Whilst doing this patch,
I also discovered we needed to do the se_map_generic() call for file opens
and POSIX ACL mapping, so I added that also.
This code, although ugly, now passes the deny mode torture tests plus the
delete on close tests I added. I do need to add one more multiple connection
delete on close test to make sure I got the semantics exactly right, plus we
should also (as Andrew suggested) move to random testing here.

The good news is that NT should now correctly delete the file on disk
full error when copying to a disk :-).

Jeremy.
-
Jeremy Allison
4fa8cf68c3 Fixed the problem Gerald reported. Unfortunately we need to go back to
reporting imaginary "default" inheritable ACLs on directories, otherwise,
when you add an entry and click on apply without noticing there's no
default entry associated with it, it applies a null acl on the files
within the directory (hey, that's what you told NT you wanted, right ! :-).
Also ensure that minimum permissions for a directory are r-x for owner,
not just r--.
Jeremy.
-
Jeremy Allison
641ada44ae smbd/posix_acls.c: Saving and restoring errno here is the wrong place. Moved it
to the places where [f]chmod_acl is called instead.
Jeremy.
-
Jeremy Allison
83f52394e6 smbd/posix_acls.c: Sync up with 2.2 changes - don't return deny ACE's.
smbd/vfs.c: Don't call [f]chmod_acl if no acl support.
Jeremy.
-
Jeremy Allison
38b19fad28 More unused variables.
Jeremy.
-
Jeremy Allison
29414fe0d6 groupdb/mapping.c:
include/proto.h: Fix missing (void) in proto.
rpc_server/srv_samr_nt.c: Fix user private group problem by filtering out groups that
							clash with users.
smbd/posix_acls.c: Ensure default ACE's are sensible.
utils/pdbedit.c: Fix from Simo Sorce.
Jeremy.
-
Jeremy Allison
5b9a88c2d0 Sync up with 2.2 ACL code.
Jeremy.
-
Jeremy Allison
852b9e15ac New POSIX ACL mapping code. Works with UNIX permissions, now for testing
with real ACLs...
Jeremy.
-
Jeremy Allison
af364b93d9 lib/system.c (Finally) fixed all insure errors in password caching code. We can't
stop libc routines from calling getpwXXX functions, so caching a pointer to them
is impossible. This new code now makes two copies of the returned struct passwd
struct - one used as a cache, one returned to allow the caller to modify. When
doing a lookup we compare against the cached copy. Code is now easier to understand
also.
smbd/posix_acls.c: If we move the head of the linked list, remember to pass a
reference to that pointer.....
Jeremy.
-
Jeremy Allison
7b97ac289e I'm happy with the mapping for NT getACL, now for NT setACL.
Jeremy.
-
Jeremy Allison
0d6c7dedd2 Tidyup return of zero-permissions (map to ACE_DENIED, GENERIC_ALL, Everyone).
Jeremy.
-
Jeremy Allison
45e96777d0 Last tweak (I promise :-). Fallback to returning our SID if we're a domain
member but can't get the domain sid.
Jeremy.
-
Jeremy Allison
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
-
Jeremy Allison
14d5997dc8 Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree.
Jeremy.
-
Jeremy Allison
3ded1e6bd5 configure configure.in smbd/posix_acls.c smbd/dosmode.c: Fix for zero permission W2K profiles.
libsmb/cliconnect.c rpc_client/cli_login.c smbd/reply.c: codepage fixes from Tim.
Jeremy.
-
Jeremy Allison
c0517d6f4e Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
-
Jeremy Allison
e0431672cc Sync up with POSIX ACL code from 2.2.
Jeremy.
-
Jeremy Allison
2844ec3d51 include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added fchmod_acl and chmod_acl.
lib/substitute.c:
smbd/lanman.c:
smbd/open.c:
smbd/process.c:
smbd/reply.c:
smbd/service.c: Removed sessetup_user variable. Added current_user_info struct
which conatins domain info etc. Added '%D' for client domain parameter.
Jeremy.
-
Jeremy Allison
180e4a9cd0 Fixes for POSIX ACLS. ACL merge code.
Jeremy.
-
Jeremy Allison
6fb5eb8b1e Updated from 2.2.
Jeremy.
-
Jeremy Allison
523c919356 Fixed typo with acl_set_fd() not needing an ACL_TYPE_T parameter.
Ensure HAVE_NO_ACLS is set in configure if ACL support not selected.
Jeremy
-
Jeremy Allison
2300ac79f5 First compiling version of code that sets NT ACLs as POSIX ACLs.
Now the debugging starts.... :-).
Jeremy.
-
Jeremy Allison
0f39895ab0 Split set_nt_acls into owner set (which uses chown) and permission set
(which currently uses chmod) in preparation for ACL creation.
Jeremy.
-
Jeremy Allison
1a31b4eb08 Split the one sys_acl_free call into sys_acl_free_TYPE calls, to allow
easier wrapping of non-POSIX ACL interfaces.
Jeremy.
-
Jeremy Allison
c48e95297e Fix typos in new group sid check.
Jeremy.
-
Jeremy Allison
43ca0d991c Fixed chown/chgrp setting from smbcacls.
Jeremy.
-
Jeremy Allison
6ae63e502e Working code to read POSIX ACLs on a Linux system using the bestbits
ACL patch from http://acl.bestbits.at/.
configure support needs more work (just assumes correct headers at
the moment). ACL writing needs adding.
Jeremy.
-
Jeremy Allison
4339e20202 Cause smbd to use the new posix_acls code, not the old unix_acls code.
Currently does exactly the same thing (returns ACLs the same way). This
code is written to try and get a POSIX ACL via the abstract sys_XX interface,
then fall back to providing a UNIX based ACL if the calls fail. Seems to
work. Next step is to add a --with-posix-acls to configure.in and then
check on a POSIX ACL system that a complex ACL is returned correctly
as an NT ACL. Note that the ACL set (a more complex problem) is not
addressed yet.
Jeremy.
-
Jeremy Allison
8359375bba Make smbd/posix_acls.c use abstract interface.
include/smb_acls.h lib/sysacls.c: Added as interface definitions.
Jeremy.
-
Jeremy Allison
b27cac7762 Moving to abstract API interface (sys_get_acl() etc.) to allow system
specific ACL calls to be dealt with elsewhere. This file will eventually
be able to replace the old UNIX acl interface.
Jeremy.
-
Jeremy Allison
52e9311bc2 Code to read & return POSIX ACLs as NT ACLs. Close to test on Linux.
Jeremy.
-
Jeremy Allison
8f0062b873 Keep syncing up POSIX ACL work...
Jeremy.
-
Jeremy Allison
bcac4ede76 Work in progress, doesn't compile. Adding the POSIX ACL mapping....
Jeremy.
-
Jeremy Allison
b809a2d0c8 David Lee's utmp patch (finally). Thanks David !
Jeremy.
-
Jeremy Allison
a2829febe1 This doesn't compile but is a placeholder for moving the UNIX
acl code over to POSIX acls.
Jeremy.
-