1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

66 Commits

Author SHA1 Message Date
Stefan Metzmacher
74e783bf58 s4:librpc/rpc: s/private/private_data
metze
2009-02-02 13:08:29 +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
Stefan Metzmacher
fc31f2c526 s4:lib/socket: socket_connect_send() and socket_connect_ev() should only wrok with addresses
metze
2008-12-18 13:32:51 +01:00
Stefan Metzmacher
4c2a113dd0 s4:librpc/rpc: remove we should not redo the name resolving for secondary tcp connections
metze
2008-12-18 13:32:51 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
5bbd73c0ff Remove two more uses of global loadparm by remember required
details for secondary DCE/RPC connections.
2008-09-30 04:01:47 +02:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf67435904754469544390b67d34c958343)
2008-04-02 04:53:27 +02:00
Jelmer Vernooij
37b822e49f r26643: librpc: Remove uses of global_loadparm.
(This used to be commit 924c0890904266af8f50f69a25f89d36f971d710)
2008-01-02 09:06:06 -06:00
Jelmer Vernooij
5f4842cf65 r26376: Add context for libcli_resolve.
(This used to be commit 459e1466a411d6f83b7372e248566e6e71c745fc)
2007-12-21 05:49:12 +01:00
Jelmer Vernooij
01d2acfdb4 r26335: Specify name_resolve_order to socket code.
(This used to be commit b03e5d00110be3f1fe5809dad4eb6ca5cea7463d)
2007-12-21 05:48:46 +01:00
Jelmer Vernooij
0b4fab2f60 r26334: Avoid loadparm_context.
(This used to be commit 332dff80cc0f1dc80383f185409610cfb9f1d856)
2007-12-21 05:48:45 +01:00
Jelmer Vernooij
2f5ca872a8 r26313: Fix more uses of static loadparm.
(This used to be commit 6fd0d9d3b75546d08c24c513e05b1843d5777608)
2007-12-21 05:48:25 +01:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238)
2007-10-10 15:07:25 -05:00
Jelmer Vernooij
7c30312c17 r25316: Remove last few instances of old BOOL type in librpc/.
(This used to be commit 80d1dd41d4b224c46ad545f0afd97a847b99860b)
2007-10-10 15:07:13 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b4387961ff3665d8c589d61cd2edf31)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
959915a8cb r25001: Fix more C++ and other warnings, fix some of the indentation with ts=4 lines that I accidently added earlier.
(This used to be commit 0bcb21ed740fcec0f48ad36bbc2deee2948e8fc7)
2007-10-10 15:05:28 -05:00
Jelmer Vernooij
cd962355ab r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643ab906f1645cf6f32763dc73b1884e4)
2007-10-10 15:05:27 -05:00
Jelmer Vernooij
6cf69fee18 r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa1ed5ae726bae8781ec549302786b39)
2007-10-10 15:05:26 -05:00
Andrew Bartlett
8f9922863f r23812: Remove more code found as dead by the find_static script, and make
other functions just static.

Andrew Bartlett
(This used to be commit 64fcec1da613dc8f16f0fba02fb3de0ec840671f)
2007-10-10 14:59:22 -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 fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
40cd2d7780 r22944: fix bug #4618:
rename private -> private_data

metze
(This used to be commit 58551f2f28fce8f1fcd04736c47ecd7458f32ea2)
2007-10-10 14:52:30 -05:00
Stefan Metzmacher
9c6c917571 r22534: don't remove socket and fd_event before we told the
packet layer.

also fix double free (left over from cut-n-paste)

metze
(This used to be commit a26db7e694def6206345222a240d160fac17dd7d)
2007-10-10 14:51:38 -05:00
Stefan Metzmacher
d7b0175249 r22485: don't crash when the main dcerpc code haven't setup
transport.recv_data yet

also return always a usefull error

metze
(This used to be commit 0a8b4c328dfac972186564d2a4e1757d5135ec47)
2007-10-10 14:51:32 -05:00
Stefan Metzmacher
1912124dbf r22470: merge handling of broken connections from wins replication client code
to the rpc client code

we need to always ask for read events on the socket otherwise we never
get the connection error reported.

shutdown the transport when a request timeout.

metze
(This used to be commit 3403c0cb15e08ec838b0bc834f941051fb94d124)
2007-10-10 14:51:29 -05:00
Stefan Metzmacher
71846e31fd r19661: - add resolve stage to dcerpc connects over tcp
- remove ipv6 support untill the resolve layer can give ipv6 addresses

metze
(This used to be commit 1e518c3e675e6952044bc0fdf2537be432c0c56f)
2007-10-10 14:25:26 -05:00
Andrew Bartlett
57b8c5cd22 r19266: Add a target_hostname element to the binding struct. This allows us
to perform a lookup once, resolve the name to an IP, while still
communicating the full name to the lower layers, for kerberos etc.

This fixes 'net samdump', which was failing due to the schannel target
name being *smbserver.

Andrew Bartlett
(This used to be commit 0546f487f4cc99b5549dc1e457ea243d4bd66333)
2007-10-10 14:21:00 -05:00
Stefan Metzmacher
fd86007351 r17328: make better usage of the composite api
metze
(This used to be commit ae0834c8ca6d7049261eb9843dfd519594235d59)
2007-10-10 14:15:15 -05:00
Stefan Metzmacher
509a70e7da r17327: when the connect with the ipv6 socket was ok,
we need to inform the caller...

metze
(This used to be commit 40f10dfd60a6d572539c85cb2637ca920e5f1bca)
2007-10-10 14:15:15 -05:00
Andrew Bartlett
57589e3b67 r14714: On DCE/RPC, we need the name of the remote server used on the socket,
for Kerberos.  It must be the full name contacted, not the 'called
name' we might want to use for \\server things, so add another function.

