1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

695 Commits

Author SHA1 Message Date
Jeremy Allison
e5d6069cf8 r14176: Fix coverity bug #30. Ensure no possible null deref.
Jeremy.
2007-10-10 11:15:15 -05:00
Jeremy Allison
2ec461ae58 r14166: Fix const warning.
Jeremy.
2007-10-10 11:15:14 -05:00
Günther Deschner
7ec2b31a87 r14148: Removing the not very well tested krb5 ticket refresh handling activated
over --with-kcm. No time to look after it for the moment.

Guenther
2007-10-10 11:15:13 -05:00
Günther Deschner
977079a058 r14145: Add missing WITH_KCM hunks from my local tree.
Guenther
2007-10-10 11:15:13 -05:00
Steve French
33a1e26114 r14128: Remove warning generated by coverity scan tool (missing SAFE_FREE in error path) 2007-10-10 11:11:14 -05:00
Steve French
2ec51635ae r14127: Remove coverity warning on mount.cifs.c 2007-10-10 11:11:13 -05:00
Steve French
32c7243b80 r14126: resolve two warnings from the coverity scan 2007-10-10 11:11:13 -05:00
Jeremy Allison
af0ade470f r14009: Remove last const warning (have to use CONST_DISCARD).
Jeremy.
2007-10-10 11:11:05 -05:00
Jeremy Allison
ead13ca522 r14006: Fix a couple of irritating warnings.
Jeremy.
2007-10-10 11:11:04 -05:00
Jeremy Allison
1d710d06a2 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.
2007-10-10 11:10:59 -05:00
Lars Müller
3c277c7a3c r13714: Set MOUNT_CIFS_VENDOR_SUFFIX if _SAMBA_BUILD_ is set to
"-"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.
2007-10-10 11:10:50 -05:00
Steve French
d294b28f1c r13697: Remove unneeded header (header not present on all Linux either) for umount.cifs.c 2007-10-10 11:10:24 -05:00
Tim Potter
1d23067e68 r13612: #define NO_SYSLOG is dead as a doornail. 2007-10-10 11:10:19 -05:00
Jeremy Allison
fe63a6ee06 r13535: Fix #2353 based on a patch by William Jojo.
Jeremy.
2007-10-10 11:10:11 -05:00
Volker Lendecke
62b02a6843 r13486: Two more -- fix bug 3503 2007-10-10 11:10:05 -05:00
Derrell Lipman
f2a24de769 r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
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.)
2007-10-10 11:06:18 -05:00
Gerald Carter
68399ce04c r12912: patch from Tony Mountifield <tony@softins.co.uk> for BUG 3327 (fix bad access to gencache.tdb after fork() in smbmount 2007-10-10 11:06:06 -05:00
Jeremy Allison
c970d7d0a5 r12555: Fix more load_case_table swegfaults. Arggg.
What I'd give for a global constructor...
Jeremy.
2007-10-10 11:05:59 -05:00
Jeremy Allison
c2752347eb r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")
and replace calls to isupper/islower/toupper/tolower with
ASCII equivalents (mapping into _w variants).
Jeremy.
2007-10-10 11:05:58 -05:00
Jeremy Allison
cd192ed79a r12045: More warning fixes... Just a few more to go.
Jeremy.
2007-10-10 11:05:42 -05:00
Günther Deschner
1136862e6d r12015: When smbspool tries to connect to a printer shared on a standalone
Windows XP box, smbspool has to mimic smbclient behaviour and also send
a password-less NTLMSSP session setup.

Guenther
2007-10-10 11:05:41 -05:00
Jeremy Allison
9b8602e055 r11978: Volker's fix for #3292 (smbclient spins if server terminates
connection).
Jeremy.
2007-10-10 11:05:41 -05:00
Jeremy Allison
f1c88de7a2 r11976: (Slightly modified) Volker fix for #3293. Use SMBecho instead of
chkpath to keep a connection alive.
Jeremy.
2007-10-10 11:05:40 -05:00
Steve French
0981552dea r11938: Fix cifs to handle non-numeric uid and gid parameters and merge 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
2007-10-10 11:05:37 -05:00
Jeremy Allison
e4b3b70ef1 r11839: Info level 0x101 is really a protocol NT level.
Fix bug #3274 from Guenter Kukkukk <guenter.kukkukk@kukkukk.com>
Jeremy.
2007-10-10 11:05:29 -05:00
Günther Deschner
7b6195b421 r11790: Avoid infinite retry to gather a connection.
Guenther
2007-10-10 11:05:28 -05:00
Gerald Carter
be31c2a105 r11770: BUG 2718: don't use qpathinfo_basic() call when remote server is Win9x or the do_cd() call will fail 2007-10-10 11:05:28 -05:00
Jeremy Allison
414303bc02 r11511: A classic "friday night check-in" :-). This moves much
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.
2007-10-10 11:05:19 -05:00
Gerald Carter
49b8d7d7f5 r10964: BUG 1051: store the directory path so we can send the full name in the unlink call (del tmp\foo) 2007-10-10 11:04:58 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Gerald Carter
c2a018bf1f r10590: merging lost fix from the release branch 2007-10-10 11:04:47 -05:00
Gerald Carter
39369c8041 r10554: * BUG 3057: assume x64 drivers are v3 drivers
* BUG 3087: allow smbspool to establisha geust connection
  using a username with no password
