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

53 Commits

Author SHA1 Message Date
Michael Adam
5921607f26 Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD().
Michael
(This used to be commit 9296e93588)
2008-01-08 01:54:19 +01:00
Michael Adam
62e9d503d8 Remove redundant parameter fd from SMB_VFS_SYS_ACL_GET_FD().
Michael
(This used to be commit 42663e8736)
2008-01-07 23:54:07 +01:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
b93126ea12 r21953: One format fix, clarify a condition that the IBM
checker was worried about.
Jeremy.
(This used to be commit 70eec7b8ae)
2007-10-10 12:18:52 -05:00
Volker Lendecke
b540e4dc84 r18016: OpenBSD apparently does not have ENOTSUP
(This used to be commit 8e087b7e46)
2007-10-10 11:39:49 -05:00
Volker Lendecke
25a685b71a r17804: Fix a enum/int mixup found by the IRIX compiler.
Volker
(This used to be commit 3a1cf62376)
2007-10-10 11:38:49 -05:00
Volker Lendecke
1cf1e648fe r17334: Some C++ warnings
(This used to be commit 8ae7ed1f3c)
2007-10-10 11:38:26 -05:00
Jim McDonough
ba72b0242e r17179: Merge the vl-posixacls tmp branch into mainline. It
modularizes our interface into the special posix API used on
the system. Without this patch the specific API flavor is
determined at compile time, something which severely limits
usability on systems with more than one file system. Our
first targets are AIX with its JFS and JFS2 APIs, at a later
stage also GPFS. But it's certainly not limited to IBM
stuff, this abstraction is also necessary for anything that
copes with NFSv4 ACLs. For this we will check in handling
very soon.

Major contributions can be found in the copyright notices as
well as the checkin log of the vl-posixacls branch. The
final merge to 3_0 post-3.0.23 was done by Peter Somogyi
<psomogyi@gamax.hu>
(This used to be commit ca0c73f281)
2007-10-10 11:38:17 -05:00
Gerald Carter
26443e8c0b r15525: fix compile error on HP-UX reported by Ryan Novosielski
(This used to be commit e439660f91)
2007-10-10 11:16:56 -05:00
Jeremy Allison
894358a8f3 r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.

The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :

 tmp = realloc(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :

 p = realloc(p, size)
 if (!p) {
    return error;
 }

which will leak the memory pointed to by p on realloc fail.

This commit (hopefully) fixes all these cases by moving to
a standard idiom of :

 p = SMB_REALLOC(p, size)
 if (!p) {
    return error;
 }

Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.

For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :

 tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).

It remains to be seen what this will do to our Coverity bug count :-).

Jeremy.
(This used to be commit 1d710d06a2)
2007-10-10 11:10:59 -05:00
Jeremy Allison
f4c9a4bc44 r5789: Patch from William Jojo <jojowil@hvcc.edu> - AIX has no default ACLs.
Bug #2445.
Jeremy.
(This used to be commit c9b5e32650)
2007-10-10 10:56:00 -05:00
Jeremy Allison
99f0355eb5 r4305: Fix from Albert Chin (china@thewrittenword.com) to fix the
earlier malloc changes.
Jeremy.
(This used to be commit da7ef25171)
2007-10-10 10:53:43 -05:00
Jeremy Allison
b46913fb95 r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).
Jeremy
(This used to be commit efc1b688cf)
2007-10-10 10:53:42 -05:00
Jeremy Allison
ecd1b0fffd r3693: Correctly detect errno for no acl/ea support.
Jeremy
(This used to be commit 089a76f611)
2007-10-10 10:53:14 -05: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
a2b95edf7f dos2unix not used in HEAD anymore.
Jeremy.
(This used to be commit d2af6382b4)
2002-03-04 18:06:54 +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
Jeremy Allison
ce1b141ec0 Added HPUX ACL code.
Jeremy.
(This used to be commit 6d03184f8c)
2001-12-15 02:40:16 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
484a7c0341 move to SAFE_FREE()
(This used to be commit 60e907b7e8)
2001-09-17 02:19:44 +00:00
Jeremy Allison
16afd6d2bc Added Mike Davidsons Tru64 ACL patch.
Jeremy.
(This used to be commit 8c5e5f8c84)
2001-08-10 20:48:25 +00:00
Simo Sorce
2f844bf447 Change all realloc() statements to Realloc() (ecxept for tdb.c)
changed some code to exploit the fact that Realloc(NULL, size) == malloc(size)
fixed some possible mem leaks, or seg faults.

