1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-30 13:18:05 +03:00
Commit Graph

72078 Commits

Author SHA1 Message Date
Jeremy Allison
52602e4f5a Fix inspired by work done by David Disseldorp for bug #8040 - smbclient segfaults when a Cyrillic netbios name or workgroup is configured.
Change msrpc_gen to return NTSTATUS and ensure everywhere this is
used it is correctly checked to return that status.

Jeremy.
2011-03-28 23:12:07 +02:00
Volker Lendecke
fbe19ba398 s3: Fix Coverity ID 2143: DEADCODE
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Mar 28 12:06:19 CEST 2011 on sn-devel-104
2011-03-28 12:06:19 +02:00
Volker Lendecke
05dac2b7e6 s3: Fix Coverity ID 2143: DEADCODE 2011-03-28 11:16:55 +02:00
Volker Lendecke
6e9b69fb07 s3: Fix Coverity ID 2173: FORWARD_NULL 2011-03-28 11:16:55 +02:00
Stefan Metzmacher
dc36d75d5f Revert "Change strict allocate to default to true.
This reverts commit ecf48af135.

This makes Samba unusable on systems without Linux and
a modern Filesystem.

This was discussed with Jeremy on IRC:
http://irclog.samba.org/2011/01/20110126-Wed.log

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Mar 28 09:00:09 CEST 2011 on sn-devel-104
2011-03-28 09:00:09 +02:00
Volker Lendecke
a414356075 s3: Fix Coverity ID 2188: MISSING_BREAK
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 23:11:10 CEST 2011 on sn-devel-104
2011-03-27 23:11:10 +02:00
Volker Lendecke
ba92c45787 s3: Fix Coverity ID 2189: MISSING_BREAK 2011-03-27 22:22:12 +02:00
Volker Lendecke
25397de589 tdb: Fix Coverity ID 2192: NO_EFFECT
(ret < 0) can never be true
2011-03-27 22:22:12 +02:00
Volker Lendecke
261d6b0e9b s3: Fix Coverity ID 2195: NO_EFFECT
level is unsigned
2011-03-27 22:22:12 +02:00
Volker Lendecke
8d9cbc7c22 librpc: Add some error checking to dcerpc_floor_pack_rhs_if_version_data 2011-03-27 22:22:12 +02:00
Volker Lendecke
9370c28425 librpc: Fix Coverity ID 2198: NULL_RETURNS 2011-03-27 22:22:12 +02:00
Volker Lendecke
240aeeb588 s3: Fix Coverity ID 2200: NULL_RETURNS (cut&paste error) 2011-03-27 22:22:11 +02:00
Volker Lendecke
6bee354377 s3: Fix Coverity ID 2228: RESOURCE_LEAK
Holger, please check!
2011-03-27 22:22:11 +02:00
Volker Lendecke
7e6030a495 s3: Fix Coverity ID 2226: RESOURCE_LEAK
Holger, please check!
2011-03-27 22:22:11 +02:00
Volker Lendecke
c07be5f747 s3: Fix Coverity ID 976: BAD_SIZEOF 2011-03-27 22:22:10 +02:00
Volker Lendecke
a431394ce3 s3: Fix Coverity ID 958: BAD_SIZEOF
This is supposed to wipe out the md5 context, not only the first bytes of it.

Others, please check!
2011-03-27 22:22:10 +02:00
Volker Lendecke
8db0374251 s3: Fix Coverity ID 682: NEGATIVE_RETURNS 2011-03-27 22:22:10 +02:00
Volker Lendecke
1a1675bbfe s3: Fix Coverity ID 590: DEADCODE 2011-03-27 22:22:10 +02:00
Volker Lendecke
30085eb792 s3: Fix Coverity ID 585: NEGATIVE_RETURNS 2011-03-27 22:22:10 +02:00
Volker Lendecke
08e4e7fef7 s3: Fix Coverity ID 513: UNINIT 2011-03-27 22:22:10 +02:00
Volker Lendecke
7c868e6174 s3: Fix Coverity ID 83: RESOURCE_LEAK 2011-03-27 22:22:10 +02:00
Volker Lendecke
592c669d9d s3: Convert cli_raw_tcon to cli_smb
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 19:50:21 CEST 2011 on sn-devel-104
2011-03-27 19:50:21 +02:00
Volker Lendecke
13c1c8ef3d s3: Fix a memleak 2011-03-27 19:04:11 +02:00
Volker Lendecke
c83ce65ad0 s3: Replace a use of cli_errstr 2011-03-27 19:04:11 +02:00
Volker Lendecke
ffef3aa809 s3: Replace cli_negprot_sendsync() by cli_negprot_send() 2011-03-27 19:04:11 +02:00
Volker Lendecke
a60ba54618 s3: Remove a pointless static 2011-03-27 19:04:10 +02:00
Volker Lendecke
5d9075c049 s3: Remove a use of cli_send_smb 2011-03-27 19:04:10 +02:00
Volker Lendecke
b47b4c9e3d s3: Remove two calls to cli_errstr
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 13:17:47 CEST 2011 on sn-devel-104
2011-03-27 13:17:47 +02:00
Volker Lendecke
8cd262240e s3: Fix Coverity ID 2296: UNUSED_VALUE
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 12:12:35 CEST 2011 on sn-devel-104
2011-03-27 12:12:35 +02:00
Volker Lendecke
1d690e37b7 s3: Fix Coverity ID 2327: FORWARD_NULL
Make check_ft_info robust against an invalid type.

