1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

56 Commits

Author SHA1 Message Date
Andrew Bartlett
fe9cdb063c r7378: Lowercase netbios name when forming the DNS name of the DC in the
NETLOGON reply.

Use the kdc server service to determine if we are a kdc (no more
krb5:kdc=yes).

Andrew Bartlett
2007-10-10 13:17:48 -05:00
Andrew Tridgell
4c0ed7328b r7321: add nbtd statistics serving over irpc 2007-10-10 13:17:41 -05:00
Stefan Metzmacher
fa652919bd r6904: use "krb5:kdc=yes" in your smb.conf when you have the lorikeet-heimdal kdc running
metze
2007-10-10 13:16:56 -05:00
Simo Sorce
2f80b2070f r6768: Fix wrong comment 2007-10-10 13:16:42 -05:00
Andrew Tridgell
5aff7d36f3 r6750: some minor tweaks to the cldapd server
I can now join winxp -> samba4 DC using long name, and login. The nice
thing is there are no delays now, as the client likes the replies it gets
2007-10-10 13:16:41 -05:00
Andrew Tridgell
8229fe4dd5 r6618: only print the netlogon packets we receive if it is an unknown packet type 2007-10-10 13:16:31 -05:00
Andrew Tridgell
4c2207c946 r6339: set the NBT_SERVER_LDAP and NBT_SERVER_KDC bits based on config
(andrew, please fix the method of sseeing if we do krb5, if you can
think of a better one)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
f4d07d7d3b r6338: ADS style GETDC response now works well enough that WinXP can join
Samba4 without Samba3 nmbd
2007-10-10 13:11:33 -05:00
Andrew Tridgell
df146d64eb r6323: added server side support for dgram NTLOGON requests. NT4 workstations can now login
to a Samba4 domain.
2007-10-10 13:11:31 -05:00
Andrew Tridgell
08ded62156 r6321: added IDL and test suite for NBT dgram 'sam logon' request (sent by
clients when a user tries to login)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
4507bdc339 r6320: some minor netlogon datagram fixes - NT4 can now join a Samba4 domain without
Samba3 nmbd
2007-10-10 13:11:31 -05:00
Andrew Tridgell
406217262d r6288: the nbt dgram server now responds to GETDC requests. It works with our
test suite, but doesn't yet seem to satisfy a nt4 client. I'm
investigating.
2007-10-10 13:11:29 -05:00
Andrew Tridgell
3b34df6a67 r6247: added the server side code for receiving mailslot requests, and
parsing incoming netlogon requests. No replies are sent yet.
2007-10-10 13:11:28 -05:00
Andrew Tridgell
10d64a5253 r6184: the beginnings of the libcli/dgram/ library, and the dgram
server. Currently just listens on port 138 and parses the packets
(using IDL like the rest of NBT). This allows me to develop the
structures and test with real packets
2007-10-10 13:11:24 -05:00
Simo Sorce
d58be9e74b r5585: LDB interfaces change:
changes:
- ldb_wrap disappears from code and become a private structure of db_wrap.c
  thanks to our move to talloc in ldb code, we do not need to expose it anymore

- removal of ldb_close() function form the code
  thanks to our move to talloc in ldb code, we do not need it anymore
  use talloc_free() to close and free an ldb database

- some minor updates to ldb modules code to cope with the change and fix some
  bugs I found out during the process
2007-10-10 13:10:55 -05:00
Andrew Tridgell
0bb997127f r5454: moved the WINS server code into its own directory 2007-10-10 13:10:48 -05:00
Andrew Tridgell
2acd79b959 r5418: - added version numbers to WINS database records in preparation for adding server side
replication support

- on a WACK registration success, check that the database record
  hasn't changed during the WACK processing. If it has, then fail
  the registration
2007-10-10 13:10:44 -05:00
Andrew Tridgell
4d08c11407 r5411: make network interface selection a bit saner
- if we have no configured network interfaces, then don't start nbtd (when I add dynamic
  interface loading this will change to a delay until a network interface comes up)

