summaryrefslogtreecommitdiff
path: root/source3/lib/sysacls.c
AgeCommit message (Collapse)AuthorFilesLines
2012-08-15s3-sysacls: Remove sys_acl_free_qualifier() as it is a no-opAndrew Bartlett1-5/+0
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Aug 15 05:23:18 CEST 2012 on sn-devel-104
2012-08-15s3-sysacls: Remove sys_acl_free_acl() and replace with TALLOC_FREE()Andrew Bartlett1-6/+0
2012-08-15s3-smbd: Change allocation of smb_acl_t to talloc()Andrew Bartlett1-10/+9
The acl element is changed to be a talloc child, and is no longer one element longer than requested by virtue of the acl[1] base pointer. This also avoids one of the few remaining cases of over-allocation of a structure. Andrew Bartlett
2012-05-09s3-lib/sysacls: Do not include an embedded \0 between ACL entries in ↵Andrew Bartlett1-2/+3
sys_acl_to_text() This makes it possible to print the entire string again. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed May 9 06:07:06 CEST 2012 on sn-devel-104
2012-05-09s3-lib: Add const to sys_acl_to_textAndrew Bartlett1-1/+1
2012-05-09s3-lib: Fix indentation in sys_acl_to_text()Andrew Bartlett1-2/+2
2011-04-14s3-includes: only include acl prototypes when needed.Günther Deschner1-0/+20
Guenther
2011-03-30s3-includes: only include system/passwd.h when needed.Günther Deschner1-0/+1
Guenther
2008-01-08Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD().Michael Adam1-14/+14
Michael (This used to be commit 9296e93588c0e795cae770765050247ac1474a74)
2008-01-07Remove redundant parameter fd from SMB_VFS_SYS_ACL_GET_FD().Michael Adam1-13/+13
Michael (This used to be commit 42663e8736e1a3dfb57e0aafdcbf5fec880da779)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r21953: One format fix, clarify a condition that the IBMJeremy Allison1-1/+1
checker was worried about. Jeremy. (This used to be commit 70eec7b8ae6a4992b43df853dffc21dd91498390)
2007-10-10r18016: OpenBSD apparently does not have ENOTSUPVolker Lendecke1-0/+20
(This used to be commit 8e087b7e462aaa14e3918cdfe125f8375d4d5fd8)
2007-10-10r17804: Fix a enum/int mixup found by the IRIX compiler.Volker Lendecke1-1/+1
Volker (This used to be commit 3a1cf623765cd8b6615ad317d25cebc379c762a2)
2007-10-10r17334: Some C++ warningsVolker Lendecke1-4/+5
(This used to be commit 8ae7ed1f3cecbb5285313d17b5f9511e2e622f0b)
2007-10-10r17179: Merge the vl-posixacls tmp branch into mainline. ItJim McDonough1-2768/+153
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 ca0c73f281a2a65a988094a46bb3e46a94011a53)
2007-10-10r15525: fix compile error on HP-UX reported by Ryan NovosielskiGerald Carter1-1/+0
(This used to be commit e439660f916050291107f699e32ba2872ba95fcf)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-9/+2
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 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r5789: Patch from William Jojo <jojowil@hvcc.edu> - AIX has no default ACLs.Jeremy Allison1-0/+7
Bug #2445. Jeremy. (This used to be commit c9b5e32650ef957841d488416922b948804474e2)
2007-10-10r4305: Fix from Albert Chin (china@thewrittenword.com) to fix theJeremy Allison1-5/+5
earlier malloc changes. Jeremy. (This used to be commit da7ef2517162740bc61a81ae814d48348aa513d5)
2007-10-10r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).Jeremy Allison1-31/+30
Jeremy (This used to be commit efc1b688cf9b1a17f1a6bf46d481280ed8bd0c46)
2007-10-10r3693: Correctly detect errno for no acl/ea support.Jeremy Allison1-0/+20
Jeremy (This used to be commit 089a76f611187e2ba4c3363b657905d04576109e)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-14/+2
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-03-04dos2unix not used in HEAD anymore.Jeremy Allison1-2/+2
Jeremy. (This used to be commit d2af6382b4de232299529c30f2a7a39ea9b38507)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-12-15Added HPUX ACL code.Jeremy Allison1-0/+957
Jeremy. (This used to be commit 6d03184f8c039ad81de47b5f3bde7dac5b2815ad)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-17move to SAFE_FREE()Simo Sorce1-35/+33
(This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
2001-08-10Added Mike Davidsons Tru64 ACL patch.Jeremy Allison1-13/+23
Jeremy. (This used to be commit 8c5e5f8c84cab4273ca28d6b5f543dd5d5b464fb)
2001-08-08Change all realloc() statements to Realloc() (ecxept for tdb.c)Simo Sorce1-1/+1
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 7f33c01688b825ab2fa9bbb2730bff4f2fa352be)
2001-07-26Fix from Michael Davidson <md@caldera.com> for DEC OSF/1 ACLs (ie.Jeremy Allison1-6/+152
Digital UNIX). Jeremy. (This used to be commit 324ba0512ec84bb173c72be3dfd2447e0dc30e26)
2001-07-04The big character set handling changeover!Andrew Tridgell1-1/+1
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 debb471267960e56005a741817ebd227ecfc512a)
2001-06-18Added patches to remove Linux specific XFS ACLs. These are now handled by theJeremy Allison1-219/+0
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 db5b82e53a7061c4764d39ceb3df82e706aad42f)
2001-06-09Fixed typo in Solaris and UnixWare ACLs.Jeremy Allison1-1/+1
Jeremy. (This used to be commit bd750def132d9a787728dc35c68df9166a15fbd7)
2001-06-08Herb's IRIX fix for deleting default ACLs.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 81b5a628d1471f71964b21817b9bec1ac80585c4)
2001-06-08AIX has no default acls.Jeremy Allison1-0/+6
Jeremy. (This used to be commit 5853f1dc423a25276dafe7f3d284db534bfb41ff)
2001-06-08Added sys_acl_delete_def_file for UnixWare and Solaris fromJeremy Allison1-19/+56
Michael Davidson <michael_davidson@pacbell.net>. Jeremy. (This used to be commit 5668512ffa608810be0622832c9dbc7a2fda5a8f)
2001-06-08Added sys_acl_delete_def_file() - needed as part of NT ACL editing fix.Jeremy Allison1-7/+19
Will add changes for other supported ACL systems shortly (Herb, I may need help with the IRIX one). Jeremy. (This used to be commit a8532b193d1fe123155a69dd70e433f8fc312bfc)
2001-04-17AIX ACLs donated by IBM.Jeremy Allison1-4/+883
Merge Andrew's fnmatch fix for WfW. Jeremy. (This used to be commit 1d4438f07745df3d02ed8ab3ef048e20016816b6)
2001-04-14Added POSIX_ACL support for *BSD. Patch from jedgar@fxp.org. ChangedJeremy Allison1-0/+9
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 c23628746342b6afa28cb34b0b4eaa61189ad390)
2001-04-13Michael Davidson <md@sco.COM> pointed out that acl_get_qualifier can potentiallyJeremy Allison1-0/+28
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 5870e6019b82d2088b99acdc0f84e9e4847a1fa5)
2001-04-12Merged John's changes.Jeremy Allison1-3/+3
Jeremy. (This used to be commit add847778bf458238bf2a1b14ab71b8cdfd7aec0)
2001-04-11To stop people complaining about the mktemp call, move it into lib/util.c. ↵Jeremy Allison1-1/+0
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 9b32b8a8cfc8ddb93c14d5581f433d2e93f89ed2)
2001-04-11Changed the order of -kPIC and -kpic.Jeremy Allison1-4/+6
Added patch from Michael Davidson <md@sco.COM> for Solaris/Unixware ACLS. Jeremy. (This used to be commit 144a2906810e8d4414d627835eb80f60bd1d88a4)
2001-04-05Fix from Michael Davidson <md@sco.COM> to merge Solaris and UnixWare ACLs.Jeremy Allison1-559/+52
Jeremy. (This used to be commit ffa800e980bfed3d82ec7b0a037085c4558f8f0f)
2001-04-03Added XFS ACLs on Linux. Code from John Trostel <jtrostel@connex.com>.Jeremy Allison1-0/+214
Jeremy. (This used to be commit 0865366f6b1070a8db3d8421c37c8072b36b96e3)
2001-04-02IRIX ACLs from Herb.Jeremy Allison1-0/+244
Jeremy. (This used to be commit 2f2365e93833e5f08dc14ab0022dd9f6f0d028ad)
2001-03-22New POSIX ACL mapping code. Works with UNIX permissions, now for testingJeremy Allison1-0/+20
with real ACLs... Jeremy. (This used to be commit 852b9e15ac245a593460cfff3f629d0333372e41)
2001-03-01Fixed a couple of getpwXX calls that were not going through the sys_getpwXXJeremy Allison1-2/+2
cache. Jeremy. (This used to be commit a648935ae93f781aedba8f89b0071a24e42f4543)