1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

67 Commits

Author SHA1 Message Date
Jeremy Allison
f735551b9e First cut of new ACL mapping code from Andreas Gruenbacher <agruen@suse.de>.
This is not 100% the same as what SuSE shipped in their Samba, there is
a crash bug fix, a race condition fix, and a few logic changes I'd like to
discuss with Andreas. Added Andreas to (C) notices for posix_acls.c
Jeremy.
(This used to be commit 40eafb9dde)
2002-10-23 01:22:32 +00:00
Jeremy Allison
06b5917af4 Fix based on Jim McDonough's code for ACL inheritance problem.
Jeremy.
(This used to be commit 3343efaaa8)
2002-10-08 00:20:17 +00:00
Jeremy Allison
2d5d51e9f3 Fix from Andreas Gruenbacher <agruen@suse.de> to prevent ACL set on read-only
share.
Jeremy.
(This used to be commit 9b8f362abc)
2002-10-07 18:09:29 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Jelmer Vernooij
127e77e6e3 Sync 3.0 branch with head
(This used to be commit 42615b945e)
2002-08-17 15:27:10 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Jeremy Allison
3bb219161a Added POSIX ACL layer into the vfs.
Jeremy.
(This used to be commit 7d59445b69)
2002-03-12 00:08:08 +00:00
Jeremy Allison
db4c62d7ed Implemented default ACL patch (set inherit acls = true on a per share basis).
Based on code donated by Olaf Frczyk <olaf@cbk.poznan.pl>. Further commit
will change to sending via vfs interface.
Jeremy.
(This used to be commit d85133e269)
2002-03-11 21:57:12 +00:00
Andrew Tridgell
e69f020d3d a more informitive debug message when a SID can't be validated
(This used to be commit c55737fb25)
2002-03-09 19:38:47 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Gerald Carter
107b12ec11 merge from 2.2
(This used to be commit 7dc1c34145)
2002-01-25 15:47:12 +00:00
Andrew Tridgell
a78fd04681 fixed a crash in merge_aces()
when we free curr_ace_outer we need to not try to use it again :)
(This used to be commit 1c5e19a418)
2002-01-11 11:26:31 +00:00
Jeremy Allison
a784fce109 Allow ACL set to fail gracefully on HP HFS filesystems.
Jeremy.
(This used to be commit 2d7b81e692)
2001-12-19 17:47:19 +00:00
Jeremy Allison
3667377851 Stop using getgrgid() - a very expensive call with winbindd, to look up
a group name.
Jeremy.
(This used to be commit b926660e73)
2001-12-04 03:59:18 +00:00
Tim Potter
6d9adfe73c Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
(This used to be commit 9712d3f15a)
2001-11-30 01:04:15 +00:00
Jeremy Allison
be6023b2fb Log sys_acl_set_XX at level 2 not zero.
Jeremy.
(This used to be commit 4a54a633c5)
2001-09-25 00:05:26 +00:00
Jeremy Allison
0492effcf3 Ignore unmappable (NT Authority, BUILTIN etc.) SIDs in an ACL set.
Jeremy.
(This used to be commit bc7963bd64)
2001-09-22 06:45:24 +00:00
Simo Sorce
61b2794968 move to SAFE_FREE()
(This used to be commit a95943fde0)
2001-09-17 11:25:41 +00:00
Jeremy Allison
84cca75739 Don't fail if no owner/group owner set. Use existing owners.
Jeremy.
(This used to be commit 9961c4c1a3)
2001-09-07 20:08:16 +00:00
Herb Lewis
e555b969b2 if no ACL elements then use chmod - fixes ability to set read-only bit
on files that do not have an ACL
(This used to be commit 65ea13420c)
2001-08-30 18:56:35 +00:00
Jeremy Allison
08138a3244 Fix from Michael Davidson <md@caldera.com> for DEC OSF/1 ACLs (ie.
Digital UNIX).
Jeremy.
(This used to be commit 324ba0512e)
2001-07-26 21:16:39 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
2f99c0e602 lib/util_getent.c: removed debug code.
smbd/posix_acls.c: Attempt to fix the "lose default acl" problem in Solaris.
Needs testing.
lib/sysacls.c: Typo fix.
Jeremy.
(This used to be commit d989f8bd3e)
2001-06-12 01:49:30 +00:00
Jeremy Allison
f63ee18c68 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
(This used to be commit 1b3977c536)
2001-06-09 01:38:54 +00:00
Jeremy Allison
6e41b74e6d 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.
(This used to be commit aba243ca08)
2001-05-10 19:27:00 +00:00
Jeremy Allison
f5243954fa Made "security XXX" masks apply to ACL set. By default they have no effect.
Removed "restrict acl with mask" - redundent.
Jeremy.
(This used to be commit 0db8a61d71)
2001-05-10 01:03:44 +00:00
Jeremy Allison
1cebd0fe98 Fix for bad profile perms. Ensure r on files and rwx on directories.
Jeremy.
(This used to be commit f100e091ab)
2001-05-07 21:17:42 +00:00
Jeremy Allison
548d16869a 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.
(This used to be commit 7792e32ba7)
2001-05-03 19:47:30 +00:00
Jeremy Allison
38959a2105 Tidy up args to DEBUG Statements - found by gcc on Solaris.
Jeremy.
(This used to be commit a60ecb4e53)
2001-04-27 21:14:18 +00:00
Jeremy Allison
95559fe994 Sync with default perm changes in 2.2.
Jeremy.
(This used to be commit f02e67a096)
2001-04-25 23:25:58 +00:00
Jeremy Allison
9444e9d9f3 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.
(This used to be commit 5870e6019b)
2001-04-13 21:11:57 +00:00
Jeremy Allison
94f0c652fe Fixed extern ref typo for file generic perms. 2am coding strikes again :-).
Jeremy.
(This used to be commit fe38692643)
2001-03-30 18:07:43 +00:00
Jeremy Allison
6e7f03f9b9 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.
(This used to be commit 51987684bd)
2001-03-30 08:57:24 +00:00
Jeremy Allison
a6d350881c 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.
(This used to be commit 4fa8cf68c3)
2001-03-28 01:33:57 +00:00
Jeremy Allison
e670b3564c 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.
(This used to be commit 641ada44ae)
2001-03-26 19:18:06 +00:00
Jeremy Allison
162218259f 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.
(This used to be commit 83f52394e6)
2001-03-26 05:43:04 +00:00
Jeremy Allison
cd4fea0098 More unused variables.
Jeremy.
(This used to be commit 38b19fad28)
2001-03-23 20:41:22 +00:00
Jeremy Allison
da8805b377 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.
(This used to be commit 29414fe0d6)
2001-03-23 02:14:08 +00:00
Jeremy Allison
81afba28c3 Sync up with 2.2 ACL code.
Jeremy.
(This used to be commit 5b9a88c2d0)
2001-03-23 00:54:55 +00:00
Jeremy Allison
8adfb4757c New POSIX ACL mapping code. Works with UNIX permissions, now for testing
with real ACLs...
Jeremy.
(This used to be commit 852b9e15ac)
2001-03-22 01:26:37 +00:00
Jeremy Allison
0dfc30cf87 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.
(This used to be commit af364b93d9)
2001-03-17 03:36:38 +00:00
Jeremy Allison
70c812e6ae I'm happy with the mapping for NT getACL, now for NT setACL.
Jeremy.
(This used to be commit 7b97ac289e)
2001-03-17 02:06:16 +00:00
Jeremy Allison
a8d396f25e Tidyup return of zero-permissions (map to ACE_DENIED, GENERIC_ALL, Everyone).
Jeremy.
(This used to be commit 0d6c7dedd2)
2001-03-15 04:34:53 +00:00
Jeremy Allison
ae728ea761 Last tweak (I promise :-). Fallback to returning our SID if we're a domain
member but can't get the domain sid.
Jeremy.
(This used to be commit 45e96777d0)
2001-03-15 03:19:01 +00:00
Jeremy Allison
da3053048c 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.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
Jeremy Allison
0f2799aaf1 Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree.
Jeremy.
(This used to be commit 14d5997dc8)
2001-02-28 00:51:02 +00:00
Jeremy Allison
62dc55a432 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.
(This used to be commit 3ded1e6bd5)
2001-02-16 00:24:43 +00:00
Jeremy Allison
94fc44a93c Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
(This used to be commit c0517d6f4e)
2001-02-12 16:18:02 +00:00
Jeremy Allison
b15e9adea1 Sync up with POSIX ACL code from 2.2.
Jeremy.
(This used to be commit e0431672cc)
2001-01-24 21:54:44 +00:00
Jeremy Allison
2f7c1db093 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.
(This used to be commit 2844ec3d51)
2001-01-23 01:52:30 +00:00