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

607 Commits

Author SHA1 Message Date
Volker Lendecke
05f59b2c34 r16250: Fix Klokwork IDs 148, 151, 152, 154.
Volker
(This used to be commit d7a75ee94d)
2007-10-10 11:17:28 -05:00
Jeremy Allison
a1e0a0e928 r16230: Fix Klocwork #861 and others. localtime and asctime
can return NULL. Ensure we check all returns correctly.
Jeremy.
(This used to be commit 6c61dc8ed6)
2007-10-10 11:17:26 -05:00
Günther Deschner
f5e79ae825 r15552: Fix segfault...
Guenther
(This used to be commit ff93fc7c1e)
2007-10-10 11:16:58 -05:00
Günther Deschner
767ac75e6b r15519: Fix segfault.
Guenther
(This used to be commit a0548914c2)
2007-10-10 11:16:55 -05:00
James Peach
584ac985ec r15448: New autoconf macro to test for sysconf variables.
(This used to be commit a19d4f2bb4)
2007-10-10 11:16:46 -05:00
Jeremy Allison
2ebcc2933a r15141: Fix for #3592 inspired by Justin Best <justinb@pdxmission.org>.
Ignore a file in a tar output if the first read fails. Also
cope with <2GB read fail.
Jeremy.
(This used to be commit 1b73e699e1)
2007-10-10 11:16:26 -05:00
Volker Lendecke
76a2ac3ac3 r15098: Make smbclient -L use RPC to list shares, fall back to RAP. This should list
long share names.

