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

72063 Commits

Author SHA1 Message Date
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
Andrew Tridgell
37261928be s3-includes: fixed CONST_DISCARD() to actually discard const
a cast is not enough

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Andrew Tridgell
aaae4123b9 unistr: moved some UCS2 macros into util_unistr
we need to move towards eliminating smb_ucs2_t. This moves a couple of
the related macros into the only file they are used in

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Andrew Tridgell
5a20325c86 libcli: created smb_constants.h
this starts the (long!) process of moving some of the SMB constants
into common files. This just moves the FLAGS2_ defines, which are
needed for common string routines (for FLAGS2_UNICODE_STRINGS)
2011-03-25 04:37:06 +01:00
Andrew Tridgell
bfce962c8f tdb: rename convert_string() to tdb_convert_string()
this prevents a conflict with the convert_string() in samba
2011-03-25 04:37:06 +01:00
Andrew Tridgell
2588e71809 s3-libsmb: work our correct length for EA strings 2011-03-25 04:37:06 +01:00
Andrew Tridgell
5ed2039e1e s3-string: sec_len==-1 support is no longer needed
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Andrew Tridgell
4d47493368 s3-dfs: removed the last user of sec_len==-1 in pull_*_base_talloc()
hopefully there aren't any others lurking in the code
2011-03-25 04:37:06 +01:00
Andrew Tridgell
3ceb353939 s3-lib: make pull_ucs2_base_talloc static
it is local to charcnv.c
2011-03-25 04:37:06 +01:00
Andrew Tridgell
980064b76d lib: remove unused pieces of string_wrappers.h 2011-03-25 04:37:06 +01:00
Andrew Tridgell
8cd4a38d72 lib: move the string wrappers from source3/include to common lib/util
this will allow the common charcnv library to use the string wrappers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Andrew Tridgell
f705fc9002 s3-string: moved fstring functions into their own file
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Michael Adam
8812148e24 s3:dbwrap_ctdb: fix non-locked fetch on persistent db's causing corruption
When doing a non-locking fetch on a record of a persistent db when no
transaction is running, the old behaviour was to fetch locally and
do a ctdb call when the record was not found in the local db.
The call is useless for persistent dbs anyway since they are only
written to using transactions and hence kept in sync, but it is
also harmful, because a ctdb call will bump the record RSN when it
does actually migrate the record from one node to another.

Recently, ctdb has been changed to make all calls do a migration.
This uncovered the client misbehaviour for persistent dbs, because
now _each_ non-locking fetch will render the persistent db inconsistent:
A subsequent transaction which touches the record in question will
fail because the RSNs are out of sync.

This patch fixes this old bug.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Mar 25 01:26:32 CET 2011 on sn-devel-104
2011-03-25 01:26:32 +01:00
Günther Deschner
68529bc14e s3-charcnv: remove unused labels.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Mar 24 23:54:25 CET 2011 on sn-devel-104
2011-03-24 23:54:25 +01:00
Günther Deschner
4a4efc20b4 s3-rpc_server: remove two uneeded include registry/reg_parse_prs.h
Guenther
2011-03-24 23:08:22 +01:00
Günther Deschner
ba510fae23 s3-ldapsam: fix ldapsam_create_user() with existing posix accounts.
We were not taking into account the existing posix attributes and thus failed
while trying to add a 2nd uid attribute.

Found by Sumit.

Guenther
2011-03-24 23:08:22 +01:00