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

54 Commits

Author SHA1 Message Date
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
Jeremy Allison
7786e07735 Fixes for POSIX ACLS. ACL merge code.
Jeremy.
(This used to be commit 180e4a9cd0)
2001-01-15 22:46:22 +00:00
Jeremy Allison
e870dd2988 Updated from 2.2.
Jeremy.
(This used to be commit 6fb5eb8b1e)
2001-01-15 19:02:57 +00:00
Jeremy Allison
cffc311b8a 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
(This used to be commit 523c919356)
2001-01-11 23:41:33 +00:00
Jeremy Allison
d7c7283463 First compiling version of code that sets NT ACLs as POSIX ACLs.
Now the debugging starts.... :-).
Jeremy.
(This used to be commit 2300ac79f5)
2001-01-11 22:37:59 +00:00
Jeremy Allison
0f95385d28 Split set_nt_acls into owner set (which uses chown) and permission set
(which currently uses chmod) in preparation for ACL creation.
Jeremy.
(This used to be commit 0f39895ab0)
2000-12-19 20:00:28 +00:00
Jeremy Allison
ed7ecca3aa Split the one sys_acl_free call into sys_acl_free_TYPE calls, to allow
easier wrapping of non-POSIX ACL interfaces.
Jeremy.
(This used to be commit 1a31b4eb08)
2000-12-19 18:41:51 +00:00
Jeremy Allison
667b4113a8 Fix typos in new group sid check.
Jeremy.
(This used to be commit c48e95297e)
2000-12-18 07:22:10 +00:00
Jeremy Allison
8372087800 Fixed chown/chgrp setting from smbcacls.
Jeremy.
(This used to be commit 43ca0d991c)
2000-12-16 00:34:58 +00:00
Jeremy Allison
423227d7ca 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.
(This used to be commit 6ae63e502e)
2000-12-07 05:38:01 +00:00
Jeremy Allison
70922b9bbe 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.
(This used to be commit 4339e20202)
2000-12-06 23:24:31 +00:00
Jeremy Allison
0293259eaa Make smbd/posix_acls.c use abstract interface.
include/smb_acls.h lib/sysacls.c: Added as interface definitions.
Jeremy.
(This used to be commit 8359375bba)
2000-12-06 02:32:48 +00:00
Jeremy Allison
b881a55dfd 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.
(This used to be commit b27cac7762)
2000-12-06 01:34:16 +00:00
Jeremy Allison
36390f7293 Code to read & return POSIX ACLs as NT ACLs. Close to test on Linux.
Jeremy.
(This used to be commit 52e9311bc2)
2000-12-01 00:32:25 +00:00