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

26 Commits

Author SHA1 Message Date
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