1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

41 Commits

Author SHA1 Message Date
Andrew Tridgell
92786aebf1 s4-resolve: fixed a crash bug on timeout
We were creating the name resolution context as a child of lp_ctx,
which meant when we gave up on a connection the timer on name
resolution kept running, and when it timed out the callback crashed as
the socket was already removed.
2009-09-19 08:23:03 -07:00
Andrew Bartlett
aa5cee2288 s4:libnet Use str_list_make_single() in resolv code 2009-05-14 05:56:59 +10:00
Günther Deschner
92f1c0d156 s4-lsa: merge lsa_LookupNames/{2,3,4} from s3 lsa idl.
Guenther
2008-10-27 19:33:23 +01:00
Jelmer Vernooij
218f482fbf Use common strlist implementation in Samba 3 and Samba 4. 2008-10-12 00:56:56 +02:00
Jelmer Vernooij
7e04591520 Remove use of global_loadparm.
(This used to be commit 3cf3922c80)
2008-02-28 21:02:49 +01:00
Jelmer Vernooij
84b4763947 r26441: Remove global_loadparm uses.
(This used to be commit 32007c6277)
2007-12-21 05:50:09 +01:00
Jelmer Vernooij
70ccac0f05 r26435: Remove global_loadparm instance.
(This used to be commit 66fd8d480b)
2007-12-21 05:50:04 +01:00
Jelmer Vernooij
5f4842cf65 r26376: Add context for libcli_resolve.
(This used to be commit 459e1466a4)
2007-12-21 05:49:12 +01:00
Jelmer Vernooij
949f3c7264 r26333: No more global_loadparm in finddcs.
(This used to be commit 0c91026e58)
2007-12-21 05:48:45 +01:00
Jelmer Vernooij
6c77f353d3 r26328: remove more uses of global_loadparm.
(This used to be commit 40ae12c086)
2007-12-21 05:48:41 +01:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139)
2007-10-10 15:07:55 -05:00
Jelmer Vernooij
2f3551ca7c r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
(This used to be commit 3468952e77)
2007-10-10 15:07:34 -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
Stefan Metzmacher
40cd2d7780 r22944: fix bug #4618:
rename private -> private_data

metze
(This used to be commit 58551f2f28)
2007-10-10 14:52:30 -05:00
Rafal Szczesniak
7e14a25dc6 r22811: two more memory allocation checks.
rafal
(This used to be commit d66b13f6fa)
2007-10-10 14:52:19 -05:00
Rafal Szczesniak
665065a1df r22764: - replace talloc_zero with composite_create
- use event context provided with libnet context instead of creating
  a new one

rafal
(This used to be commit ce8414b3da)
2007-10-10 14:52:16 -05:00
Rafal Szczesniak
37457a0f07 r20328: use prereq function instead of local implementation.
rafal
(This used to be commit f79dcd41e7)
2007-10-10 14:29:41 -05:00
Stefan Metzmacher
f767a508a6 r20225: we can't use composite_error() in a _recv() function, as that would
trigger the caller to call the _recv() function again and will be an endless
loop.

this is just a fix the to prevent this, and use a more usefull error code
than NT_STATUS_UNSUCCESSFUL

I think we should move the checks about valid responses into the function
which receives the the response (here continue_name_found()),
so that the _recv() function only needs to transfer the output vars to the caller
without any logic to analyse the network response.

metze
(This used to be commit c02048f480)
2007-10-10 14:29:25 -05:00
Rafal Szczesniak
56d768842e r20222: return status unsuccessful when null pointers are returned
from lookup call.

rafal
(This used to be commit 0eb605cf42)
2007-10-10 14:29:24 -05:00
Stefan Metzmacher
1a1027b824 r20182: make the composite api usage more consistant (only cosmetic change)
metze
(This used to be commit 1f67433914)
2007-10-10 14:29:18 -05:00
Rafal Szczesniak
9775696af1 r20177: return the actual function status code.
rafal
(This used to be commit 2d046cc0df)
2007-10-10 14:29:18 -05:00
Stefan Metzmacher
bdafdec2bb r20166: we have a dom_sid_add_rid() function that adds the rid after allocating
enough memory for the new sub_auth element.

the old version wrote behind the buffer.

also make the output sid a pointer.

metze
(This used to be commit b9901d5f8c)
2007-10-10 14:29:17 -05:00
Rafal Szczesniak
1dd09da392 r20161: Prevent potential segfault in case account is unknown.
rafal
(This used to be commit 9f5f9ee9b4)
2007-10-10 14:29:16 -05:00
Stefan Metzmacher
7c95ae3aca r19482: remove pointless cast
metze
(This used to be commit 81a975100c)
2007-10-10 14:21:41 -05:00
Rafal Szczesniak
1e46d3a46a r17856: The two new functions - libnet_LookupName and libnet_UserInfo.
These two perform name resolving in SAM database and fetching
user account information, respectively. The code is quite rough
yet, but it builds and basic tests work. Now, I'm working on
cleaning it up...

