summaryrefslogtreecommitdiff
path: root/source3/client
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison3-13/+6
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-10r13714: Set MOUNT_CIFS_VENDOR_SUFFIX if _SAMBA_BUILD_ is set toLars Müller2-4/+22
"-"SAMBA_VERSION_OFFICIAL_STRING"-"SAMBA_VERSION_VENDOR_SUFFIX if SAMBA_VERSION_VENDOR_SUFFIX is set or "-"SAMBA_VERSION_OFFICIAL_STRING only if MOUNT_CIFS_VENDOR_SUFFIX is undefined. This results in: mount.cifs -V mount.cifs version: 1.10-3.1.2pre1-SVN-build-13706-foovendor or mount.cifs version: 1.10-3.1.2pre1-SVN-build-13706 Steve: If this is to long or you do not like it, we might add something lile -VV to report the added part. (This used to be commit 3c277c7a3cce14f185db7fede7c0c4ab77769670)
2007-10-10r13697: Remove unneeded header (header not present on all Linux either) for ↵Steve French1-1/+0
umount.cifs.c (This used to be commit d294b28f1c9ed931efe29ebce1c8847215fc03dc)
2007-10-10r13612: #define NO_SYSLOG is dead as a doornail.Tim Potter1-2/+0
(This used to be commit 1d23067e68f914ffb42374532b6454a0aaa7c657)
2007-10-10r13535: Fix #2353 based on a patch by William Jojo.Jeremy Allison1-3/+4
Jeremy. (This used to be commit fe63a6ee06149195032320dd0fb9b6c7dfb460d3)
2007-10-10r13486: Two more -- fix bug 3503Volker Lendecke1-0/+2
(This used to be commit 62b02a68438e0ff1119e68347b1ac3495572fa8a)
2007-10-10r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500Derrell Lipman4-4/+4
lp_load() could not be called multiple times to modify parameter settings based on reading from multiple configuration settings. Each time, it initialized all of the settings back to their defaults before reading the specified configuration file. This patch adds a parameter to lp_load() specifying whether the settings should be initialized. It does, however, still force the settings to be initialized the first time, even if the request was to not initialize them. (Not doing so could wreak havoc due to uninitialized values.) (This used to be commit f2a24de769d1b2266e576597c57a8e3b1e2a2b51)
2007-10-10r12912: patch from Tony Mountifield <tony@softins.co.uk> for BUG 3327 (fix ↵Gerald Carter1-0/+3
bad access to gencache.tdb after fork() in smbmount (This used to be commit 68399ce04ca4509d51950d2d7b1ed817e82bf17c)
2007-10-10r12555: Fix more load_case_table swegfaults. Arggg.Jeremy Allison1-0/+1
What I'd give for a global constructor... Jeremy. (This used to be commit c970d7d0a5ba225465dfb0980989b8817b17c643)
2007-10-10r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")Jeremy Allison1-1/+1
and replace calls to isupper/islower/toupper/tolower with ASCII equivalents (mapping into _w variants). Jeremy. (This used to be commit c2752347eb2deeb2798c580ec7fc751a847717e9)
2007-10-10r12045: More warning fixes... Just a few more to go.Jeremy Allison1-0/+2
Jeremy. (This used to be commit cd192ed79a531c6775cdbfb35f0eb2e0fa230ce9)
2007-10-10r12015: When smbspool tries to connect to a printer shared on a standaloneGünther Deschner1-1/+14
Windows XP box, smbspool has to mimic smbclient behaviour and also send a password-less NTLMSSP session setup. Guenther (This used to be commit 1136862e6d6058df4ed027b75dbae40374712bac)
2007-10-10r11978: Volker's fix for #3292 (smbclient spins if server terminatesJeremy Allison1-1/+5
connection). Jeremy. (This used to be commit 9b8602e0551500916a9d79c317589cd82d3da111)
2007-10-10r11976: (Slightly modified) Volker fix for #3293. Use SMBecho instead ofJeremy Allison1-1/+6
chkpath to keep a connection alive. Jeremy. (This used to be commit f1c88de7a28942b6aaa634551dde7a8af91f4de3)
2007-10-10r11938: Fix cifs to handle non-numeric uid and gid parameters and merge ↵Steve French1-42/+122
trunk and SAMBA_3 versions of mount.cifs and cleanup cifs vfs help. Modified version of patch from Olaf Kirch <okir at SuSE dot de> for Novell Bug 120601 (This used to be commit 0981552deab9f73d2f784e5da52878ffdf845031)
2007-10-10r11839: Info level 0x101 is really a protocol NT level.Jeremy Allison1-1/+1
Fix bug #3274 from Guenter Kukkukk <guenter.kukkukk@kukkukk.com> Jeremy. (This used to be commit e4b3b70ef1c0fea3252b73c55ea3e9cad7229afd)
2007-10-10r11790: Avoid infinite retry to gather a connection.Günther Deschner1-3/+11
Guenther (This used to be commit 7b6195b421b6c572d82d00b9a11bcf8579456c21)
2007-10-10r11770: BUG 2718: don't use qpathinfo_basic() call when remote server is ↵Gerald Carter1-2/+3
Win9x or the do_cd() call will fail (This used to be commit be31c2a105ae2b6e655530190c939caae1b41294)
2007-10-10r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison3-6/+6
of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)
2007-10-10r10964: BUG 1051: store the directory path so we can send the full name in ↵Gerald Carter1-2/+9
the unlink call (del tmp\foo) (This used to be commit 49b8d7d7f5ed93a2b9b21404194452f35bcf7b26)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter2-26/+15
* \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-10r10590: merging lost fix from the release branchGerald Carter1-0/+2
(This used to be commit c2a018bf1f4bf196db0ad80c713764e435de3914)
2007-10-10r10554: * BUG 3057: assume x64 drivers are v3 driversGerald Carter1-6/+6
* BUG 3087: allow smbspool to establisha geust connection using a username with no password (This used to be commit 39369c8041e0633e88c30e0c62530c2393ef80f6)
2007-10-10r10176: adding smbctool from Kalim's SoC project; requires make bin/smbctoolGerald Carter1-0/+3746
(This used to be commit 79fcc3bb7b955da5eb1b2af475aa6ef7694a7157)
2007-10-10r9736: be a little more verbose on error.Günther Deschner1-5/+5
Guenther (This used to be commit 48cb0638b598be391e69695c63a19814084658ca)
2007-10-10r9545: (Hopefully the last) fixes for DIR -> SMB_STRUCT_DIR.Jeremy Allison2-7/+9
Jeremy. (This used to be commit b242f278601e1a23c9116009482e802326d418f7)
2007-10-10r9401: Allow disabling mandatory byte range lock mount flag, andSteve French1-2/+2
fix corresponding entry in mtab. (This used to be commit e5cb7d2131b7c6963f00a8a329bf589dd78e09ce)
2007-10-10r9225: Various minor CIFS mount helper fixes to less common error paths.Steve French1-6/+18
These bugs were found by Coverity static source code analysis tools. (This used to be commit 98a7304b6be4672f6b29e4a9406e63ccb842381c)
2007-10-10r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore.Tim Potter3-6/+0
(This used to be commit 985dbb47d925e79c1195ca219f7ab5d6648b22b8)
2007-10-10r8478: remove unused printmode command from smbclient (noticed by ↵Gerald Carter1-40/+0
kalim@samba.org) (This used to be commit aa5de7d0b35b07dfb32aa43df00f73de80de9fdd)
2007-10-10r7879: fix compile issue caused by not statoc value for intializing cpp macrosGerald Carter1-2/+2
(This used to be commit 9af07b243005db76b6490856b4e0bbc4a8af0dba)
2007-10-10r7835: Add the forgotten GPL header. This source code file is distributed ↵Volker Lendecke1-0/+14
with Samba and interfaces to the Linux kernel (both GPL programs), so it was always our (Paal-Kr. Engstad and Volker Lendecke) intent that this program is covered by the GPL. Volker (This used to be commit 72bc9de68646a8a9a4787d6681524f1a77cf2cdf)
2007-10-10r7202: lock mtab when updating it during umount.cifs, also delete only one ↵Steve French1-17/+63
matching entry at a time (This used to be commit 200db0790a7380e9a68fde391fd09c82da51f52e)
2007-10-10r7139: trying to reduce the number of diffs between trunk and 3.0; changing ↵Gerald Carter1-2/+2
version to 3.0.20pre1 (This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
2007-10-10r6685: smbclient fixesGerald Carter1-3/+16
* BUG 2680: copy files from an MSDFS win2k root share * BUG 2688: re-implement support for the -P (--port) option * support connecting to an 'msdfs proxy' share on a Samba server (This used to be commit 9e3e473632fee669eda477d8cbe309b7109552ea)
2007-10-10r6684: BUG 1780: patch from Rodrigo Fernandez-Vizarra ↵Gerald Carter1-21/+203
<Rodrigo.Fernandez-Vizarra@Sun.COM> to add kerberos supsport to smbspool (This used to be commit 3abffdf3ad0fd2b4043bfb3d4cf9891393c9059e)
2007-10-10r6634: merge smbmount malloc checker fixes from trunkGerald Carter2-0/+4
(This used to be commit ca678b9690c9487af7004c09e696ba0f11121683)
2007-10-10r6514: Allow domain= to be specified in credentials file. Fix umount.cifs ↵Steve French2-6/+40
help, allow root to unmount someone else's mount (This used to be commit ed27740397817c1f1b14ba187139c877dbf22168)
2007-10-10r6505: Add missing remount flag handlingSteve French1-0/+2
(This used to be commit 37685979bb4075a42018b89f3aee230fead5a7a4)
2007-10-10r6499: Add two newer mount options to syntax help for mount.cifsSteve French1-1/+1
(This used to be commit 2ed6b5ecab1c4d503207615d576b4520dfc15451)
2007-10-10r6482: Add support so umount.cifs can update mtabSteve French1-45/+80
(This used to be commit 66ec66ed1b9ac8ec2db12f3afecf4031a621eca6)
2007-10-10r6388: BUG 2626: ensure that the calling_name is set to something after ↵Gerald Carter1-0/+2
parsing smb.conf (if not set via -n) (This used to be commit 97c68ec1e86c1de44fa1ab6e5a9d7f58b2843a34)
2007-10-10r6349: Update cifs umount utilitySteve French1-8/+22
(This used to be commit c3030229512455657d86f5e8f01ece03047b0abb)
2007-10-10r6348: Fix for bug #2605 reported by Daniel Patterson ↵Jeremy Allison1-6/+21
<Daniel_Patterson@national.com.au>. Ensure smbclient doesn't perform commands if the "chdir" fails in a scripted set. Jeremy. (This used to be commit 644608ea7db6d8d73a8c028a82cd0767ffe32af6)
2007-10-10r6291: BUG 2588: force smbclient messages to port 139 unless someone set the ↵Gerald Carter1-1/+6
-p option (This used to be commit 40f573e202096088957bfff8ca2eb49f5b4985bd)
2007-10-10r6262: Minor updates to cifs umount helperSteve French1-4/+11
(This used to be commit cd8b93edc6d488ab6f6652ef533ce13e885b265b)
2007-10-10r6255: Initial checkin of cifs umount utilitySteve French1-0/+266
(This used to be commit 8f7c36a6c442ce5030be546b761f807fd2fa8087)
2007-10-10r6225: get rid of warnings from my compiler about nested externsHerb Lewis2-4/+4
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10r6149: Fixes bugs #2498 and 2484.Derrell Lipman1-2/+2
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-10r6120: Added "volume" command to smbclient that prints out the volume name andJeremy Allison1-0/+20
serial number. Jeremy. (This used to be commit c69623072e4112a4719867ea4809f5145b3cb64c)