Andrew Bartlett
(This used to be commit 6d57d1dbb76e7d1ca2fd4f1a6c0bacfa7a189e2b)
2007-10-10 13:59:12 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513752d2eafbe77f9de598de16ef84a1f)
2007-10-10 13:58:42 -05:00
Andrew Tridgell
18a050b870 r14311: canon needs to be initialised
(This used to be commit d1d94d69e1b1496fc26204f699e038bb1e36e68f)
2007-10-10 13:57:11 -05:00
Rafal Szczesniak
5fa874453f r13572: Comments to async pipe open functions and copyright note.
rafal
(This used to be commit 7dde77942bfcb73dfdd7a9840d3ba2a984c05064)
2007-10-10 13:51:57 -05:00
Rafal Szczesniak
32a3aa932d r13561: Turn all dcerpc connect and socket functions to async version.
Now, each rpc interface (named pipe, tcp/ip, lrpc and unix
socket) works asynchronously.
Comments to follow.

rafal
(This used to be commit 789f9d43db7ea59e79d5aa498e2e9fd077448825)
2007-10-10 13:51:57 -05:00
Andrew Bartlett
f55ea8bb3d r12804: This patch reworks the Samba4 sockets layer to use a socket_address
structure that is more generic than just 'IP/port'.

It now passes make test, and has been reviewed and updated by
metze. (Thankyou *very* much).

This passes 'make test' as well as kerberos use (not currently in the
testsuite).

The original purpose of this patch was to have Samba able to pass a
socket address stucture from the BSD layer into the kerberos routines
and back again.   It also removes nbt_peer_addr, which was being used
for a similar purpose.

It is a large change, but worthwhile I feel.

Andrew Bartlett
(This used to be commit 88198c4881d8620a37086f80e4da5a5b71c5bbb2)
2007-10-10 13:49:57 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10 13:49:03 -05:00
Rafal Szczesniak
b19d882458 r12294: Move dcerpc_pipe_open_sock() to async implementation.
rafal
(This used to be commit 02e79800346d232bb14c476f62a3e5ba30f79bd4)
2007-10-10 13:47:27 -05:00
Andrew Tridgell
614950aed3 r11713: separate out the setting of the fde in the packet context from the
enabling of packet serialisation
(This used to be commit 6a47cd65a8b588f9ddd375c57caaba08281e7cbb)
2007-10-10 13:46:17 -05:00
Andrew Tridgell
79b3a3afb5 r11627: give the caller much more control over the stream to packet process,
allowing it to specify the initial read size (thus preventing
over-reading) and to stop the recv process when needed. This is used
by the dcerpc socket code, which relies on not getting packets when it
isn't ready for them
(This used to be commit f869fd674ec4b148dc9a264e94d19ce79d35131d)
2007-10-10 13:46:01 -05:00
Andrew Tridgell
f3d66f310f r11623: convert the dcerpc socket layer to the generic packet code
(This used to be commit 4ea66e6e80de0d70b53bf9cd16c1dfd1c400f57e)
2007-10-10 13:46:00 -05:00
Andrew Tridgell
a872005c1c r10699: fixed the dcerpc code so that you can shutdown the pipe safely from
within a callback on the pipe. This should fix a problem volker
encountered with winbind. The fix invoolves making the recv_data
handler free the memory for a packet, instead of having the transport
layer free it after calling recv_data. When the transport layer freed
it, it had no way of knowing if the callback had shutdown the pipe, so
it had no way of knowing if it could safely use the pointer.

Also changed the pipe shutdown hook for the smb transport to use an
async SMB close. This ensures that when you shutdown the pipe, you
don't block waiting for the server to ack the close of the pipe fnum.
(This used to be commit c87d7f580e39245db181605f50883de07dd9632e)
2007-10-10 13:39:21 -05:00
Andrew Tridgell
5c332f6e9d r7659: fixup the ordering of socket destruction for ncacn_ip_tcp so we don't try and
remove an epoll descriptor for a closed fd
(This used to be commit bec5e9f80a934e6472e8d227214a9baba4f15054)
2007-10-10 13:18:18 -05:00
Andrew Tridgell
64e11654d0 r7652: use event friendly connect in dcerpc socket code
(This used to be commit 154effd781c901abfcd8f89721c4a6d03c07b670)
2007-10-10 13:18:17 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485bdb8f600ab528c0b4b4eef0c65e3fc9)
2007-10-10 13:18:15 -05:00
Andrew Tridgell
d1e8e62a56 r7496: removed an unused variable
(This used to be commit a8c99d0e37b5ca37cabc201c1290c6cd26a16549)
2007-10-10 13:18:00 -05:00
Jelmer Vernooij
1cb21b84a9 r5980: Fix double free after unexpected disconnect.
(This used to be commit 6149bd3702a0293fc1f798de7c399e3e6858416d)
2007-10-10 13:11:12 -05:00
Andrew Tridgell
df6d143e2e r5388: uppercase the server name on ncacn_ip_tcp
(This used to be commit c47eb38593f63ffe68f6bd51b101ea989eb8ee8e)
2007-10-10 13:09:50 -05:00
Andrew Tridgell
bed7c9ec32 r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d2d1327b23f40ddaeeaa8e7e3662454)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339f36aa43c9340be70ab7f0067593ef2)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
0798d54b4f r5195: most events don't need the time of the event, so save a gettimeofday() call
and just use timeval_current() when its actually needed
(This used to be commit 236403cc4dc2924ed6a898acae0bb44cc1688dcc)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
66170ef8b3 r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51342a65bf46fce772d313f92f8d73d3)
2007-10-10 13:09:29 -05:00