rafal
(This used to be commit 4a932255a0)
2007-10-10 14:16:48 -05:00
Rafal Szczesniak
861ec81048 r16895: Add continue function and prevent from segfaulting (or unpredictable
behaviour) if composite context returned from _send function was NULL.

rafal
(This used to be commit d9fce228d0)
2007-10-10 14:09:57 -05:00
Rafal Szczesniak
833ef6b678 r16693: Name type should be passed further down the lookup engine instead
of assuming only PDC name type. Also, fix the comment.

rafal
(This used to be commit 436c8a7211)
2007-10-10 14:09:38 -05:00
Jelmer Vernooij
17ae598141 r13938: Around round of splitups
(This used to be commit 2d655f0528)
2007-10-10 13:52:29 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Andrew Bartlett
34aa19cafe r13317: Create a new function messaging_client_init() which can be used when
we don't have a server messaging context.  We should replace the
datagram messages with stream sockets in this case, so we don't have
to create a unique socket.

Andrew Bartlett
(This used to be commit fd974fb647)
2007-10-10 13:51:43 -05:00
Andrew Bartlett
4b2ed199ca r12861: Cope when we are not supplied the messaging context. This is just
another case where we have to fallback to the node status request.

Andrew Bartlett
(This used to be commit 181064dbcf)
2007-10-10 13:50:54 -05:00
Andrew Bartlett
b135f4467f r12858: This moves the libnet_LookupPdc code to use a GetDC request to find
the remote server's name, or in the absence of a local nbt_server to
communicate with (or without root access), a node status request.

The result is that we are in a better position to use kerberos, as well
as to remove the 'password server' mandatory parameter for the samsync
and samdump commands.  (I need this to put these into SWAT).

The only problem I have is that I must create a messaging context, which
requires a server ID.  As a client process, I don't expect to get
messages, but it is currently required for replies, so I generate a
random() number.  We probably need the servers to accept connections on
streamed sockets too, for client-only tasks that want IRPC.

Because I wanted to test this code, I have put the NET-API-* tests into
our test scripts, to ensure they pass and keep passing.  They are good
frontends onto the libnet system, and I see no reason not to test them.

In doing so the NET-API-RPCCONNECT test was simplified to take a
binding string on the command line, removing duplicate code, and
testing the combinations in the scripts instead.

(I have done a bit of work on the list shares code in libnet_share.c
to make it pass 'make test')

In the future, I would like to extend the libcli/findds.c code (based
off volker's winbind/wb_async_helpers.c, which is why it shows up a bit
odd in the patch) to handle getting multiple name replies, sending a
getdc request to each in turn.

(posted to samba-technical for review, and I'll happily update with
any comments)

Andrew Bartlett
(This used to be commit 7ccddfd351)
2007-10-10 13:50:54 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Andrew Tridgell
f8391489bf r11794: - fixed a valgrind error in libnet, caused by using a stack variable
after the function has returned (the *address variable was assigned
  into the state).

- changed libnet to use event_context_find() instead of
  event_context_init(), so it works as a child of existing code that
  uses a event context
(This used to be commit 47ceb2d355)
2007-10-10 13:46:28 -05:00
Rafal Szczesniak
e1bea4eaf5 r11747: Move buffer allocation to libnet_Lookup function so that the
caller is not required to ensure it.

rafal
(This used to be commit 85456e6c0b)
2007-10-10 13:46:21 -05:00
Stefan Metzmacher
ab4d635b92 r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
(This used to be commit 4527815a0a)
2007-10-10 13:38:57 -05:00
Rafal Szczesniak
e6b54f7acf r8076: Put name resolution methods into libnet_context. This allows libnet based
application use methods of their own choice and makes it less dependent on
smb.conf parameters.
Use libnet_context in libnet_Lookup functions which is the way to pass
default name resolution methods if caller doesn't want to bother with
specifying them.

rafal
(This used to be commit d0ea136356)
2007-10-10 13:19:05 -05:00
Rafal Szczesniak
cc98a92bb0 r7816: Implementation of "shortcut" function for those (probably many) who
don't like to bother with netbios type names when looking for common
types: hosts (servers) and domain controllers. Also, apropriate tests

rafal
(This used to be commit 50cd94be0f)
2007-10-10 13:18:40 -05:00
Rafal Szczesniak
7b23cd4588 r7748: Use state structure in connection with io to get returned address.
rafal
(This used to be commit 345a71a08e)
2007-10-10 13:18:30 -05:00
Rafal Szczesniak
f7e3089c37 r7734: A few missing pieces...
rafal
(This used to be commit 15e2a67fe0)
2007-10-10 13:18:28 -05:00
Rafal Szczesniak
204722b868 r7732: Implementation of very basic lookup function (to be used in more
specific routines like resolving a pdc).
Also, couple of formatting fixes.

rafal
(This used to be commit b9deaa995d)
2007-10-10 13:18:27 -05:00