1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

3645 Commits

Author SHA1 Message Date
Stefan Metzmacher
c108689bf6 r4962: add infrastructure to use raw krb5 auth in dcerpc client code
Note this doesn't work currently because the gensec_modules are not ready for that yet

metze
(This used to be commit 7b09a3f725baca5d4483b7ec24a9cb6151557bb5)
2007-10-10 13:09:10 -05:00
Stefan Metzmacher
56e4f0db34 r4959: fix compiler warning
metze
(This used to be commit e849db13dce1233a37c5b175cf8bea0a473ba6d7)
2007-10-10 13:09:10 -05:00
Stefan Metzmacher
52a6067fcb r4958: fix compiler warnings
metze
(This used to be commit 522af7ecc0020b7c56182ca628f6d1623abe303e)
2007-10-10 13:09:10 -05:00
Andrew Tridgell
657583b9b9 r4957: the fetchfile _recv() function was neglecting to steal the data and
free the connection context. This left a whole lot of state hanging
around and didn't give the memory to the caller properly
(This used to be commit 3e13e1d526563d91cb2342ae68455e54eb49a9bd)
2007-10-10 13:09:10 -05:00
Andrew Tridgell
bdbd32d3ff r4956: - moved the definition of the mangle context structure into a pvfs_shortname
- made the mangle cache size configurable
(This used to be commit 4adbd01812a53395f175bd6d8e402ad5451f7561)
2007-10-10 13:09:09 -05:00
Andrew Tridgell
f82a03b2c1 r4955: fixed a couple of minor memory leaks in the auth_sam code
(This used to be commit 2eba223bda43a81e7aa795e58e551b0b556ddcfa)
2007-10-10 13:09:09 -05:00
Andrew Tridgell
af4ce4805c r4954: we don't need the separate event_remove_*() calls any more, as you now
remove an event by calling talloc_free().
(This used to be commit 8f19b6886cc58a56d52aecfc83a175197061e533)
2007-10-10 13:09:09 -05:00
Andrew Tridgell
9c2c819b53 r4953: - enable easy valgrind use in all our test scripts
- when valgrind isn't set, then setup MALLOC_CHECK_ to abort on error
(This used to be commit 21e629e80e5b320616135d3f3641801dc29594e6)
2007-10-10 13:09:09 -05:00
Andrew Tridgell
52ad7774b5 r4952: removed a bogus talloc_steal() that was trying to cope with the
inverted memory hierarchy. Now the memory hierarchy is logical its not
needed (and can cause a double free in RPC-SCHANNEL)
(This used to be commit f8a950b57d7137c6fd0a77d063d946b4f9b3f014)
2007-10-10 13:09:09 -05:00
Andrew Tridgell
3e44c4a3ba r4951: some of the code dealing with libcli was getting too complex trying to
handle the inverted memory hierarchy that a normal session
establishment gave. The inverted hierarchy came from that fact that
you first establish a socket, then a transport, then a session and
finally a tree. That leads to the socket being at the top of the
memory hierarchy and the tree at the bottom, which makes no sense from
the users point of view, as they want to be able to free the tree and
have everything disappear.

The core problem was that the libcli interface didn't distinguish
between establishing a primary context and a secondary context. If you
establish a 2nd session on a transport then you want the transport to
be referenced by the session, whereas if you establish a primary
session then you want the transport to be a child of the session.

To fix this I have added "parent_ctx" and "primary" arguments to the
libcli intialisation functions. This makes using the library much
easier, and gives us a memory hierarchy that makes much more sense.

I was prompted to do this by a bug in the cifs backend, which was
caused by the socket not being properly torn down on a disconnect due
to the inverted memory hierarchy.
(This used to be commit 5e8fd5f70178992e249805c2e1ddafaf6840739b)
2007-10-10 13:09:09 -05:00
Andrew Tridgell
46b5a3d754 r4950: removed some excessive debugging messages
(This used to be commit 4a351901aa49090700d89274559d6dda76f06b7d)
2007-10-10 13:09:09 -05:00
Volker Lendecke
63ba8383e1 r4949: First version of a fetchfile composite function which connects to a server and
loads a file. Needs a smb url parsing wrapper.

Volker
(This used to be commit fa435bf7c878d4a5beb6afb2ed6e2990abc11e82)
2007-10-10 13:09:08 -05:00
Rafal Szczesniak
d25c1bd001 r4948: Typo fixes in comments.
rafal
(This used to be commit 97d40f1603eeed1b5ff3f2c7d668858fef20f130)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
4ad08968f6 r4945: the te element isn't needed any more
In general, now that events are children of the structure they are
handling events for, the caller only needs to keep the event handle
around if it plans on changing the event flags later
(This used to be commit 8c8955155476827408c107af38089c8320631526)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
6c14b0133d r4944: every event_add_*() caller was having to call talloc_steal() to take
control of the event, so instead build that into the function. If you
pass NULL as mem_ctx then it leaves it as a child of the events
structure.
(This used to be commit 7f981b9ed96f39027cbfd500f41e0c2be64cbb50)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
fd62df6418 r4943: Smplified the events handling code a lot. The first source of
complexity was that events didn't automatically cleanup
themselves. This was because the events code was written before we had
talloc destructors, so you needed to call event_remove_XX() to clean
the event out of the event lists from every piece of code that used
events. I have now added automatic event destructors, which in turn
allowed me to simplify a lot of the calling code.