Volker
(This used to be commit d3d388180d)
2007-10-10 11:16:23 -05:00
Jeremy Allison
c1bcddd803 r14359: Try and fix Coverity #176 by making the pointer
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.
(This used to be commit a3b8bee3ff)
2007-10-10 11:15:26 -05:00
Jeremy Allison
8f96b1bf0f r14351: Ensure we use the minimum of PATH_MAX and sizeof(pstring).
Fix Coverity #59.
Jeremy.
(This used to be commit d793e1550c)
2007-10-10 11:15:26 -05:00
Volker Lendecke
b84029452b r14248: Fix Coverity bug # 84
(This used to be commit 811ae2b21f)
2007-10-10 11:15:20 -05:00
Volker Lendecke
0837f6b584 r14246: Fix Coverity bug # 85
(This used to be commit ebc21336d8)
2007-10-10 11:15:20 -05:00
Volker Lendecke
1c66bcef8d r14242: Fix Coverity bug # 82
(This used to be commit 9f645e9962)
2007-10-10 11:15:19 -05:00
Jeremy Allison
ab43bf3e10 r14176: Fix coverity bug #30. Ensure no possible null deref.
Jeremy.
(This used to be commit e5d6069cf8)
2007-10-10 11:15:15 -05:00
Jeremy Allison
1b3e1f9b7c r14166: Fix const warning.
Jeremy.
(This used to be commit 2ec461ae58)
2007-10-10 11:15:14 -05:00
Günther Deschner
14e904fe86 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
(This used to be commit 7ec2b31a87)
2007-10-10 11:15:13 -05:00
Günther Deschner
e724dc9a60 r14145: Add missing WITH_KCM hunks from my local tree.
Guenther
(This used to be commit 977079a058)
2007-10-10 11:15:13 -05:00
Steve French
58752bccdd r14128: Remove warning generated by coverity scan tool (missing SAFE_FREE in error path)
(This used to be commit 33a1e26114)
2007-10-10 11:11:14 -05:00
Steve French
f3b39786db r14127: Remove coverity warning on mount.cifs.c
(This used to be commit 2ec51635ae)
2007-10-10 11:11:13 -05:00
Steve French
84c398a72e r14126: resolve two warnings from the coverity scan
(This used to be commit 32c7243b80)
2007-10-10 11:11:13 -05:00
Jeremy Allison
9e65a2cb98 r14009: Remove last const warning (have to use CONST_DISCARD).
Jeremy.
(This used to be commit af0ade470f)
2007-10-10 11:11:05 -05:00
Jeremy Allison
26c95f3545 r14006: Fix a couple of irritating warnings.
Jeremy.
(This used to be commit ead13ca522)
2007-10-10 11:11:04 -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
Lars Müller
1006c89e1b 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.
(This used to be commit 3c277c7a3c)
2007-10-10 11:10:50 -05:00
Steve French
03bb57c219 r13697: Remove unneeded header (header not present on all Linux either) for umount.cifs.c
(This used to be commit d294b28f1c)
2007-10-10 11:10:24 -05:00
Tim Potter
79c8591e2d r13612: #define NO_SYSLOG is dead as a doornail.
(This used to be commit 1d23067e68)
2007-10-10 11:10:19 -05:00
Jeremy Allison
eca035db9a r13535: Fix #2353 based on a patch by William Jojo.
Jeremy.
(This used to be commit fe63a6ee06)
2007-10-10 11:10:11 -05:00
Volker Lendecke
7461a457d1 r13486: Two more -- fix bug 3503
(This used to be commit 62b02a6843)
2007-10-10 11:10:05 -05:00
Derrell Lipman
9c15bd311d 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.)
(This used to be commit f2a24de769)
2007-10-10 11:06:18 -05:00
Gerald Carter
aa363846d6 r12912: patch from Tony Mountifield <tony@softins.co.uk> for BUG 3327 (fix bad access to gencache.tdb after fork() in smbmount
(This used to be commit 68399ce04c)
2007-10-10 11:06:06 -05:00
Jeremy Allison
c8f28c92a7 r12555: Fix more load_case_table swegfaults. Arggg.
What I'd give for a global constructor...
Jeremy.
(This used to be commit c970d7d0a5)
2007-10-10 11:05:59 -05:00
Jeremy Allison
5a4881bf39 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.
(This used to be commit c2752347eb)
2007-10-10 11:05:58 -05:00
Jeremy Allison
a168730dda r12045: More warning fixes... Just a few more to go.
Jeremy.
(This used to be commit cd192ed79a)
2007-10-10 11:05:42 -05:00
Günther Deschner
4e5cdfb668 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
(This used to be commit 1136862e6d)
2007-10-10 11:05:41 -05:00
Jeremy Allison
0732d25057 r11978: Volker's fix for #3292 (smbclient spins if server terminates
connection).
Jeremy.
(This used to be commit 9b8602e055)
2007-10-10 11:05:41 -05:00
Jeremy Allison
0af6dcacec r11976: (Slightly modified) Volker fix for #3293. Use SMBecho instead of
chkpath to keep a connection alive.
Jeremy.
(This used to be commit f1c88de7a2)
2007-10-10 11:05:40 -05:00
Steve French
ba54ba0326 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
(This used to be commit 0981552dea)
2007-10-10 11:05:37 -05:00
Jeremy Allison
8e178d8dce r11839: Info level 0x101 is really a protocol NT level.
Fix bug #3274 from Guenter Kukkukk <guenter.kukkukk@kukkukk.com>
Jeremy.
(This used to be commit e4b3b70ef1)
2007-10-10 11:05:29 -05:00
Günther Deschner
4ba65300ec r11790: Avoid infinite retry to gather a connection.
Guenther
(This used to be commit 7b6195b421)
2007-10-10 11:05:28 -05:00
Gerald Carter
04b6c1303c r11770: BUG 2718: don't use qpathinfo_basic() call when remote server is Win9x or the do_cd() call will fail
(This used to be commit be31c2a105)
2007-10-10 11:05:28 -05:00
Jeremy Allison
6d5757395a 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.
(This used to be commit 414303bc02)
2007-10-10 11:05:19 -05:00
Gerald Carter
057060feaf r10964: BUG 1051: store the directory path so we can send the full name in the unlink call (del tmp\foo)
(This used to be commit 49b8d7d7f5)
2007-10-10 11:04:58 -05:00
Gerald Carter
54abd2aa66 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)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Gerald Carter
93bbaac166 r10590: merging lost fix from the release branch
(This used to be commit c2a018bf1f)
2007-10-10 11:04:47 -05:00
Gerald Carter
a1faaa9e67 r10554: * BUG 3057: assume x64 drivers are v3 drivers
* BUG 3087: allow smbspool to establisha geust connection
  using a username with no password
(This used to be commit 39369c8041)
2007-10-10 11:04:47 -05:00
Gerald Carter
dade4d9e95 r10176: adding smbctool from Kalim's SoC project; requires make bin/smbctool
(This used to be commit 79fcc3bb7b)
2007-10-10 11:03:35 -05:00
Günther Deschner
a34c21f378 r9736: be a little more verbose on error.
Guenther
(This used to be commit 48cb0638b5)
2007-10-10 11:03:24 -05:00
Jeremy Allison
b67ba1e36b r9545: (Hopefully the last) fixes for DIR -> SMB_STRUCT_DIR.
Jeremy.
(This used to be commit b242f27860)
2007-10-10 11:01:12 -05:00
Steve French
337db26f16 r9401: Allow disabling mandatory byte range lock mount flag, and
fix corresponding entry in mtab.
(This used to be commit e5cb7d2131)
2007-10-10 11:00:34 -05:00
Steve French
bc3aaeac6f r9225: Various minor CIFS mount helper fixes to less common error paths.
These bugs were found by Coverity static source code analysis tools.
(This used to be commit 98a7304b6b)
2007-10-10 11:00:28 -05:00
Tim Potter
ab398643a4 r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore.
(This used to be commit 985dbb47d9)
2007-10-10 11:00:11 -05:00