Günther, please check!
2011-03-27 11:25:34 +02:00
Volker Lendecke
f762886687 s3: Fix Coverity ID 2328: FORWARD_NULL
Make startsmbfilepwent robust against an invalid open type
2011-03-27 11:25:34 +02:00
Volker Lendecke
4cdaac02dc s3: Fix Coverity ID 2329: RESOURCE_LEAK 2011-03-27 11:25:33 +02:00
Volker Lendecke
c1049391c1 s3: Fix Coverity ID 2330: RESOURCE_LEAK 2011-03-27 11:25:33 +02:00
Volker Lendecke
66c968068d s3: Fix Coverity ID 2331: RESOURCE_LEAK 2011-03-27 11:25:33 +02:00
Volker Lendecke
288fb9d612 s3: Fix an uninitialized variable read
The "is_valid_policy_handle" in the exit path reads uninitialized data

Lets see if this fixes Coverity ID 2172 which complains about h being
dereferenced in the dcerpc_winreg_CloseKey.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Mar 26 14:24:28 CET 2011 on sn-devel-104
2011-03-26 14:24:28 +01:00
Volker Lendecke
fc4095436f s3: Fix Coverity ID 2326, CHECKED_RETURN 2011-03-26 13:37:40 +01:00
Jeremy Allison
51d8a4e046 Revert "Fix bug 8021 - Incorrect string termination in volume/volume_name for TRANS2-QUERY_FS_INFO/Info Volume."
This reverts commit 042aafb87d.

I need to test against OS/2 to see if this is something Win28K
breaks for older clients before allowing this.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Mar 26 01:19:55 CET 2011 on sn-devel-104
2011-03-26 01:19:55 +01:00
Jeremy Allison
ad2e243f8d Fix bug 8040 - smbclient segfaults when a Cyrillic netbios name or workgroup is configured.
As discovered by David Disseldorp <ddiss@suse.de>, convert_string_talloc()
doesn't always return consistent results for a zero length string. The
API states an incoming string must *always* contain the terminating null,
but unfotunately too much code expects passing in a zero source length
to return a null terminated string, so at least ensure we return a
correct null string in the required character set and return the
correct length.

Also ensure we cannot return a zero length for a converted string
(we ensure that the returned buffer is always allocated and zero
terminated anyway) as calling code depends on the fact that returning
true from this function will *always* return a non-zero length (as
it must include the terminating null).

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar 25 23:25:40 CET 2011 on sn-devel-104
2011-03-25 23:25:40 +01:00
Günther Deschner
5779460f3f s3-netapi: fix memoryleak while not using talloc_tos() in cli_get_session_key() usage.
Thanks Volker!

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Mar 25 18:21:18 CET 2011 on sn-devel-104
2011-03-25 18:21:18 +01:00
Volker Lendecke
26253e0460 s3: Compile IDL files in autogen, some configure tests need this
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Mar 25 16:35:30 CET 2011 on sn-devel-104
2011-03-25 16:35:30 +01:00
Volker Lendecke
273e7cbb99 Revert "s3-includes: fixed CONST_DISCARD() to actually discard const"
This reverts commit 37261928be.

In source3 this creates a warning of the form

passdb/pdb_ldap.c:4565: warning: passing argument 2 of ‘pull_utf8_talloc’ from incompatible pointer type
include/proto.h:444: note: expected ‘char **’ but argument is of type ‘char ***’

for every use of CONST_DISCARD.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Mar 25 13:16:35 CET 2011 on sn-devel-104
2011-03-25 13:16:35 +01:00
Andrew Tridgell
f0922147fe charcnv: ensure convert_string_error doesn't conflict with s3 function
use _handle for handle based functions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Mar 25 05:22:24 CET 2011 on sn-devel-104
2011-03-25 05:22:24 +01:00
Andrew Tridgell
0189087e25 s3-charcnv: fixed converted_size return in fast paths 2011-03-25 04:37:06 +01:00
Andrew Tridgell
f08ec2296e s3-charcnv: removed unused function
lp_failed_convert_char() is not needed any more
2011-03-25 04:37:06 +01:00
Andrew Bartlett
b5616adc8a lib/util/charset rename iconv_convenience to iconv_handle
This better reflects what this structure is

Andrew Bartlett
2011-03-25 04:37:06 +01:00
Andrew Tridgell
7824111d07 s3-charcnv: convert_string_internal() should not display errors
debug error display happens in the convert_string() outer function
2011-03-25 04:37:06 +01:00
Andrew Tridgell
d85dbfb3db s3-string: removed the conv_silent global
use convert_string_error() instead

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Andrew Tridgell
232fb016a1 s3-string: removed last use of conv_silent
This replaces the push_ascii_nstring() implementation with a call to
convert_string_error()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Andrew Bartlett
64258a300f s3-charcnv Add convert_string_error()
This function returns errors rather than printing them.

Andrew Bartlett
2011-03-25 04:37:06 +01:00
Andrew Tridgell
2643a7ba6b charcnv: added convert_string_error()
this will allow us to remove conv_silent

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00