The 2nd source of complexity was caused by the ref_count, which was
needed to cope with event handlers destroying events while handling
them, which meant the linked lists became invalid, so the ref_count ws
used to mark events for later destruction.

The new system is much simpler. I now have a ev->destruction_count,
which is incremented in all event destructors. The event dispatch code
checks for changes to this and handles it.
(This used to be commit a3c7417cfeab429ffb22d5546b205818f531a7b4)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
54eff1435d r4942: converted the cifs backend to not use event_context_merge(). Instead,
is supplies the server event context during the connect.
(This used to be commit 133e67bb1fa661b0e0d340091be4160f9af04fe3)
2007-10-10 13:09:08 -05:00
Stefan Metzmacher
0475cfe570 r4941: - all needed data is now in sam.ldb and hacked.ldb is not needed anymore by the hacked ldap backend
- readd the schema naming context container object as it's needed for a w2k3 dc join

metze
(This used to be commit c583f806231652cce9879e9fc4237a5ab0774346)
2007-10-10 13:09:08 -05:00
Tim Potter
0a15f3edff r4940: Add a variable to hold a list of typedefs for which we shouldn't generate
a dissector for.  A hand written dissector needs to be added to eparser.c
for the plugin to link.
(This used to be commit d4f7f6b0b41cb572320a5aeaf771c5af2b7bf13d)
2007-10-10 13:09:07 -05:00
Andrew Tridgell
fa55d52ede r4939: make a few more private pointers type safe (this might help abartlet
track down a bug he just told me about)
(This used to be commit fb326cbb32ef7eebb7073777d834d6bea25069a7)
2007-10-10 13:09:07 -05:00
Andrew Tridgell
9d6e923aab r4938: allow the caller to supply an existing event_context if they want to
in smb_composite_connect_send(). This makes doing parallel calls much
easier.
(This used to be commit 442308970c123b9fb25615673049e1c1c234a0b9)
2007-10-10 13:09:07 -05:00
Andrew Tridgell
0e9c55e70f r4937: simplify the connect code in the same way
(This used to be commit 347dfa47249d55c61e1e7c82d10444a71aca8a85)
2007-10-10 13:09:07 -05:00
Andrew Tridgell
0db8b5a949 r4936: moved to a convention where the completion function is only called in
one place. This makes the code more robust, and simpler (it would have
prevented the error that volker found).
(This used to be commit 420b53091ee784d7891fb62d48e2f5a225b4dbf8)
2007-10-10 13:09:07 -05:00
Andrew Tridgell
8eb0963c95 r4935: fixed a bug where "c->status = xxx_handler(x);" could write to c after
it is freed. The problem is that the handler might complete the
request, and called the c->async.fn() async handler. That handler
might free the request handle.
(This used to be commit c4faceadc74e0849f6197ccbec9952f6c94f6176)
2007-10-10 13:09:07 -05:00
Tim Potter
8c504b22f0 r4930: Update my copyright.
(This used to be commit 362151788bed06d934f111459abe7f6491362906)
2007-10-10 13:09:06 -05:00
Andrew Tridgell
3b9431ddb9 r4927: parse the NBT session request in the smb server. This gets rid of that
annoying "not parsing session request" message on each SMB connection
(This used to be commit b06b8dd2f4f4fea750b05fd29d68372828159f16)
2007-10-10 13:09:06 -05:00
Andrew Tridgell
aefaa18554 r4924: continue the effort to simplify and generalise the composite
interface. This patch removes the "stage" variable, which is really
better suited to the backend state structures
(This used to be commit 39da684ea8bc72d7a4a12c00eaad56b4f32890a9)
2007-10-10 13:09:06 -05:00
Andrew Bartlett
ba5d77bebd r4923: Avoid using krb5-config in the path if a krb5 prefix was already set.
Andrew Bartlett
(This used to be commit ff8298bb90b78dc52c11e2cdecf5041b9e243f35)
2007-10-10 13:09:06 -05:00
Andrew Tridgell
5ffedbac3d r4922: fixed an infinite loop in the name resolve code when handling a method
in smb.conf that isn't implemented in the library
(This used to be commit dd5b43ed37b37feec4708f8f13033b42eb6a838c)
2007-10-10 13:09:06 -05:00
Andrew Tridgell
d069c368fb r4919: if a caller doesn't provide an event context to the resolver library,
then create one. This fixes a crash in the RAW-NEGNOWAIT test for
'host' resolution.
(This used to be commit 3268d523cc381b9b3077f794bb53daf0865d139c)
2007-10-10 13:09:06 -05:00
Andrew Tridgell
b9a1e9a667 r4916: added "host" name resolution using fork() per gethostbyname()
comments welcome, but please think about the alternatives first :-)
(This used to be commit 3d40b479907226be349137117e0d2bd718efa1a8)
2007-10-10 13:09:05 -05:00
Andrew Tridgell
79ef4f216b r4915: free temp context _before_ the async callback, as the async callback might destroy our top level context
leaving the tmp context freed (so a double free)
(This used to be commit b20c0561b8ec3ec7010f846be7a39165783e15c2)
2007-10-10 13:09:05 -05:00
Andrew Bartlett
9bfd19667a r4914: Fill in the realm for the self-join.
Andrew Bartlett
(This used to be commit bc901ecfb4babe72858185e79b91f6a53c04b71f)
2007-10-10 13:09:05 -05:00
Andrew Tridgell
8485a8d935 r4911: make sure we fill in the transport called name on port 445 as well
(thanks to abartlet for spotting this bug)
(This used to be commit 8b653f12f21e7a8eee8e60cefb193505c2df7f8f)
2007-10-10 13:09:05 -05:00
Andrew Tridgell
a09f8c3052 r4909: fixed name_trn_id generation (thanks to metze for spotting the bug!)
(This used to be commit 9d2d16ce5fd57cad01ddaf1112beed916cc2088d)
2007-10-10 13:09:05 -05:00
Andrew Tridgell
6b5f8665b0 r4901: a bit more info on nbt packets under high debug level
(This used to be commit 9a34af29388d8ca837c670d054a76d1f75098cbd)
2007-10-10 13:09:05 -05:00
Andrew Tridgell
51f3a6a5e8 r4900: build fix for IRIX 6.5
(This used to be commit f6ff9e6f39efdb312384ebb651b8e0f01e9e8df1)
2007-10-10 13:09:05 -05:00
Andrew Tridgell
913006fa2e r4899: fixed build
(This used to be commit 852f1e73b4b4241a61372279318c23369488d3bc)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
6f0aef31cd r4898: - removed the unused wins_srv_*() code
- expanded the generic async name resolver to try multiple methods