- choose the best interface by netmask for torture tests that need a
  specific IP (such as the WINS test). Added iface_best_ip() for that.

- if specific interfaces are chosen in smb.conf, then keep that ordering, and
  default to the first one listed
2007-10-10 13:10:43 -05:00
Andrew Tridgell
1558a54528 r5408: - added testing for the behaviour of the special 0x1c name
- added WINS server support for the 0x1c name
2007-10-10 13:10:43 -05:00
Andrew Tridgell
2650b43ca9 r5397: added testing and server support for the special handling required for the 0x1d local master browser name
in WINS
2007-10-10 13:09:51 -05:00
Andrew Tridgell
8dc2a028d3 r5392: added "secure" WINS server processing. Send a WACK on name
registrations from anyone who isn't a current owner, then query the
owner addresses to see if they still want it.
2007-10-10 13:09:50 -05:00
Andrew Tridgell
3690a65bef r5387: - added automatic WINS server record expiry
- added support for group names in registration and query
2007-10-10 13:09:50 -05:00
Andrew Tridgell
807a3a1f80 r5375: use a real DN in the WINS database. We now pass the NBT-WINS test. 2007-10-10 13:09:48 -05:00
Andrew Tridgell
9aa3313b3f r5358: - added initial WINS server code. It passes most of the NBT-WINS test, but doesn't yet
do secure server WACK responses

- added a ldap_string_to_time() function, for converting a LDAP
  formatted time to a time_t
2007-10-10 13:09:45 -05:00
Andrew Tridgell
aac3090e35 r5352: added a function nbt_name_string() that formats a nbt_name structure
as a human readable string. The format is designed to be able to be
used as the DN for the WINS database as well, while coping with
arbitrary bytes in the name (except nul bytes)
2007-10-10 13:09:45 -05:00
Andrew Tridgell
5613e6b8ad r5346: - a bit more preparation for the WINS server going in
- more NBT packet asserts, to ensure that incoming requests have all
  the elements we depend on

- open the WINS database at startup if we are configured as a WINS server

- split out the nbtd server reply packet generation code so it can be
  shared by the WINS server

- re-did the logic of what is answered by the WINS server and what by
  the B node server. It now always tries to answer by the B node, and
  only "recurses" to the WINS server for names that are not found.
2007-10-10 13:09:44 -05:00
Andrew Tridgell
8950718819 r5329: made the nbt server case sensitive 2007-10-10 13:09:43 -05:00
Andrew Tridgell
b902ea546d r5304: removed lib/socket/socket.h from includes.h 2007-10-10 13:09:39 -05:00
Andrew Tridgell
bb1ab11d8e r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)
- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr"
  I think that in general we should move towards "const char *" for
  all IP addresses, as this makes IPv6 much easier, and is also easier
  to debug. Andrew, when you get a chance, could you fix some of the
  auth code to use strings for IPs ?

- return a NTSTATUS error on bad name queries and node status instead
  of using rcode. This makes the calling code simpler.

- added low level name release code in libcli/nbt/

- use a real IP in the register and wins nbt torture tests, as w2k3
  WINS server silently rejects some operations that don't come from the
  IP being used (eg. it says "yes" to a release, but does not in fact
  release the name)
2007-10-10 13:09:37 -05:00
Andrew Tridgell
f7712ac746 r5276: - added support for NBT_OPCODE_REFRESH2 (type 0x9)
- when registering with a WINS server, initially use multi-homed
  registration, then switch to name refresh requests. Send refresh
  requests only to the WINS server that responded to our
  registration. If that server goes away, then start the registration
  from scratch. This makes registration more robust to WINS server
  failure.

- send WINS registration requests out on our first interface rather
  than an unbound interface, to avoid the problem of WACK replies
  being sent to the wrong port (w2k3 WINS server does this)
