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

79 Commits

Author SHA1 Message Date
Volker Lendecke
0baae61e42 lib: Give lib/util/util_file.c its own header file
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
2024-04-16 23:51:45 +00:00
Stefan Metzmacher
bfb10774b6 s4:libcli/dgram: add nbt_dgram_send_raw() to send raw blobs
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15620

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-04-05 12:24:42 +00:00
Stefan Metzmacher
77f4f1c7db s4:libcli/dgram: make use of socket_address_copy()
This avoids talloc_reference...

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15620

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-04-05 12:24:41 +00:00
Stefan Metzmacher
11861bcfc3 s4:libcli/dgram: let the generic incoming handler also get unexpected mailslot messages
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15620

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-04-05 12:24:41 +00:00
Pavel Filipenský
6127509986 s4:libcli: Covscan: unchecked return value for file_save()
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2022-05-14 03:49:32 +00:00
Pavel Filipenský
238d3603be s4:libcli: Fix trailing whitespace in browse.c
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2022-05-14 03:49:32 +00:00
Pavel Filipenský
9cfed3f3cd s4:libcli: Covscan: unchecked return value for file_save()
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2022-05-14 03:49:32 +00:00
Pavel Filipenský
679942eafd s4:libcli: Fix trailing whitespace in netlogon.c
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2022-05-14 03:49:32 +00:00
Matthew DeVore
232054c09b lib/util: remove extra safe_string.h file
lib/util/safe_string.h is similar to source3/include/safe_string.h, but
the former has fewer checks. It is missing bcopy, strcasecmp, and
strncasecmp.

Add the missing elements to lib/util/safe_string.h remove the other
safe_string.h which is in the source3-specific path. To accomodate
existing uses of str(n?)casecmp, add #undef lines to source files where
they are used.

Signed-off-by: Matthew DeVore <matvore@google.com>
Reviewed-by: David Mulder <dmulder@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 28 02:18:40 UTC 2020 on sn-devel-184
2020-08-28 02:18:40 +00:00
Volker Lendecke
b8f7167474 libdgram: Fix an error path memleak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Apr 13 21:04:28 CEST 2018 on sn-devel-144
2018-04-13 21:04:28 +02:00
Volker Lendecke
5ec14fd981 libdgram: Remove an unused parameter
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-02-27 09:14:17 +01:00
Volker Lendecke
92580b3f2f libdgram: Remove an unused parameter
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-02-27 09:14:17 +01:00
Volker Lendecke
d88f826c7b libsocket: Add "mem_ctx" to socket_create()
Every caller did a talloc_steal() after socket_create(). Just pass in the
correct memory context.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-02-27 09:14:17 +01:00
Volker Lendecke
f7cc3db3f3 libcli: Fix a cut&paste typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-13 16:42:22 +01:00
Michael Adam
476672b647 dlist: remove unneeded type argument from DLIST_ADD_END()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-06 21:48:17 +01:00
Matthieu Patou
ea3db09f69 libcli: continue to read from the socket even if the size is 0
This is an issue found by Codenomicon, with a malicious packet with 0
bytes UDP payload we will continiously be looping trying to react from
the socket event and continiously do nothing as we will bail out
thinking that we had a memory allocation error.

Original fix comes from Volker Lendecke <vl@samba.org>

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Sep 20 04:46:47 CEST 2013 on sn-devel-104
2013-09-20 04:46:47 +02:00
Simo Sorce
ab81505e08 s4:libcli: use tevent_ fn names instead of legacy event_ ones 2011-08-13 09:54:15 -04:00
Günther Deschner
3294ccbb6d netlogon: move netlogon helpers to ../libcli/netlogon.
Guenther
2011-01-07 15:02:24 +01:00
Andrew Tridgell
ac0a92b5b3 s4-debug: lowered the debug level of some unimportant messages 2010-11-08 06:16:04 +00:00
Andrew Tridgell
0a2e55bb41 s4-mailslot: fixed handling of random collision in temporary mailslot names
we could get occasional failures in the samba4.nbt.dgram test if we
happened to get a collision in the random mailslot names.

Thanks to Jeremy for spotting this! (his autobuild failed)

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-19 22:54:15 +00:00
Jelmer Vernooij
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Tridgell
e2d4ae1510 fixed several places that unnecessarily take a reference to the event context
These references were triggering the ambiguous talloc_free errors from
the recent talloc changes when the server is run using the 'standard'
process model instead of the 'single' process model. I am aiming to
move the build farm to use the 'standard' process model soon, as part
of an effort to make our test environment better match the real
deployment of Samba4.

