summaryrefslogtreecommitdiff
path: root/source3/modules
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-5/+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-10r13384: Adding in some more SuSE patchesGerald Carter2-0/+2
* uninitialized-variables.diff * samba-smbadduser.diff * samba-implicit_decl.patch (This used to be commit 064338c6f5644d1ceddf341d4ba5619a3d68ffa7)
2007-10-10r13293: Rather a big patch I'm afraid, but this should fix bug #3347Jeremy Allison1-4/+4
by saving the UNIX token used to set a delete on close flag, and using it when doing the delete. libsmbsharemodes.so still needs updating to cope with this change. Samba4 torture tests to follow. Jeremy. (This used to be commit 23f16cbc2e8cde97c486831e26bcafd4ab4a9654)
2007-10-10r13224: better to cast the return tooSimo Sorce1-1/+1
(This used to be commit c068df483f44a23ad813acd10d583be863128382)
2007-10-10r13222: Never assume mode_t is of type int.Simo Sorce1-2/+2
We were trashing the stack on machines that define mode_t as uint16_t (This used to be commit 6c15af31bcee1e82578b61cae10423b37c285f10)
2007-10-10r13028: Fix for #3419 - vfs_full_audit *never* workedJeremy Allison1-20/+64
correctly. Static variables were used ! Jeremy. (This used to be commit 2ab5aeca895476869f0b50e513a77c9f2558fc56)
2007-10-10r12279: unix_mask_match has been broken for *ever*... (How).Jeremy Allison1-1/+1
Ensure it returns a BOOL. Jerry (and anyone else) please check this, I think all uses are now correct but could do with another set of eyes. Essential for 3.0.21 release. Jeremy. (This used to be commit 0c7b8a7637e760fcb6629092f36b610b8c71f5c9)
2007-10-10r12051: Merge across the lookup_name and lookup_sid work. Lets see how the ↵Volker Lendecke1-27/+8
build farm reacts :-) Volker (This used to be commit 9f99d04a54588cd9d1a1ab163ebb304437f932f7)
2007-10-10r11585: Implement the possibility to have AFS users as SIDs in pts.Volker Lendecke1-0/+24
Volker (This used to be commit 5b1b72ce7b944c7515a605369cb55a2f0171fe6f)
2007-10-10r11232: Added ab's POSIX statvfs vfs call. Sorry for the delay ab.Jeremy Allison1-0/+21
Jeremy. (This used to be commit af8545806770a7530eecc184bdd230ca14999884)
2007-10-10r10819: merging a couple of fixes from trunkGerald Carter1-0/+132
* only keep the registry,tdb file open when we have an open key handle * tpot's setup.py fix * removing files that no longer exist in trunk and copying some that were missing in 3.0 (This used to be commit 6c6bf6ca5fd430a7a20bf20ed08050328660e570)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-1/+1
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r10619: Allow syslog facility and priority to be set viaDeryck Hodge3-34/+99
smb.conf for audit modules. Facility may be set to USER or LOCAL0-LOCAL7. Any of the syslog priority settings may be used. smb.conf will look like: audit:facility = LOCAL5 audit:priority = INFO (Or full_audit:facility, or whatever audit module is used.) deryck (This used to be commit c619ee38f0aee43de571524c8ef3bf6b27b30e74)
2007-10-10r10239: Fix cut&paste errorVolker Lendecke1-1/+1
(This used to be commit e076453cf38b17cae07a1292713cd93d35890fbd)
2007-10-10r10106: Fix typos. Oops, more fixes.John Terpstra1-6/+6
(This used to be commit 80952a7edab50315c3a17744683a8cb378eec8ae)
2007-10-10r10105: Fix typos. Oops, modules are called objects.John Terpstra1-2/+2
(This used to be commit 4cf1a2ee719291951774476e2768b06558d7e0aa)
2007-10-10r10061: add some description to the default_quota moduleStefan Metzmacher1-0/+50
jht: can you merge that to the howto, please? metze (This used to be commit 48c5c760afd77f86778b96925486d1b21e332a61)
2007-10-10r9483: Changed DIR to SMB_STRUCT_DIR because of the amazing stupidity of a ↵Jeremy Allison7-37/+37
UNIX vendor not understanding abstract data types :-(. Jeremy. (This used to be commit be5b4e2fa3ed30b0ff01b47d2354e5f782a12e25)
2007-10-10r8366: Root-level files don't have a slash, but acls need to be settable onVolker Lendecke1-4/+6
them. Thanks to Brent Trotter for reminding me to commit this :-) Volker (This used to be commit dfa9eef7b6892ceb0e67b0c4bfb56431ead1ac3d)
2007-10-10r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison1-2/+2
tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy. (This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb)
2007-10-10r8029: Fix bug 2841. Thanks to Brett Trotter.Volker Lendecke1-5/+5
Volker (This used to be commit 2588dd7a272830bfda4e8ffa7d1114af506e36be)
2007-10-10r7963: Add aio support to 3.0.Jeremy Allison1-0/+108
Jeremy. (This used to be commit 1de27da47051af08790317f5b48b02719d6b9934)
2007-10-10r7904: Fix a memleak in vfs_afsaclVolker Lendecke1-1/+1
(This used to be commit 8fad08db742ea32a3cda3b3d9421454837e2d2a5)
2007-10-10r7902: Fix the buildVolker Lendecke1-3/+3
(This used to be commit 6d431eb676e1df4cfdcbeaed5fa81adfbfc77325)
2007-10-10r7893: Add in the extra parameters to opendir() to fix the large ↵Jeremy Allison7-19/+19
directory/insane app problem. Rev vfs version. Doesn't change the normal codepath. Jeremy. (This used to be commit 0f03a6bdcdbdf60da81e0aeffa84ac6e48fc6a04)
2007-10-10r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison5-21/+21
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10r7807: Allow to touch mtime in vfs-recycle withGünther Deschner1-5/+16
recycle:touch_mtime = true Guenther (This used to be commit fa8e2c4b04786a77356bb4e310d59d7475d8bd87)
2007-10-10r7544: Fix for bug #2196 from Denis Sbragion <d.sbragion@infotecna.it>.Jeremy Allison1-3/+8
Allow absolute path (system wide) recycle bin. Jeremy. (This used to be commit 451fbbf1d603cb99b0c9f0d39de9ad71a6a12833)
2007-10-10r7542: Patch from Renaud Duhaut <rd@duhaut.com> for a parameterJeremy Allison1-1/+18
"directory_mode" when creating recycle directories. Bug #1040. Jeremy. (This used to be commit 1c94cbd72d93ff8f17d6e1971ff984fa9581f1ce)
2007-10-10r7541: Patch from core@road-star.jp for bug #2792. Ensure the shadow copyJeremy Allison1-0/+24
module hooks seekdir, telldir, rewinddir to match updated large directory code. Jeremy. (This used to be commit 0cdc62b60b6152cb67e517d70f4e4681dca8f4df)
2007-10-10r7139: trying to reduce the number of diffs between trunk and 3.0; changing ↵Gerald Carter3-10/+12
version to 3.0.20pre1 (This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
2007-10-10r6777: Fix vfs_full_audit.c after jra's change.Volker Lendecke1-0/+8
Volker (This used to be commit 16af4645822f1b3cf39c6dffbbb8ef6b1c9d7751)
2007-10-10r6225: get rid of warnings from my compiler about nested externsHerb Lewis1-4/+2
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10r6149: Fixes bugs #2498 and 2484.Derrell Lipman3-12/+10
1. using smbc_getxattr() et al, one may now request all access control entities in the ACL without getting all other NT attributes. 2. added the ability to exclude specified attributes from the result set provided by smbc_getxattr() et al, when requesting all attributes, all NT attributes, or all DOS attributes. 3. eliminated all compiler warnings, including when --enable-developer compiler flags are in use. removed -Wcast-qual flag from list, as that is specifically to force warnings in the case of casting away qualifiers. Note: In the process of eliminating compiler warnings, a few nasties were discovered. In the file libads/sasl.c, PRIVATE kerberos interfaces are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED kerberos interfaces are being used. Someone who knows kerberos should look at these and determine if there is an alternate method of accomplishing the task. (This used to be commit 994694f7f26da5099f071e1381271a70407f33bb)
2007-10-10r5880: From the comment....Volker Lendecke1-0/+317
* Implement a fixed mapping of forbidden NT characters in filenames that are * used a lot by the CAD package Catia. * * Yes, this a BAD BAD UGLY INCOMPLETE hack, but it helps quite some people * out there. Catia V4 on AIX uses characters like "<*$ a *lot*, all forbidden * under Windows... Volker (This used to be commit 8c0148df81d762853ed5c85bcf7c79d691f9b8ef)
2007-10-10r5820: Fix bug #2451 - missing functions in full audit vfs module.Jeremy Allison1-2/+21
Jeremy. (This used to be commit dc6fbc0268b79c5d53319d77e14a59f158cfd55d)
2007-10-10r4864: Remove unused var.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 9fd5d633e65e00a44ba0136ee91170edcecfae24)
2007-10-10r4738: Fix for bug #2238 - memory leak in shadow copy vfs.Jeremy Allison1-0/+1
Jeremy. (This used to be commit fb7f1aff7c96e4672641f80b74a058abf25d0d6d)
2007-10-10r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).Jeremy Allison1-3/+3
Jeremy (This used to be commit efc1b688cf9b1a17f1a6bf46d481280ed8bd0c46)
2007-10-10r4251: AFS does not cope with spaces in file names. Implement a stupid ↵Volker Lendecke1-2/+32
mapping that maps the space to another character choosable by afsacl:space. Volker P.S: Who is "OH"? ;-) (This used to be commit e717ff70c6ce15bad7a792a592b42ecd057acc01)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison3-12/+11
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r3987: Use sys_readdir() instead of readdir()Jelmer Vernooij1-1/+1
(This used to be commit 7751f46cc77887cd050b44eebb28909a871d4f6b)
2007-10-10r3985: Fix bug with 64bit fs supportJelmer Vernooij1-1/+1
(This used to be commit 5cee4e94786c6fd63dab1a9805914a9ce6aa7227)
2007-10-10r3839: Some more specific NT security descriptors we've come across. Map them toVolker Lendecke1-2/+13
defined AFS acls. Thanks to Horst Birthelmer. Volker (This used to be commit fea467657d5b4f67040c8fe3e89b3b20e10c6c68)
2007-10-10r3671: More warning fixes from Rob Foehl <rwf@loonybin.net>.Jeremy Allison2-8/+8
Jeremy. (This used to be commit 3850f142c174034397451de8457564b9604113c5)
2007-10-10r3670: Warning fixes from Rob Foehl <rwf@loonybin.net>.Jeremy Allison1-2/+44
Jeremy. (This used to be commit 54da75ca4cc27dfb0012fd17047702ec2f39cae9)
2007-10-10r3662: Fix dirent return.Jeremy Allison1-1/+1
Jeremy. (This used to be commit da4117841db731da8f1b7fe7c2524e9d4d60f09a)
2007-10-10r2133: Several fixes:Gerald Carter1-234/+234
* BUG 1627: fix for NIS compiles on HPUX 11.00, AIX 4.3 and 5.1 patch from Olaf Flebbe <o.flebbe@science-computing.de>. Will need to watch this one in the build farm. * Fix bug found by rwf@loonybin.net where the PRINT_ATTRIBUTE_PUBLISHED was getting reset by attempts to sanitize the defined attributes (PRINTER_ATTRIBUTE_SAMBA) * Resolve name conflict on DEC OSF-5.1 (inspired by patch from Adharsh Praveen <rprav@india.hp.com>) * Work around parsing error in the print change notify code (not that the alignment bug is still there but reording the entries in the array works around it). * remove duplicate declaration of getprintprocdir from rpcclient. (This used to be commit 7474c6a446037f3ca2546cb6984d800bfc524029)
2007-10-10r2114: Shameless theft of iconv commit from Samba4 to keep the two libs more ↵Jeremy Allison1-2/+2
in sync :-). try to cope with a wider range of UTF-16 characters when we are using an external libiconv library. Jeremy. (This used to be commit 5d04cd6804f6fc3b556e7c3b53fa0d7af39797c1)
2007-10-10r1853: Improved NT->AFS ACL mapping.Volker Lendecke1-54/+316
Jerry, this is a really localized patch that I've been using at a customer site for quite a while, I'd like to get that into 3.0.6. Thanks, Volker (This used to be commit e7d7dc94eb452467725fea7f1ebc941bdb07573d)