2007-10-10 13:09:36 -05:00
Andrew Tridgell
919bc14e7b r5260: - show an error message on nmblookup failure
- always try to enable broadcast on nbt name sockets (this matches
  samba3 behaviour better)
2007-10-10 13:09:35 -05:00
Andrew Tridgell
a9128f6544 r5259: make sure we give the ip of the interface that a name query comes in
on as the first IP in a multi-homed reply
2007-10-10 13:09:35 -05:00
Andrew Tridgell
a1553fa805 r5251: - renamed the nbtd server side structures to have a nbtd_ prefix, to
be consistent with the function names

- added WINS client support to the NBT server. It will do initial WINS
  registration, and WINS refresh, automatically failing over to
  secondary WINS servers and handling multi-homed servers where we need
  to register multiple IPs.

- added support for multi-homed name query replies, which are
  essential for multi-homed registration as the WINS server will query
  us to ensure we have the names when doing the secondary IPs in
  multi-homed registration
2007-10-10 13:09:34 -05:00
Andrew Tridgell
8fe477955d r5222: made the nbtd_self_packet() code more efficient 2007-10-10 13:09:32 -05:00
Andrew Tridgell
c5f5e1d401 r5216: don't defend group names against incoming name registration requests 2007-10-10 13:09:32 -05:00
Andrew Tridgell
3e9788691f r5215: register aliases as both client and server node types, so nmblookup can see them 2007-10-10 13:09:32 -05:00
Andrew Tridgell
3270b07539 r5214: added support for "netbios aliases" in smb.conf 2007-10-10 13:09:31 -05:00
Andrew Tridgell
3935b5f7c5 r5213: do our name broadcast refresh requests as register packets not refresh
packets, as w2k3 and Samba3 do not defend against broadcast name
refresh packets
2007-10-10 13:09:31 -05:00
Andrew Tridgell
290dbd8cdc r5212: added checking for receiving our own packets as broadcasts 2007-10-10 13:09:31 -05:00
Andrew Tridgell
9eafe2caca r5211: added broadcast name defense against both registration and refresh
requests
2007-10-10 13:09:31 -05:00
Andrew Tridgell
b07a7e35f2 r5210: changed server side nbt functions to be prefixed with nbtd_ instead of
nbt_, so as to more clearly separate them from the client code in
libcli/nbt/
2007-10-10 13:09:31 -05:00
Andrew Tridgell
7f54c8a339 r5197: moved events code to lib/events/ (suggestion from metze) 2007-10-10 13:09:30 -05:00
Andrew Tridgell
180f29f9e0 r5196: fixed sily bug (that metze found) 2007-10-10 13:09:30 -05:00
Andrew Tridgell
d7b4b6de51 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)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
7720d247fe r5172: actually bind to the right address for the wildcard interface .... 2007-10-10 13:09:28 -05:00
Andrew Tridgell
b3edf17281 r5171: added support for "bind interfaces only" in nbtd. The solution was to
bind twice on each interface, once using the broadcast address and
once using the specific IP. We then only listen on the wildcard
address if we don't have "bind interface only" set. This also happens
to simplify the code that finds the right interface for an incoming
request.
2007-10-10 13:09:28 -05:00
Andrew Tridgell
72048e3717 r5155: define ipv4address as a based IDL type, mapped to a "const char *" in
the header, and defined on the wire as a 4 byte network byte order
IP. This means the calling code doesn't have to worry about network
byte order conversions.
2007-10-10 13:09:28 -05:00
Stefan Metzmacher
79e79552e6 r5147: remove unused var
metze
2007-10-10 13:09:27 -05:00
Stefan Metzmacher
abacbc9192 r5145: define struct ipv4_addr in misc.idl,
so we can use it in nbt.idl and
get a nicer debug output

metze
2007-10-10 13:09:27 -05:00
Andrew Tridgell
cf11d05e35 r5126: the composite code is no longer client specific or smb specific, so
rename the core structure to composite_context and the wait routine to
composite_wait() (suggestion from metze)
2007-10-10 13:09:25 -05:00