The references are not needed as the way that the event context is
used is as the 'top parent', so when the event context is freed then
all of the structures that were taking a reference to the event
context were actually freed as well, thus making the references
redundent.
2009-08-07 17:24:48 +10:00
Stefan Metzmacher
e08dfe008e s4:dgram: s/private/private_data
metze
2009-02-02 13:08:48 +01:00
Stefan Metzmacher
0db079b9eb s4:libcli/dgram: s/private/private_data
metze
2009-02-02 13:08:27 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Günther Deschner
d242491488 idl: finally fully share nbt.idl in s3 and s4.
Guenther
2008-10-15 21:44:39 +02:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Günther Deschner
1147d05b47 s4-nbt: use moved libcli netlogon helpers.
Guenther
2008-09-23 23:18:00 +02:00
Andrew Bartlett
aa90730e0c Revert addition of 'mailslot' parameter.
It turns out that the mailslot name (and a useful private prointer) is
provided in the struct dgram_mailslot_handler.

Andrew Bartlett
(This used to be commit e17804b885)
2008-05-20 11:54:50 +10:00
Andrew Bartlett
4f557d7954 Show that the NTLOGON and NETLOGON mailslots are *very* similar.
Rework the mailslot infrustructure to cope, passing down the mailslot
name so that we can implement both in the same callback function.

Andrew Bartlett
(This used to be commit 89fdd77891)
2008-05-17 13:24:29 +10:00
Andrew Bartlett
7c0eea48f3 Put back the old netlogn parsing code - for the request only
This gives us seperate parsing functions for requests and replies.

Andrew Bartlett
(This used to be commit d2d3d15a8e)
2008-05-17 12:38:58 +10:00
Andrew Bartlett
58e7f253ea Rework the CLDAP and NBT netlogon requests and responses.
This now matches section 7.3.3 of the MS-ATDS specification, and all
our current tests pass against windows.  There is still more testing
to do, and the server implementation to complete.

Andrew Bartlett
(This used to be commit 431d0c0396)
2008-05-16 13:03:01 +10:00
Simo Sorce
4e83011f72 Remove more event_context_init() uses from function calls within deep down the code.
Make sure we pass around the event_context where we need it instead.
All test but a few python ones fail. Jelmer promised to fix them.
(This used to be commit 3045d39162)
2008-04-21 18:12:33 -04:00
Jelmer Vernooij
517bf7aa4f Remove more global_loadparm uses.
(This used to be commit f920e78ea7)
2008-02-27 19:48:10 +01:00
Jelmer Vernooij
921b176484 Remove more uses of global_loadparm.
(This used to be commit 47d05ecf6f)
2008-02-21 14:50:57 +01:00
Jelmer Vernooij
7d5f0e0893 r26639: librpc: Pass iconv convenience on from RPC connection to NDR library, so it can be overridden by OpenChange.
(This used to be commit 2f29f80e07)
2008-01-01 16:12:15 -06:00
Jelmer Vernooij
86dc05e99f r26638: libndr: Require explicitly specifying iconv_convenience for ndr_struct_push_blob().
(This used to be commit 61ad78ac98)
2008-01-01 16:12:11 -06:00
Jelmer Vernooij
0f21c092d6 r26311: Move port number specification higher up the call stack.
(This used to be commit ef946ff093)
2007-12-21 05:48:23 +01:00
Jelmer Vernooij
d378cf4c15 r26310: Remove more uses of global_loadparm.
(This used to be commit 9d806da113)
2007-12-21 05:48:22 +01:00
Jelmer Vernooij
25f286fdfe r26223: Move loadparm context up in the stack.
(This used to be commit 152e2b1a28)
2007-12-21 05:46:59 +01:00
Stefan Metzmacher
529763a9aa r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/
lib/registry/
lib/ldb-samba/
librpc/rpc/
auth/auth_winbind.c
auth/gensec/
auth/kerberos/
dsdb/repl/
dsdb/samdb/
dsdb/schema/
torture/
cluster/ctdb/
kdc/
ntvfs/ipc/
torture/rap/
ntvfs/
utils/getntacl.c
ntptr/
smb_server/
libcli/wrepl/
wrepl_server/
libcli/cldap/
libcli/dgram/
libcli/ldap/
libcli/raw/
libcli/nbt/
libnet/
winbind/
rpc_server/

metze
(This used to be commit 6223c7fddc)
2007-12-21 05:45:02 +01:00
Stefan Metzmacher
c77b796a3f r25820: but still return the error...
(sorry, this should have been one commit)

metze
(This used to be commit 01c5ec7eb4)
2007-12-21 05:44:12 +01:00
Stefan Metzmacher
64fc66306b r25819: make the success case more clear
metze
(This used to be commit 6495fe220d)
2007-12-21 05:44:12 +01:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839)
2007-10-10 15:07:25 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Jelmer Vernooij
0329d755a7 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
(This used to be commit f7afa1cb77)
2007-10-10 14:16:54 -05:00
Gerald Carter
e3a6c6be79 r16100: Patch from Michael Wood <mwood@icts.uct.ac.za>: s/then/than/ for correct grammar
(This used to be commit 26a2fa97e4)
2007-10-10 14:08:59 -05:00