1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-29 16:23:52 +03:00
Commit Graph

25 Commits

Author SHA1 Message Date
Rafal Szczesniak
f79dcd41e7 r20328: use prereq function instead of local implementation.
rafal
2007-10-10 14:29:41 -05:00
Stefan Metzmacher
c02048f480 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
2007-10-10 14:29:25 -05:00
Rafal Szczesniak
0eb605cf42 r20222: return status unsuccessful when null pointers are returned
from lookup call.

rafal
2007-10-10 14:29:24 -05:00
Stefan Metzmacher
1f67433914 r20182: make the composite api usage more consistant (only cosmetic change)
metze
2007-10-10 14:29:18 -05:00
Rafal Szczesniak
2d046cc0df r20177: return the actual function status code.
rafal
2007-10-10 14:29:18 -05:00
Stefan Metzmacher
b9901d5f8c 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
2007-10-10 14:29:17 -05:00
Rafal Szczesniak
9f5f9ee9b4 r20161: Prevent potential segfault in case account is unknown.
rafal
2007-10-10 14:29:16 -05:00
Stefan Metzmacher
81a975100c r19482: remove pointless cast
metze
2007-10-10 14:21:41 -05:00
Rafal Szczesniak
4a932255a0 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
2007-10-10 14:16:48 -05:00
Rafal Szczesniak
d9fce228d0 r16895: Add continue function and prevent from segfaulting (or unpredictable
behaviour) if composite context returned from _send function was NULL.

rafal
2007-10-10 14:09:57 -05:00
Rafal Szczesniak
436c8a7211 r16693: Name type should be passed further down the lookup engine instead
of assuming only PDC name type. Also, fix the comment.

rafal
2007-10-10 14:09:38 -05:00
Jelmer Vernooij
2d655f0528 r13938: Around round of splitups 2007-10-10 13:52:29 -05:00
Jelmer Vernooij
1228358767 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
2007-10-10 13:52:24 -05:00
Andrew Bartlett
fd974fb647 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
2007-10-10 13:51:43 -05:00
Andrew Bartlett
181064dbcf 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
2007-10-10 13:50:54 -05:00
Andrew Bartlett
7ccddfd351 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
2007-10-10 13:50:54 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Andrew Tridgell
47ceb2d355 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
2007-10-10 13:46:28 -05:00
Rafal Szczesniak
85456e6c0b r11747: Move buffer allocation to libnet_Lookup function so that the
caller is not required to ensure it.

rafal
2007-10-10 13:46:21 -05:00
Stefan Metzmacher
4527815a0a 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
2007-10-10 13:38:57 -05:00
Rafal Szczesniak
d0ea136356 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
2007-10-10 13:19:05 -05:00
Rafal Szczesniak
50cd94be0f 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
2007-10-10 13:18:40 -05:00
Rafal Szczesniak
345a71a08e r7748: Use state structure in connection with io to get returned address.
rafal
2007-10-10 13:18:30 -05:00
Rafal Szczesniak
15e2a67fe0 r7734: A few missing pieces...
rafal
2007-10-10 13:18:28 -05:00
Rafal Szczesniak
b9deaa995d r7732: Implementation of very basic lookup function (to be used in more
specific routines like resolving a pdc).
Also, couple of formatting fixes.

rafal
2007-10-10 13:18:27 -05:00