2007-10-10 11:04:47 -05:00
Gerald Carter
79fcc3bb7b r10176: adding smbctool from Kalim's SoC project; requires make bin/smbctool 2007-10-10 11:03:35 -05:00
Günther Deschner
48cb0638b5 r9736: be a little more verbose on error.
Guenther
2007-10-10 11:03:24 -05:00
Jeremy Allison
b242f27860 r9545: (Hopefully the last) fixes for DIR -> SMB_STRUCT_DIR.
Jeremy.
2007-10-10 11:01:12 -05:00
Steve French
e5cb7d2131 r9401: Allow disabling mandatory byte range lock mount flag, and
fix corresponding entry in mtab.
2007-10-10 11:00:34 -05:00
Steve French
98a7304b6b r9225: Various minor CIFS mount helper fixes to less common error paths.
These bugs were found by Coverity static source code analysis tools.
2007-10-10 11:00:28 -05:00
Tim Potter
985dbb47d9 r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore. 2007-10-10 11:00:11 -05:00
Gerald Carter
aa5de7d0b3 r8478: remove unused printmode command from smbclient (noticed by kalim@samba.org) 2007-10-10 11:00:06 -05:00
Gerald Carter
9af07b2430 r7879: fix compile issue caused by not statoc value for intializing cpp macros 2007-10-10 10:58:00 -05:00
Volker Lendecke
72bc9de686 r7835: Add the forgotten GPL header. This source code file is distributed 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
2007-10-10 10:57:58 -05:00
Steve French
200db0790a r7202: lock mtab when updating it during umount.cifs, also delete only one matching entry at a time 2007-10-10 10:57:05 -05:00
Gerald Carter
9727d05241 r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1 2007-10-10 10:57:02 -05:00
Gerald Carter
9e3e473632 r6685: smbclient fixes
* 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
2007-10-10 10:56:51 -05:00
Gerald Carter
3abffdf3ad r6684: BUG 1780: patch from Rodrigo Fernandez-Vizarra <Rodrigo.Fernandez-Vizarra@Sun.COM> to add kerberos supsport to smbspool 2007-10-10 10:56:51 -05:00
Gerald Carter
ca678b9690 r6634: merge smbmount malloc checker fixes from trunk 2007-10-10 10:56:48 -05:00
Steve French
ed27740397 r6514: Allow domain= to be specified in credentials file. Fix umount.cifs help, allow root to unmount someone
else's mount
2007-10-10 10:56:44 -05:00
Steve French
37685979bb r6505: Add missing remount flag handling 2007-10-10 10:56:44 -05:00
Steve French
2ed6b5ecab r6499: Add two newer mount options to syntax help for mount.cifs 2007-10-10 10:56:43 -05:00
Steve French
66ec66ed1b r6482: Add support so umount.cifs can update mtab 2007-10-10 10:56:42 -05:00