thanks to andreas moroder (mallocs not checked in client/client.c, client/smbumount.c)
(This used to be commit 7f33c01688)
2001-08-08 16:54:16 +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
809c025878 Added patches to remove Linux specific XFS ACLs. These are now handled by the
generic Linux ACL code.
rpc_server/srv_samr_nt.c: Don't delete a policy handle before it's created.
Jeremy.
(This used to be commit db5b82e53a)
2001-06-18 20:27:35 +00:00
Jeremy Allison
da9963e66b Fixed typo in Solaris and UnixWare ACLs.
Jeremy.
(This used to be commit bd750def13)
2001-06-09 03:10:27 +00:00
Jeremy Allison
c7b67c26e2 Herb's IRIX fix for deleting default ACLs.
Jeremy.
(This used to be commit 81b5a628d1)
2001-06-08 21:27:46 +00:00
Jeremy Allison
96686f8f55 AIX has no default acls.
Jeremy.
(This used to be commit 5853f1dc42)
2001-06-08 19:56:15 +00:00
Jeremy Allison
b7fb885b81 Added sys_acl_delete_def_file for UnixWare and Solaris from
Michael Davidson <michael_davidson@pacbell.net>.
Jeremy.
(This used to be commit 5668512ffa)
2001-06-08 19:55:47 +00:00
Jeremy Allison
a80a96b745 Added sys_acl_delete_def_file() - needed as part of NT ACL editing fix.
Will add changes for other supported ACL systems shortly (Herb, I may
need help with the IRIX one).
Jeremy.
(This used to be commit a8532b193d)
2001-06-08 19:29:57 +00:00
Jeremy Allison
8a1c2e0298 AIX ACLs donated by IBM.
Merge Andrew's fnmatch fix for WfW.
Jeremy.
(This used to be commit 1d4438f077)
2001-04-17 05:41:07 +00:00
Jeremy Allison
ed449b8ca7 Added POSIX_ACL support for *BSD. Patch from jedgar@fxp.org. Changed
a bit to use AC_TRY_LINK to ensure functions are available for link
instead of AC_TRY_COMPILE.
Jeremy.
(This used to be commit c236287463)
2001-04-14 19:46:28 +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
e5691d44a8 Merged John's changes.
Jeremy.
(This used to be commit add847778b)
2001-04-12 05:32:27 +00:00
Jeremy Allison
6578fd8742 To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke
XFS ACL code.
Jeremy.
(This used to be commit 9b32b8a8cf)
2001-04-11 23:19:08 +00:00
Jeremy Allison
91e97f9091 Changed the order of -kPIC and -kpic.
Added patch from Michael Davidson <md@sco.COM> for Solaris/Unixware ACLS.
Jeremy.
(This used to be commit 144a290681)
2001-04-11 02:02:45 +00:00
Jeremy Allison
45646e8818 Fix from Michael Davidson <md@sco.COM> to merge Solaris and UnixWare ACLs.
Jeremy.
(This used to be commit ffa800e980)
2001-04-05 20:52:02 +00:00
Jeremy Allison
a6d201a8d7 Added XFS ACLs on Linux. Code from John Trostel <jtrostel@connex.com>.
Jeremy.
(This used to be commit 0865366f6b)
2001-04-03 00:40:01 +00:00
Jeremy Allison
6c0c14a742 IRIX ACLs from Herb.
Jeremy.
(This used to be commit 2f2365e938)
2001-04-02 23:05:25 +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
5161c61bc7 Fixed a couple of getpwXX calls that were not going through the sys_getpwXX
cache.
Jeremy.
(This used to be commit a648935ae9)
2001-03-01 05:21:19 +00:00
Jeremy Allison
f93bb0801c rpc_client/cli_netlogon.c: Fixed incorrect printf.
Added Solaris ACL support.
Jeremy.
(This used to be commit f0d11b6997)
2001-02-25 00:24:54 +00:00
Jeremy Allison
fd46817f0b Excise snprintf -> slprintf.
srv_samr.c: duplicate gid fix.
srv_spoolss_nt.c: Merge of JF's work.
uid.c: Fix for returning names when a PDC.
Jeremy.
(This used to be commit d938ad6963)
2001-02-16 19:21:18 +00:00
Jeremy Allison
ddfac242e3 Patch to add UnixWare ACLs from Michael Davidson <md@sco.COM>. With some
small modifications, this code may also work on Solaris, as they are derived
from the same SVR4 codebase.
When the Samba Solaris box is up and running again I will test this.
Jeremy.
(This used to be commit f8db87b097)
2001-02-15 19:56:10 +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
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
Tim Potter
624431c98b Renamed parameters and variables called acl to the_acl as it conflicts
with a Solaris system call.
(This used to be commit 5e547ddcb5)
2000-12-14 05:38:05 +00:00
Jeremy Allison
c31211167b Added better configure test for POSIX ACLs. Fixed stupid typo in sysacls.c
Jeremy.
(This used to be commit da6ae57501)
2000-12-07 06:23:01 +00:00