- added wins resolutions to the list of methods tried

- fixed up the random trn id generation to use the good random generator
(This used to be commit 266fd2751c01808e5a18d4094032af50554ceb7a)
2007-10-10 13:09:04 -05:00
Andrew Bartlett
757a063a13 r4897: Unbreak the LDAP server. Somehow the generic service structures
(which seem just a little too complex) changed, but this code was not
updated or tested.

Also clarify the existing code, by not reusing variables.

Andrew Bartlett
(This used to be commit eb46adade4a0b9f0977479eb767c0bc7936a9585)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
c0e21a4d3e r4896: make sure the event context doesn't go away while waiting for event completion
(This used to be commit c1063919c069b0b36dd3da6dc6853236629804e3)
2007-10-10 13:09:04 -05:00
Andrew Bartlett
2c0cb15005 r4895: I missed this in my previous 'use secrets.ldb' commit.
Andrew Bartlett
(This used to be commit 53b98c674b28a85eec9748a079c950bd7fa88384)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
a721be4519 r4894: namecache.c is not used any more either
(This used to be commit 24927e69d824a1f3c01b2f63876afdfc6064d5ac)
2007-10-10 13:09:04 -05:00
Andrew Bartlett
4962fd4f28 r4893: Move to using secrets.ldb for the Kerberos verify, instead of
secrets.tdb from Samba3.

Andrew Bartlett
(This used to be commit 21bfda2a0d1c8373f8800269ed9b982e1b9a19e5)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
cda0a7e76e r4892: we don't need nameserv.h any more
(This used to be commit 1c83c80ef2b7e5f9eb5cd2242e37d136aed181b8)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
2383787f19 r4891: - added a generic resolve_name() async interface in libcli/resolve/,
which will eventually try all resolution methods setup in smb.conf

 - only resolution backend at the moment is bcast, which does a
   parallel broadcast to all configured network interfaces, and takes
   the first reply that comes in (this nicely demonstrates how to do
   parallel requests using the async APIs)

 - converted all the existing code to use the new resolve_name() api

 - removed all the old nmb code (yay!)
(This used to be commit 239c310f255e43dd2d1c2433f666c9faaacbdce3)
2007-10-10 13:09:03 -05:00
Andrew Bartlett
f1aaef3015 r4890: Try to cope with mechanism mismatch in the client speaks first version
of the SPNEGO state-machine.  (Such as on LDAP and HTTP)

Andrew Bartlett
(This used to be commit c1cae6b3b1efe109a09e449ed2e09983431eac7e)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
23478fe0ca r4889: make sure ndr print flags are initialised in ndrdump
(This used to be commit c5c65ad8fb21e515535286c52847f3eb990f8036)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
bef3fbb6db r4888: use the neater calling convention
(This used to be commit d93b6a5b8e9e4bf86a96262db21aa3fc1490e91d)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
4ce2cf2199 r4887: removed a bogus cast
(This used to be commit a034556faa5d15fee44a58be3aea8aee8ffae3c8)
2007-10-10 13:09:03 -05:00