kai/samba-autobuild/.git
16 years agor11052: bring samba4 uptodate with the samba4-winsrepl branch,
Stefan Metzmacher [Fri, 14 Oct 2005 14:02:47 +0000 (14:02 +0000)]
r11052: bring samba4 uptodate with the samba4-winsrepl branch,
before the bad merge

metze
(This used to be commit 471c0ca4abb17fb5f73c0efed195c67628c1c06e)

16 years agor11051: fix the build,
Stefan Metzmacher [Fri, 14 Oct 2005 13:19:31 +0000 (13:19 +0000)]
r11051: fix the build,

sorry for the latest spam!

I was testing svk push (wasn't such a good idea...)

metze
(This used to be commit fd5e746d8f6760dcb7a40bfe04201711b77ff24b)

16 years agor11048: r10539@SERNOX: metze | 2005-09-27 14:59:47 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 13:02:00 +0000 (13:02 +0000)]
r11048:  r10539@SERNOX:  metze | 2005-09-27 14:59:47 +0200
 fix the build for changes from SAMBA_4_0 branch

 metze
 r10541@SERNOX:  metze | 2005-09-27 15:05:33 +0200
 use a transaction when we allocate a new version

 metze
 r10549@SERNOX:  metze | 2005-09-27 18:58:37 +0200
 - add first start of wins pull replication
 - we not yet apply records to our database but we fetch them correct form our partners
   (we need conflict handling for this)
 - we also need to filter out our own records!

 metze
 r10568@SERNOX:  metze | 2005-09-28 11:33:04 +0200
 move composite helpers to a seperate file, create a a seperate file for the conflict resolving logic

 metze
 r10571@SERNOX:  metze | 2005-09-28 12:00:17 +0200
 add forward declarations...to fix the build

 metze
 r10612@SERNOX:  metze | 2005-09-29 16:11:06 +0200
 we have a nbt_name now, and don't need to parse it

 metze
 r10614@SERNOX:  metze | 2005-09-29 16:38:35 +0200
 filter out our own records

 metze
 r10620@SERNOX:  metze | 2005-09-29 18:07:08 +0200
 - handle mutliple addresses in WREPL_REPL_SEND_REPLY
 - make strings always valid talloc pointers

 metze
 r10621@SERNOX:  metze | 2005-09-29 18:09:41 +0200
 use debug level 2

 metze
 r10622@SERNOX:  metze | 2005-09-29 18:48:05 +0200
 - add one more debug message when we reply no record
 - fix min max logic

 metze
 r10623@SERNOX:  metze | 2005-09-29 20:49:06 +0200
 build fixes...

 metze
 r10629@SERNOX:  metze | 2005-09-30 00:11:41 +0200
 - use seperate attributes for type, state, nodetype, is_static

 ... the winserver.c code needs some more updates to correctly,
 create special group and multihomed registrations...

 metze
 r10640@SERNOX:  metze | 2005-09-30 04:07:34 +0200
 - add some short path for the composite helper functions
   they will be used in the next commit

 metze
 r10642@SERNOX:  metze | 2005-09-30 06:29:06 +0200
 fix the build

 metze
 r10655@SERNOX:  metze | 2005-09-30 17:36:49 +0200
 - implement the WREPL_REPL_UPDATE* and WREPL_REPL_INFORM*
   this includes the connection fliping into a client connection
   for WREPL_REPL_UPDATE*

 NOTE: I not yet found out how to get the w2k server to use INFORM against samba4
       it uses inform against w2k and w2k3 but UPDATE against nt4 and samba4

 what's left now is to be able to initiate INFORM and UPDATE requests to notify
 our pull partners

 metze
 r10727@SERNOX:  metze | 2005-10-05 14:11:05 +0200
 fix the build

 metze
 r10770@SERNOX:  metze | 2005-10-06 16:56:01 +0200
 - move the table filling to a seperate function, will be reused later
 - fix the build, wrepl_nbt_name fixes
 - remove state -> update_state

 metze
 r10771@SERNOX:  metze | 2005-10-06 17:04:48 +0200
 add a function to create a wreplsrv_in_connection from a client connection

 metze
 r10772@SERNOX:  metze | 2005-10-06 17:13:51 +0200
 - make the connection code more generic to handle the pull cached connection,
   push cached connection or given connections
 - when we don't use a cached connection, disconnection when a pull_cycle is done
 - fix the build and use the configured source ip

 metze
 r10773@SERNOX:  metze | 2005-10-06 17:18:49 +0200
 - add composite functions for push notification

 metze
 r10774@SERNOX:  metze | 2005-10-06 17:23:46 +0200
 - use periodic push notifycation, this is just for now
   as it needs to be configurable and and be triggered when the local database
   has changes since the last notify
 - I also need to work out how to decide if the partner supports
   persistent connections and WREPL_REPL_INFORM* messages

 metze
 r10923@SERNOX:  metze | 2005-10-12 16:52:34 +0200
 fix the build becuse of conflicts with main SAMBA_4_0 tree

 metze
(This used to be commit 6d97dd6e50423758d081459ec551f4e04dfd818d)

16 years agor11047:
Stefan Metzmacher [Fri, 14 Oct 2005 13:00:36 +0000 (13:00 +0000)]
r11047:
(This used to be commit 177d60f42ac05da2efe47fe4911bc5818662a7cd)

16 years agor11045:
Stefan Metzmacher [Fri, 14 Oct 2005 12:57:23 +0000 (12:57 +0000)]
r11045:
(This used to be commit a2c6969306a18b0bb9629b3eae8a5e4a1aeae285)

16 years agor11044:
Stefan Metzmacher [Fri, 14 Oct 2005 12:57:00 +0000 (12:57 +0000)]
r11044:
(This used to be commit 914e16f5676234862ebaf5d3c6e02bc1eb47ce51)

16 years agor11043: r10362@SERNOX: metze | 2005-09-20 22:37:28 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:56:42 +0000 (12:56 +0000)]
r11043:  r10362@SERNOX:  metze | 2005-09-20 22:37:28 +0200
 repare for pull replication support

 metze
(This used to be commit a75402c45f5bcd3b199ad30af06ee34161c5560b)

16 years agor11042: r10361@SERNOX: metze | 2005-09-20 22:36:28 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:56:26 +0000 (12:56 +0000)]
r11042:  r10361@SERNOX:  metze | 2005-09-20 22:36:28 +0200
 we should only use 255.255.255.255 for group records,
 only when we reply, not when the name is registered.
 the real address is used for replication

 metze
(This used to be commit 45a774c63cbbe4dbd6e17510cf2c7d59d30ea9be)

16 years agor11041: r10358@SERNOX: metze | 2005-09-20 21:40:03 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:56:13 +0000 (12:56 +0000)]
r11041:  r10358@SERNOX:  metze | 2005-09-20 21:40:03 +0200
 fix some missing nbt_peer_socket cases

 metze
(This used to be commit bd25231c57f60296ad954d4f333c14d83781a1d1)

16 years agor11040: r10357@SERNOX: metze | 2005-09-20 21:28:11 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:55:59 +0000 (12:55 +0000)]
r11040:  r10357@SERNOX:  metze | 2005-09-20 21:28:11 +0200
 - as the old records are broken sinse the last winsdb_dn() changes, (the dn components order was reversed)
   we can use nicer attribute and objectClass names...

 - use much more verbose error handling for winsdb_*
 - print a debug message when we found a corrupted record

 metze
(This used to be commit 82bad3f3efec5b706a65e65054787f1486d7c875)

16 years agor11039: r10352@SERNOX: metze | 2005-09-20 16:50:04 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:55:41 +0000 (12:55 +0000)]
r11039:  r10352@SERNOX:  metze | 2005-09-20 16:50:04 +0200
 move stuff the belong to incoming connections only
 into a seperate file wrepl_in_connection.c

 metze
(This used to be commit c2b2b582203d9fe2596ebc9cf2600d52e6f61831)

16 years agor11038: r10351@SERNOX: metze | 2005-09-20 16:11:17 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:55:27 +0000 (12:55 +0000)]
r11038:  r10351@SERNOX:  metze | 2005-09-20 16:11:17 +0200
 fix namebuf_len, when type is 0x00

 metze
(This used to be commit 1b2effa01bf16f9575e7e43e037a0797f98426b8)

16 years agor11037:
Stefan Metzmacher [Fri, 14 Oct 2005 12:54:52 +0000 (12:54 +0000)]
r11037:
(This used to be commit 6913e338405a5aca5c70cf6e022532c596ed0a36)

16 years agor11036: r10349@SERNOX: metze | 2005-09-20 15:38:31 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:54:26 +0000 (12:54 +0000)]
r11036:  r10349@SERNOX:  metze | 2005-09-20 15:38:31 +0200
 we know answer send_requests correctly

 metze
(This used to be commit aecc9ca1cc78ce5ea766954629c03ea866c36bc1)

16 years agor11035: r10347@SERNOX: metze | 2005-09-20 13:40:24 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:54:06 +0000 (12:54 +0000)]
r11035:  r10347@SERNOX:  metze | 2005-09-20 13:40:24 +0200
 make wreplsrv_find_owner public

 metze
(This used to be commit 6fa37c0a2bc1d2f0d29c69d8448276c1f1791a45)

16 years agor11034: r10344@SERNOX: metze | 2005-09-20 11:35:54 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:53:50 +0000 (12:53 +0000)]
r11034:  r10344@SERNOX:  metze | 2005-09-20 11:35:54 +0200
 create winsdb_record() and winsdb_message() as public functions
 so that they can be used in the wrepl_server/

 metze
(This used to be commit b8b48c8aa5f741ad020d0a4debac665f8b2953ab)

16 years agor11033: r10343@SERNOX: metze | 2005-09-20 11:03:20 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:52:51 +0000 (12:52 +0000)]
r11033:  r10343@SERNOX:  metze | 2005-09-20 11:03:20 +0200
 - reply to table_queries
 - reply to a send_request with an empty send_reply

 metze
(This used to be commit a25279f05243fc89c2cc9267d59974bc17eaf47c)

16 years agor11032: r10342@SERNOX: metze | 2005-09-20 11:00:26 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:52:35 +0000 (12:52 +0000)]
r11032:  r10342@SERNOX:  metze | 2005-09-20 11:00:26 +0200
 - load our wins partners at start time:
 # this is a sample partner record:
 dn: name=SERNOX4-1,CN=PARTNERS
 objectClass: wreplPartner
 name: SERNOX4-9
 address: 172.31.1.1
 ourAddress: 172.31.9.1
 type: 0x3
 pullInterval: 3600

 - go through all winsdb records in the database and create the wins_owner table,
   but don't add ourself to it as out nbt task will update the db too, we refetch
   the local max_versiion, each time we need it, (that typicaly onces per replication cycle)

 metze
(This used to be commit 4490a2864e21f957547c30675e5f096a4409e5fb)

16 years agor11030: r10338@SERNOX: metze | 2005-09-20 09:20:49 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:51:51 +0000 (12:51 +0000)]
r11030:  r10338@SERNOX:  metze | 2005-09-20 09:20:49 +0200
 fix uninitialized variable

 metze
(This used to be commit e6fb40e51d2742c05c2fbbb96f367710e46ba7ae)

16 years agor11029:
Stefan Metzmacher [Fri, 14 Oct 2005 12:51:36 +0000 (12:51 +0000)]
r11029:
(This used to be commit 49e61d011c702ae51982d45025ad35e44a6c39d6)

16 years agor11027: r10319@SERNOX: metze | 2005-09-19 18:31:23 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:50:11 +0000 (12:50 +0000)]
r11027:  r10319@SERNOX:  metze | 2005-09-19 18:31:23 +0200
 - store the wins owner on the record and the wins owner and expire time on each address
 - we use "0.0.0.0" to mark entries which are registered at the local wins server
 - we use this ldif-format:
 address: 172.31.9.1;winsOwner:0.0.0.0;expireTime:20050923032337.0Z
 address: 172.31.1.1;winsOwner:172.31.9.202;expireTime:20050923032330.0Z

 metze
(This used to be commit 752025a0e10bfea646784087b5128841ec127a65)

16 years agor11026: r10318@SERNOX: metze | 2005-09-19 16:38:15 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:49:55 +0000 (12:49 +0000)]
r11026:  r10318@SERNOX:  metze | 2005-09-19 16:38:15 +0200
 move to struct winsdb_addr, (I'll add expiry_time and the wins_owner later

 tridge: can you please review the new winsdb_addr_* functions carefull, look for off-by-one bugs, etc.

 metze
(This used to be commit 72eba90465c478ac9d363ed0c88efea27afd158e)

16 years agor11025: r10313@SERNOX: metze | 2005-09-19 12:19:27 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:49:36 +0000 (12:49 +0000)]
r11025:  r10313@SERNOX:  metze | 2005-09-19 12:19:27 +0200
 add wrapper functions for the "address" attribute in the winsdb,
 the goal is to store the expiry time and the wins owner per address,
 which is needed for wins replication

 metze
(This used to be commit 2fd3bbd0449af3702bf473f97474bc1343f7a502)

16 years agor11024: r10311@SERNOX: metze | 2005-09-19 11:27:34 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:48:34 +0000 (12:48 +0000)]
r11024:  r10311@SERNOX:  metze | 2005-09-19 11:27:34 +0200
 remove doublicate NULL-pointer check

 metze
(This used to be commit eb1dee09652beb6d401cdc2058427db5f18bea67)

16 years agor11023: r10310@SERNOX: metze | 2005-09-19 11:21:39 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:48:20 +0000 (12:48 +0000)]
r11023:  r10310@SERNOX:  metze | 2005-09-19 11:21:39 +0200
 - open the winsdb in the wrepl server
 - add dummy function for setup the replication partners

 metze
(This used to be commit da3d18e4545da3bd1841ffc31f253e533f7ea016)

16 years agor11022: r10309@SERNOX: metze | 2005-09-19 11:08:37 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:47:57 +0000 (12:47 +0000)]
r11022:  r10309@SERNOX:  metze | 2005-09-19 11:08:37 +0200
 - add winsdb_connect() function, so that the winsdb can be opened by the wrepl_server/ code
 - remove maintaining of a min_version field, as it was implemented incorrect, and is maybe not needed at all
 - fix handling of max_version, (we started with 0, on each server start)

 metze
(This used to be commit e6106e21a0b097ec45948a08f499e44d32db8d2a)

16 years agor11014: r10139@SERNOX: metze | 2005-09-10 10:32:36 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:44:47 +0000 (12:44 +0000)]
r11014:  r10139@SERNOX:  metze | 2005-09-10 10:32:36 +0200
 - w2k just ignores invalid packets, so we do now
 - w2k only checks the assoc_ctx when the opcode has the sepcific obcode bit's set
 - terminate the connection, when getting a WREPL_STOP_ASSOCIATION packet
 - some more special error handling

 proper torture test for all this cases are following later

 metze
(This used to be commit 42b69461aad3942dde361d61b950445dd39882aa)

16 years agor11011: r10124@SERNOX: metze | 2005-09-09 20:22:00 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:43:50 +0000 (12:43 +0000)]
r11011:  r10124@SERNOX:  metze | 2005-09-09 20:22:00 +0200
  r10113@SERNOX:  metze | 2005-09-09 18:00:02 +0200
  rename libcli/wins to libcli/wrepl

  metze
  r10115@SERNOX:  metze | 2005-09-09 18:01:49 +0200
  bind client connection to the best interface, to the partner

  metze
  r10116@SERNOX:  jelmer | 2005-09-09 18:23:50 +0200
  Print out a couple more warnings.
(This used to be commit 66f931071e41dbd871ca8e1c2de8414a6230ab33)

16 years agor11007: r10109@SERNOX: metze | 2005-09-09 12:29:12 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:38:07 +0000 (12:38 +0000)]
r11007:  r10109@SERNOX:  metze | 2005-09-09 12:29:12 +0200
 - move structs to a seperate header file
 - move the code for the wreplsrv_in_call handling to a seperate file

 metze
(This used to be commit c9a8544446312d96ecadcf370af76d9dc5b2531a)

16 years agor11004: r10083@SERNOX: metze | 2005-09-08 16:50:32 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:37:13 +0000 (12:37 +0000)]
r11004:  r10083@SERNOX:  metze | 2005-09-08 16:50:32 +0200
 This is the start of a WINS-Replicaton server:

 The design is to handle incoming and outgoing connections,
 in one process, because it make thing much easier, and there's
 no need to it otherwise.

 The current code only parses incoming packets, and can reply
 to them, but currently only a standard error packets STOP_ASSOCIATON
 with reason == 4 (I think it means your are not configured as a wins partner of me)

 (the server service is called "wrepl")

 metze
(This used to be commit 55a2016ba379d035cd559fb55a280e2ee9f15178)

16 years agor10997: r11980@SERNOX (orig r10037): metze | 2005-09-05 14:21:40 +0200
Stefan Metzmacher [Fri, 14 Oct 2005 12:22:15 +0000 (12:22 +0000)]
r10997:  r11980@SERNOX (orig r10037):  metze | 2005-09-05 14:21:40 +0200
 add struct nbt_peer_socket and use it instead of passing const char *addr, uint16 port everyhwere

 (tridge: can you review this please, (make test works)

 metze
(This used to be commit a599d7a4ae881c94be2c2d908a398838549942bb)

16 years agor10995: fix released vs. released
Stefan Metzmacher [Fri, 14 Oct 2005 12:01:22 +0000 (12:01 +0000)]
r10995: fix released vs. released

metze
(This used to be commit 573c2df2badbba12fb4d909e7ad4edf6678c7851)

16 years agor10993: - make us able to check released records, we can only do that by finding...
Stefan Metzmacher [Fri, 14 Oct 2005 11:18:01 +0000 (11:18 +0000)]
r10993: - make us able to check released records, we can only do that by finding out the old record was gone
- add more printf(), so -d 10 isn't needed any more

metze
(This used to be commit afe5d2ab8522671607faafc3de895e4ff915dab4)

16 years agor10991: - create always a valid bind_info28 blocks, so that we don't need to work...
Stefan Metzmacher [Fri, 14 Oct 2005 08:19:21 +0000 (08:19 +0000)]
r10991: - create always a valid bind_info28 blocks, so that we don't need to work with unions
  in the main code
- loop also in level 1,2 replies

metze
(This used to be commit c3276bd169961d04f2bd541e6b73ee40df016c3d)

16 years agor10990: the beginnings of a program designed to work out the minimal schema
Andrew Tridgell [Fri, 14 Oct 2005 07:38:16 +0000 (07:38 +0000)]
r10990: the beginnings of a program designed to work out the minimal schema
needed to represent all the current records on a ADS LDAP server. The
idea is we will use something based on this code to work out exactly
what schema elements we will need for our initial ADS schema. I plan
on expanding this code to automatically work out attribute properties,
and write out a schema file that we can load into ldb.

Interestingly, it looks like we only need 43 objectclasses and around
200 attributes to represent all records of a newly installed w2k3 ADS
server.
(This used to be commit 7b0ae77757d347d2b0f5bac3a49e915e24c3ab78)

16 years agor10988: print out the password blobs, with
Stefan Metzmacher [Fri, 14 Oct 2005 06:58:39 +0000 (06:58 +0000)]
r10988: print out the password blobs, with

--option="dssync:print_pwd_blobs=yes"

metze
(This used to be commit b06de6d39cd21d5096e4041e218370263d8096b0)

16 years agor10987: add support for tcp kdc requests
Stefan Metzmacher [Fri, 14 Oct 2005 06:12:05 +0000 (06:12 +0000)]
r10987: add support for tcp kdc requests

metze
(This used to be commit 4c4f19cc23d256c600819e8b0fddc7734b97e131)

16 years agor10986: loop also when we use mszip compression
Stefan Metzmacher [Fri, 14 Oct 2005 06:07:23 +0000 (06:07 +0000)]
r10986: loop also when we use mszip compression

metze
(This used to be commit e32488667c59c30d66528e8fa31c55037f36cd01)

16 years agor10985: To aid in testing, this allows us to easily force kerberos to use UDP or...
Andrew Bartlett [Fri, 14 Oct 2005 06:06:18 +0000 (06:06 +0000)]
r10985: To aid in testing, this allows us to easily force kerberos to use UDP or TCP.

Andrew Bartlett
(This used to be commit ae0b4028ff7033dab70687376c2090baa692cf58)

16 years agor10984: fix valgrind warnings, I had used that to check if w2k3 accept random values...
Stefan Metzmacher [Fri, 14 Oct 2005 05:52:03 +0000 (05:52 +0000)]
r10984: fix valgrind warnings, I had used that to check if w2k3 accept random values here,
as w2k generates also random stuff here

metze
(This used to be commit e04c78e4e925ce385651eb0e77e3ea7aee9e8008)

16 years agor10983: Another case were we want to avoid DNS for unqualified names.
Andrew Bartlett [Fri, 14 Oct 2005 05:29:44 +0000 (05:29 +0000)]
r10983: Another case were we want to avoid DNS for unqualified names.

Andrew Bartlett
(This used to be commit 1d7094b8dfd53dfda55db7ce30f47f74864093bf)

16 years agor10982: Move credentials.h into auth/credentials, and add flags needed by
Andrew Bartlett [Fri, 14 Oct 2005 04:04:52 +0000 (04:04 +0000)]
r10982: Move credentials.h into auth/credentials, and add flags needed by
previous patch.

Andrew Bartlett
(This used to be commit 2c537d47ba99885c6462016342b1cc29df4c54c5)

16 years agor10981: Pull code to decide between and implement NTLMv2, NTLM and LM
Andrew Bartlett [Fri, 14 Oct 2005 03:57:35 +0000 (03:57 +0000)]
r10981: Pull code to decide between and implement NTLMv2, NTLM and LM
authentication out of the various callers and into the kitchen
sink.. err, credentials subsystem.

This should ensure consistant logic, as well as get us one step closer
to security=server operation in future.

Andrew Bartlett
(This used to be commit 09c95763301c0f7770d56462e8af4169b8c171fb)

16 years agor10980: Use ldb_attr_cmp and ldb_dn_escape_value
Andrew Bartlett [Fri, 14 Oct 2005 02:05:51 +0000 (02:05 +0000)]
r10980: Use ldb_attr_cmp and ldb_dn_escape_value

Andrew Bartlett
(This used to be commit 2b1c88f628b27ffda08de3f4ac83c1f3b052a078)

16 years agor10973: - make debugging a bit easier
Stefan Metzmacher [Thu, 13 Oct 2005 18:58:30 +0000 (18:58 +0000)]
r10973: - make debugging a bit easier
- add unique vs. normal group section in replica vs replica conflict testing

metze
(This used to be commit b94be6b1191aa18642b334dc1fe1529d977d6c57)

16 years agor10971: - test static records with the same owner too
Stefan Metzmacher [Thu, 13 Oct 2005 18:24:30 +0000 (18:24 +0000)]
r10971: - test static records with the same owner too
- test with different owners, and all combinations
  of unique records

metze
(This used to be commit 8df80c5649467be6cb4dd532974a083173a5a920)

16 years agor10967: move the function in the order they are used
Stefan Metzmacher [Thu, 13 Oct 2005 16:38:52 +0000 (16:38 +0000)]
r10967: move the function in the order they are used

metze
(This used to be commit 6f44ae5a6950cee5722758030df862b0f919f43b)

16 years agor10965: - only run the cross connection assoc test when running with -X
Stefan Metzmacher [Thu, 13 Oct 2005 16:27:05 +0000 (16:27 +0000)]
r10965: - only run the cross connection assoc test when running with -X
  this sometimes crashes the windows server
- add the first replication conflict tests
  we now test that replica records are always overwritten
  when the owner is the same

metze
(This used to be commit f93353ac41441e0ca7b31c82318005438cd00ce5)

16 years agor10959: fix compiler warnings
Stefan Metzmacher [Thu, 13 Oct 2005 10:02:36 +0000 (10:02 +0000)]
r10959: fix compiler warnings

metze
(This used to be commit 9a9311fa6b4bbb2a385413c056c8be57cdb9eb59)

16 years agor10957: make a comment clearer
Andrew Tridgell [Thu, 13 Oct 2005 07:54:38 +0000 (07:54 +0000)]
r10957: make a comment clearer
(This used to be commit d379fb5f101155edd5f266ae9aaae4e7ac7bd76b)

16 years agor10956: Tridge thought some comments might be a good idea :-)
Andrew Bartlett [Thu, 13 Oct 2005 07:47:57 +0000 (07:47 +0000)]
r10956: Tridge thought some comments might be a good idea :-)

Andrew Bartlett
(This used to be commit c0d6126effdf31e0a107c06a400973c731e0e263)

16 years agor10955: finally worked out why our computer accounts were being identified as users...
Andrew Tridgell [Thu, 13 Oct 2005 06:09:37 +0000 (06:09 +0000)]
r10955: finally worked out why our computer accounts were being identified as users in mmc.

The problem was that the samdb module was auto-adding objectClass=user
for these accounts. That would be OK, as computer accounts are
supposed to be in that objectClass, but mmc cares about the order of
the values in the objectClass attribute! It looks for the last value,
and takes that as the value to use when deciding how to manipulate the record.

So, this patch adds an explicit objectClass=user to the record when it
gets created, which tells the samdb module to not add it as well. That
fixes the order. I suspect we are missing something else though - is
objectClass supposed to auto-sort based on the schema?
(This used to be commit 68c5f807fdb99fd605154d455e61a08293cbd2d0)

16 years agor10954: added support for canonicalName in the operational module, using the
Andrew Tridgell [Thu, 13 Oct 2005 05:04:16 +0000 (05:04 +0000)]
r10954: added support for canonicalName in the operational module, using the
dn->canonicalName function abartlet just committed
(This used to be commit 197e8a27f0557869eacd17b74e1b14e0665883b1)

16 years agor10953: Add a new function to form a canonicalName out of a DN to ldb_dn.c
Andrew Bartlett [Thu, 13 Oct 2005 04:24:49 +0000 (04:24 +0000)]
r10953: Add a new function to form a canonicalName out of a DN to ldb_dn.c

Use this new function in the client and server for the CrackNames
case, where we particularly need it.

Andrew Bartlett
(This used to be commit 380037ee09ef8293bdb288d6c015e7c80f180a30)

16 years agor10950: More cracknames variations (including expected values) than you can
Andrew Bartlett [Thu, 13 Oct 2005 02:07:29 +0000 (02:07 +0000)]
r10950: More cracknames variations (including expected values) than you can
poke a stick at...

Andrew Bartlett
(This used to be commit e4b21300304f8c66c81fa0d15198c640d87db68e)

16 years agor10946: Use the right name for the remote workstation, and always initialise it.
Andrew Bartlett [Wed, 12 Oct 2005 22:25:51 +0000 (22:25 +0000)]
r10946: Use the right name for the remote workstation, and always initialise it.

Should fix a valgrind error volker is seeing.

Andrew Bartlett
(This used to be commit 11957c5f37fe0a0be465a9ce9d6d256724c5951c)

16 years agor10945: Free the salt after we are done with it. May need a merge to similar
Andrew Bartlett [Wed, 12 Oct 2005 22:24:43 +0000 (22:24 +0000)]
r10945: Free the salt after we are done with it.  May need a merge to similar
code in Samba3.

Andrew Bartlett
(This used to be commit 36e302bac87d0a07c86cc4c841d376c778630dab)

16 years agor10941: Hmmm. Making that fn static is more correct.
Volker Lendecke [Wed, 12 Oct 2005 20:56:39 +0000 (20:56 +0000)]
r10941: Hmmm. Making that fn static is more correct.
(This used to be commit eaf347bdeaaddb655fe72ddb98f3a67ace795937)

16 years agor10940: add struct definition
Volker Lendecke [Wed, 12 Oct 2005 20:55:33 +0000 (20:55 +0000)]
r10940: add struct definition
(This used to be commit 295271a329586d0858b6d6b845b8ebba3d035f5f)

16 years agor10936: Commit work in progress: wb_pam_auth_crap made async. This does not work...
Volker Lendecke [Wed, 12 Oct 2005 20:22:45 +0000 (20:22 +0000)]
r10936: Commit work in progress: wb_pam_auth_crap made async. This does not work yet,
but the version before did not either, so we're not worse than before.

One thing this does better is to call the domain init code if it's not there
yet.

Volker
(This used to be commit 35bcfb185b9763a3677d7ac9e748f3a3ba7d2593)

16 years agor10934: Fix a gcc 4 warning
Volker Lendecke [Wed, 12 Oct 2005 20:20:20 +0000 (20:20 +0000)]
r10934: Fix a gcc 4 warning
(This used to be commit 317edeb546ef03507812e5a0fa1fb331073f55c1)

16 years agor10924: we don't need this line twice
Stefan Metzmacher [Wed, 12 Oct 2005 14:58:14 +0000 (14:58 +0000)]
r10924: we don't need this line twice

metze
(This used to be commit f1ee8d4b58d97888dc4c57af34c7604ee9dd2a73)

16 years agor10920: in case of a accept() failure just failing and trying again is no
Andrew Tridgell [Wed, 12 Oct 2005 11:04:01 +0000 (11:04 +0000)]
r10920: in case of a accept() failure just failing and trying again is no
good, as it is probably a resource constraint, so if we just try again
we will spin (as the incoming socket will still be readable). Using a
sleep(1) solves this by throtting smbd until the resource constraint
goes away.

if the resource constraint doesn't go away, then at least smbd won't
be spinning chewing cpu
(This used to be commit 7a5a9da477186b5e4fdb34ec64cc97915de4fd8e)

16 years agor10919: fixed the ldb test for the new operational module
Andrew Tridgell [Wed, 12 Oct 2005 08:53:42 +0000 (08:53 +0000)]
r10919: fixed the ldb test for the new operational module
(This used to be commit 915878d7cebacf499c0c9d264a2dcbc82b521dfd)

16 years agor10918: - fixed standalone ldb build
Andrew Tridgell [Wed, 12 Oct 2005 08:51:12 +0000 (08:51 +0000)]
r10918: - fixed standalone ldb build

- added note about allowedAttributesEffective (will be needed for mmc)

- fixed some more ldb warnings
(This used to be commit e9e4d81b6976549db8a7668572a5da466fbec4a9)

16 years agor10917: copy the element name in a ldb_msg_rename_attr() and ldb_msg_copy_attr()...
Andrew Tridgell [Wed, 12 Oct 2005 08:11:45 +0000 (08:11 +0000)]
r10917: copy the element name in a ldb_msg_rename_attr() and ldb_msg_copy_attr() to ensure
that callers (like the ldap server) can talloc_steal the name
(This used to be commit 9c914542cc346758c82f89990c80eb096a9c0959)

16 years agor10916: - finished the 'operational' ldb module
Andrew Tridgell [Wed, 12 Oct 2005 07:57:39 +0000 (07:57 +0000)]
r10916: - finished the 'operational' ldb module

- removed the timestamps module, replacing it with the operational module

- added a ldb_msg_copy_shallow() function which should be used when a module
  wants to add new elements to a message on add/modify. This is needed
  because the caller might be using a constant structure, or may want to
  re-use the structure again

- enabled the UTC time attribute syntaxes in the operational module
(This used to be commit 61e8b010223ac6a0573185008f3719ba29574688)

16 years agor10915: added a standard attribute handler for a ldap UTC time string
Andrew Tridgell [Wed, 12 Oct 2005 07:54:15 +0000 (07:54 +0000)]
r10915: added a standard attribute handler for a ldap UTC time string
(This used to be commit efd7dd1a775c06f21924f35760f7768b4e8db449)

16 years agor10914: moved the ldap time string functions into ldb so they can be used by
Andrew Tridgell [Wed, 12 Oct 2005 06:30:47 +0000 (06:30 +0000)]
r10914: moved the ldap time string functions into ldb so they can be used by
the time attribute handling functions
(This used to be commit 93c296d52718e77f8b702e1721b548eaadc56c76)

16 years agor10913: This patch isn't as big as it looks ...
Andrew Tridgell [Wed, 12 Oct 2005 06:10:23 +0000 (06:10 +0000)]
r10913: This patch isn't as big as it looks ...

most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(

I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes

In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.

Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
(This used to be commit f6818daecca95760c12f79fd307770cbe3346f57)

16 years agor10912: added a test for supporting batch oplock upgrades
Andrew Tridgell [Wed, 12 Oct 2005 06:03:28 +0000 (06:03 +0000)]
r10912: added a test for supporting batch oplock upgrades
(This used to be commit 1183af06b70a06ef7a1af665567560e9158fc960)

16 years agor10897: added in a hackish ldb proxy module that I am using to experiment with
Andrew Tridgell [Tue, 11 Oct 2005 12:31:31 +0000 (12:31 +0000)]
r10897: added in a hackish ldb proxy module that I am using to experiment with
mmc management support
(This used to be commit 99a5b088810e8e2f4e28b99a4a0e5e7dc9301594)

16 years agor10896: added a strcasestr() replacement function
Andrew Tridgell [Tue, 11 Oct 2005 12:30:34 +0000 (12:30 +0000)]
r10896: added a strcasestr() replacement function
(This used to be commit 4483d275e12006e5acc72ae143c0a01da01bd00d)

16 years agor10895: allow 'dn=string' searches to work again. Windows doesn't allow these,
Andrew Tridgell [Tue, 11 Oct 2005 12:25:55 +0000 (12:25 +0000)]
r10895: allow 'dn=string' searches to work again. Windows doesn't allow these,
but they are so very useful for things like dn=@MODULES that I think
its worth supporting them
(This used to be commit e2e3193a98b0f81c7bdb02c98db375ca0449022a)

16 years agor10894: make the handling of dn/distinguishedName much closer to real
Andrew Tridgell [Tue, 11 Oct 2005 11:00:16 +0000 (11:00 +0000)]
r10894: make the handling of dn/distinguishedName much closer to real
ldap. Also ensure we put a objectclass on our private ldb's, so they
have some chance of being stored in ldap if you want to
(This used to be commit 1af2cc067f70f6654d08387fc28def67229bb06a)

16 years agor10893: add configure test for utime (needed for the previous utime patch)
Andrew Tridgell [Tue, 11 Oct 2005 10:53:28 +0000 (10:53 +0000)]
r10893: add configure test for utime (needed for the previous utime patch)
(This used to be commit ef020d599fd2336cbf879920fe3505b97783dfc8)

16 years agor10892: - improved the handling of the special distinguishedName attribute
Andrew Tridgell [Tue, 11 Oct 2005 06:21:07 +0000 (06:21 +0000)]
r10892: - improved the handling of the special distinguishedName attribute

- ensure we don't add attributes twice, should a user ask for the
  attribute twice. Do this in such a way that we don't become O(n^2)

- removed some unused code
(This used to be commit 7684cdb47b4ae516f066afb249d5f88032152ec9)

16 years agor10891: I noticed that the secrets.db was not being backed up on my system due
Andrew Tridgell [Tue, 11 Oct 2005 05:01:52 +0000 (05:01 +0000)]
r10891: I noticed that the secrets.db was not being backed up on my system due
to msync/mmap not changing the mtime of the file. This patch ensures
that for successfully completed transactions we update the mtime.

I don't do this on all tdb writes as its too expensive, but doing it
just on transactions is bearable, as those cost quite a lot anyway.
(This used to be commit b2934732dd62f705f59c124f19460c5436a9a422)

16 years agor10889: make searches for dn's less of a special case, and much faster when
Andrew Tridgell [Tue, 11 Oct 2005 04:34:15 +0000 (04:34 +0000)]
r10889: make searches for dn's less of a special case, and much faster when
part of more complex expressions
(This used to be commit 40d304140b4cf22559d6b55c8cbaf1b984baf62f)

16 years agor10880: Missed terminating ';', sorry.
Jeremy Allison [Mon, 10 Oct 2005 20:05:29 +0000 (20:05 +0000)]
r10880: Missed terminating ';', sorry.
Jeremy.
(This used to be commit 2680aeffb1e40a7d1d59c98f0ee533d7c4362f40)

16 years agor10879: Added the ZERO_STRUCT(q_u), (r_u) entries to the generated
Jeremy Allison [Mon, 10 Oct 2005 20:03:34 +0000 (20:03 +0000)]
r10879: Added the ZERO_STRUCT(q_u), (r_u) entries to the generated
Samba3 code. Jelmer please check !
Jeremy.
(This used to be commit 534e8d16228ad4f1306ddf21ea9c9b988d736525)

16 years agor10878: Reply to some comments by tridge and metze:
Volker Lendecke [Mon, 10 Oct 2005 19:57:55 +0000 (19:57 +0000)]
r10878: Reply to some comments by tridge and metze:

* rename the composite helper functions from comp_* to composite_*

* Move the lsa initialization to wb_connect_lsa.c

* Equip smb_composite_connect with a fallback_to_anonymous

The latter two simplify wb_init_domain.c quite a bit.

Volker
(This used to be commit deb127e04ea01ae93394da5ebffb39d81caeb6d9)

16 years agor10873: check the complete payload header
Stefan Metzmacher [Mon, 10 Oct 2005 14:10:37 +0000 (14:10 +0000)]
r10873: check the complete payload header

metze
(This used to be commit 27f8d82231f2978ff15719e4b23912ae7f910638)

16 years agor10872: fix the length of the dummy XPRESS decompressed buffer
Stefan Metzmacher [Mon, 10 Oct 2005 13:25:11 +0000 (13:25 +0000)]
r10872: fix the length of the dummy XPRESS decompressed buffer

metze
(This used to be commit 0a1e4498a3550721b214716d1106843bf1ff4597)

16 years agor10871: make xpress compression choosable, by --option="dssync:xpress=yes",
Stefan Metzmacher [Mon, 10 Oct 2005 12:31:05 +0000 (12:31 +0000)]
r10871: make xpress compression choosable, by --option="dssync:xpress=yes",
default is to not use it, as it's currently not supported

metze
(This used to be commit 2fb79e24228a47edcb7e1e12fb73def523b0400b)

16 years agor10870: decompress DsGetNCChangesCtr7 replies, that uses type 2 (MSZIP)
Stefan Metzmacher [Mon, 10 Oct 2005 12:14:29 +0000 (12:14 +0000)]
r10870: decompress DsGetNCChangesCtr7 replies, that uses type 2 (MSZIP)
compression

metze
(This used to be commit b451137526c4872a808f14ef42b2ed50abce1355)

16 years agor10869: add dummy functions and dummy parsing of XPRESS decompression,
Stefan Metzmacher [Mon, 10 Oct 2005 12:10:10 +0000 (12:10 +0000)]
r10869: add dummy functions and dummy parsing of XPRESS decompression,
this is the compression algorithm used by w2k3 for DsGetNCChanges().

This algorithm isn't known yet, but it seems to be some sort of Lempel-Ziv
algorithm.

metze
(This used to be commit 694252b6e02e365ae5baffb76cdbc89eec5358e7)

16 years agor10868: make flag(NDR_PAHEX) possible to use and show the union level in hex
Stefan Metzmacher [Mon, 10 Oct 2005 11:47:23 +0000 (11:47 +0000)]
r10868: make flag(NDR_PAHEX) possible to use and show the union level in hex

metze
(This used to be commit 7efb92adc057ad8a993eb9de66c3806608747104)

16 years agor10867: add WERR_UNKNOWN_REVISION errorcode
Stefan Metzmacher [Mon, 10 Oct 2005 11:21:02 +0000 (11:21 +0000)]
r10867: add WERR_UNKNOWN_REVISION errorcode

metze
(This used to be commit b436206c498ea166b8b9fa47638d5f8f6f4752bf)

16 years agor10865: merge branches/SOC/SAMBA_4_0 into main the main SAMBA_4_0 tree
Stefan Metzmacher [Mon, 10 Oct 2005 09:33:06 +0000 (09:33 +0000)]
r10865: merge branches/SOC/SAMBA_4_0 into main the main SAMBA_4_0 tree

metze

 r8017@SERNOX:  metze | 2005-06-30 13:44:23 +0200
 create the SAMBA_4_0 branch for the Summer Of Code Project

 metze

 r8730@SERNOX:  brad | 2005-07-24 03:09:48 +0200
 Branching Samba 4
 r8731@SERNOX:  brad | 2005-07-24 06:39:00 +0200
 added 'make installmisc' to howto.txt
 added existing 'compression' option to level8 drsuapi torture test
 added new 'neighbour_writeable' option to level8 drsuapi torture test
 r8732@SERNOX:  brad | 2005-07-24 06:42:38 +0200
 added metze's dssync patch as source/torture/rpc/dssync.c
 r8739@SERNOX:  brad | 2005-07-25 00:24:46 +0200
 added a test called RPC-DSSYNC to config.mk
 hacking at dssync.c in an attempt to make it compile
 r8754@SERNOX:  brad | 2005-07-25 15:19:21 +0200
 Changing dssync.c to use ldb routines for accessing ldap rather than raw ldap calls.

 r8765@SERNOX:  brad | 2005-07-26 03:35:38 +0200
 more ldb changes to test_CompleteJoin(), it mostly kind of almost works now!

 r8766@SERNOX:  brad | 2005-07-26 03:56:00 +0200
 Trying to fix the crazy nesting in the branch
 r8769@SERNOX:  brad | 2005-07-26 04:48:29 +0200
 merging latest changes
 r8770@SERNOX:  brad | 2005-07-26 04:53:43 +0200
 removing nested branch
 r8793@SERNOX:  jerry | 2005-07-27 05:04:57 +0200
 merging on of Brad missing changes from the nested 4.0 branch debacle
 r8794@SERNOX:  jerry | 2005-07-27 05:14:42 +0200
 syncing up with the main 4_0 branch for Brad
 r8842@SERNOX:  brad | 2005-07-29 00:26:30 +0200
 merging changes from branches/SAMBA_4_0
 r8850@SERNOX:  brad | 2005-07-29 21:07:57 +0200
 Bringing my tree up to date
 r8851@SERNOX:  brad | 2005-07-30 00:48:04 +0200
 making dssync.c more ldb-centric, reverted samlogon.c from rev. 8845 to get my branch to compile again.
 r8856@SERNOX:  brad | 2005-07-30 03:20:33 +0200
 I think I have the ldb code down in test_CompleteJoin (not complete yet though)
 r8860@SERNOX:  brad | 2005-07-30 07:08:13 +0200
 Changed comments to C style /**/ (thanks Richard), some more changes to test_CompleteJoin().
 r8862@SERNOX:  brad | 2005-07-31 04:45:32 +0200
 Bringing the SOC/SAMBA_4_0 branch up to date.
 r8863@SERNOX:  brad | 2005-07-31 20:00:41 +0200
 Updated some missing files from the branch
 r8864@SERNOX:  brad | 2005-07-31 20:25:50 +0200
 Removing autogenerated files from branch
 r8865@SERNOX:  brad | 2005-07-31 20:43:58 +0200
 last of the unneeded files in SOC/SAMBA_4_0
 r9004@SERNOX:  brad | 2005-08-03 18:51:23 +0200
  r5214@buttercup:  j0j0 | 2005-08-03 10:44:30 -0600
   r@buttercup:  j0j0 | 2005-08-02 22:54:13 -0600
   creating a local branch of branches/SAMBA_4_0

 r9013@SERNOX:  brad | 2005-08-03 20:57:48 +0200
  r5228@buttercup:  j0j0 | 2005-08-03 13:00:11 -0600
  Fixing differences between this branch and /branches/SAMBA_4_0

 r9014@SERNOX:  brad | 2005-08-03 21:18:05 +0200
  r5231@buttercup:  j0j0 | 2005-08-03 13:23:12 -0600
  Updating config.mk so that smbtorture builds again

 r9061@SERNOX:  brad | 2005-08-04 18:17:36 +0200
  r5249@buttercup:  j0j0 | 2005-08-03 21:01:02 -0600
  Start using libnet_Join() for DC join.

 r9062@SERNOX:  brad | 2005-08-04 18:17:47 +0200
  r5250@buttercup:  j0j0 | 2005-08-04 10:21:34 -0600
  Some more work towards performing a dc join.

 r9064@SERNOX:  brad | 2005-08-04 18:53:51 +0200
  r5253@buttercup:  j0j0 | 2005-08-04 10:53:00 -0600
  Fixed a bug (passing a TALLOC_CTX to libnet_context_init() )

 r9069@SERNOX:  brad | 2005-08-04 21:59:55 +0200
  r5279@buttercup:  j0j0 | 2005-08-04 14:04:55 -0600
  Some more work on the domain join

 r9117@SERNOX:  brad | 2005-08-05 16:50:26 +0200
  r5281@buttercup:  j0j0 | 2005-08-05 08:55:58 -0600
  Committing minor changes before merge

 r9180@SERNOX:  brad | 2005-08-07 17:25:25 +0200
  r5314@buttercup:  j0j0 | 2005-08-07 09:30:12 -0600
  Reworked libnet_join to use two join levels, AUTOMATIC and SPECIFIED.

 r9181@SERNOX:  brad | 2005-08-07 17:25:36 +0200
  r5315@buttercup:  j0j0 | 2005-08-07 09:31:22 -0600
  Working with libnet_Join(), code cleanup needed in the near future.

 r9192@SERNOX:  brad | 2005-08-07 21:40:22 +0200
  r5373@buttercup:  j0j0 | 2005-08-07 13:46:09 -0600
  Some code cleanup to make things a little more readable.

 r9249@SERNOX:  brad | 2005-08-12 01:31:48 +0200
  r5375@buttercup:  j0j0 | 2005-08-11 17:38:44 -0600
  Split libnet_JoinDomain() into libnet_JoinDomain() and libnet_JoinADSDomain().

 r9256@SERNOX:  brad | 2005-08-12 04:55:11 +0200
  r5413@buttercup:  j0j0 | 2005-08-11 21:02:27 -0600
  Clean up libnet_JoinADSDomain() a little, added a comment to the test_join struct.

 r9314@SERNOX:  brad | 2005-08-16 03:53:20 +0200
  r5436@buttercup:  j0j0 | 2005-08-15 20:01:21 -0600
  libnet_JoinDomain() should honour LIBNET_JOIN_TORTURE now.
  torture_join_domain() should properly use libnet_JoinDomain().
  dssync.c uses torture_join_domain() again.

 r9351@SERNOX:  brad | 2005-08-17 07:15:31 +0200
  r5438@buttercup:  j0j0 | 2005-08-16 23:23:58 -0600
  Removed LIBNET_JOIN_TORTURE level, as it became unnecessary once libnet_Join_primary_domain() handled netbios names better.
  Corrected libnet_JoinDomain() and libnet_JoinADSDomain().

 r9352@SERNOX:  brad | 2005-08-17 07:24:49 +0200
  r5440@buttercup:  j0j0 | 2005-08-16 23:33:25 -0600
  Fixed a typo.

 r9354@SERNOX:  metze | 2005-08-17 10:28:25 +0200
 remove object files from svn

 metze
 r9376@SERNOX:  brad | 2005-08-18 05:15:48 +0200
  r5476@buttercup:  j0j0 | 2005-08-17 21:24:33 -0600
  Proof that I shouldn't code when i'm tired (silly bugfixes).

 r9405@SERNOX:  brad | 2005-08-19 22:50:10 +0200
  r5500@buttercup:  j0j0 | 2005-08-19 14:56:25 -0600
  Get dssync.c compiling again after merge (ldb_dn changes from rev. 9391).

 r9407@SERNOX:  brad | 2005-08-20 03:22:42 +0200
  r5502@buttercup:  j0j0 | 2005-08-19 19:28:22 -0600
  libnet/libnet_join.c
  Some more fixes so ldb uses ldb_dn's.

  torture/rpc/dssync.c
  Some debugging printf()'s.
  ldb_dn fixes.

  torture/rpc/testjoin.c
  Change torture_join_domain() to use libnet_JoinDomain() rather than libnet_Join().
  Some more debugging statements.

  I'm not sure why, but GUID_all_zero(user_handle.uuid) is returning true in torture_leave_domain() when called it from torture_destroy_context() in torture/rpc/dssync.c.
  That's what i'm working out now.

 r9427@SERNOX:  brad | 2005-08-20 18:38:29 +0200
  r5504@buttercup:  j0j0 | 2005-08-20 10:44:52 -0600
  Some bugfixes.
  Removed a bunch of debugging code.
  torture_leave_domain() works again! not 100% perfect yet though...

 r9428@SERNOX:  brad | 2005-08-20 19:09:26 +0200
  r5506@buttercup:  j0j0 | 2005-08-20 11:15:54 -0600
  Restructure torture_join_domain() so that it joins itself, removes itself, and joins itself to the domain again to ensure that its account information is all current and as expected.

 r9452@SERNOX:  brad | 2005-08-21 19:33:51 +0200
  r5508@buttercup:  j0j0 | 2005-08-21 11:40:36 -0600
  Bugfixes, trying to get things straight between contexts.

 r9467@SERNOX:  brad | 2005-08-22 04:00:48 +0200
  r5510@buttercup:  j0j0 | 2005-08-21 20:06:55 -0600
  Another round of bugfixing.

 r9521@SERNOX:  brad | 2005-08-23 15:26:44 +0200
  r5596@buttercup:  j0j0 | 2005-08-23 07:33:06 -0600
  Merging changes

 r9524@SERNOX:  metze | 2005-08-23 16:09:42 +0200
 - fix the build caused by changes in the main samba4 tree,
 - add an option "dssync:german=yes" to allow me to run against my german w2k3 server
   this should be replaces by CLDAP calls to get the Default-First-Site-Name dynamicly
 - remove some temporary comments, as DsAddEntry works now

 metze
 r9528@SERNOX:  metze | 2005-08-23 18:22:22 +0200
 the RPC-DSSYNC test is now able to fetch the whole tree,
 including the unicodePwd, ntPwdHistory fields

 metze
 r9559@SERNOX:  brad | 2005-08-24 04:11:47 +0200
  r5612@buttercup:  j0j0 | 2005-08-23 20:19:12 -0600
  Some fixes around using talloc in a hierarchical fashion.
  Still not right, but better.

 r9564@SERNOX:  brad | 2005-08-24 05:43:11 +0200
  r5614@buttercup:  j0j0 | 2005-08-23 21:50:38 -0600
  Gave libnet_JoinADSDomain() its own tmp_ctx rather than passing it from libnet_JoinDomain() as a parameter (yuk).

  As a side effect, it proves that my bug lies in libnet_JoinDomain(), not libnet_JoinADSDomain().

 r9565@SERNOX:  brad | 2005-08-24 06:09:46 +0200
  r5616@buttercup:  j0j0 | 2005-08-23 22:17:12 -0600
  Small fix, if r->out.error_string and r2->samr_handle.out.error_string weren't set to NULL, torture_join_domain() would segfault on the second join.

 r9630@SERNOX:  brad | 2005-08-26 06:42:50 +0200
 Commented out the parts of the dssync test which perform the dc join and create/remove associated ldap entries.

 Commented out the test for the 'german' dssync option, because now we detect the Site-Name using CLDAP. If cldap_netlogon() does not return ok, the code defaults to 'Default-First-Site-Name'.
 r9670@SERNOX:  brad | 2005-08-27 02:30:11 +0200
 Added a patch from metze.

 To showcase what i've learned today, i've created two new parameters which can be set at runtime, drsuapi:last_usn and drsuapi:partition.

 drsuapi:last_usn takes an integer representing the USN of the last recieved replication update for a particular partition (uses the domain dn if drsuapi:parition isn't set).

 That value is passed in the DsGetNCChanges() call so that only info which has been updated since that point in time is returned. If this option is not set, 0 is used by default, and all updates for that partition are returned.

 drsuapi:partition takes a string dn and uses that as the name of the AD partition to replicate.

 Some debugging output was also added.

 r9723@SERNOX:  brad | 2005-08-29 01:07:51 +0200
 Added some copyright notices.

 Changed some things in net_join.c to try and figure out why 'net join <domain> bdc' segfaults.
 It occurs when the last talloc_free() happens, so i'm sure it's something to do with the memory fiddling i'm doing in libnet_join.

 Added some drsuapi attribute ids that I figured out today.
 I put some (many, dry) notes together while doing that, so i'll try to put them up on a blog at samba.org a little later tonight.

 r9740@SERNOX:  metze | 2005-08-29 16:58:03 +0200
 fix up the DsGetNCchanges loop,
 and remove misleading comments

 metze
 r9743@SERNOX:  metze | 2005-08-29 17:26:45 +0200
 make the logic a bit clearer

 metze
 r9815@SERNOX:  brad | 2005-08-31 02:36:21 +0200
 Added cldap_netlogon() AD Site-Name lookup into libnet/libnet_join.c.
 Bugfixing rampage in libnet_join.c to resolve misunderstanding of talloc_steal().
 libnet_join now creates the CN=<netbios name>,CN=Servers,CN=<site name>,CN=Sites,CN=Configuration,<domain dn> container on a dc join.

 r9858@SERNOX:  brad | 2005-09-01 03:17:17 +0200
 Removed extraneous NDR_ALL subsystem requirement from torture/config.mk.
 Added lots of error checking as per metze's advice.
 Removed commented out code.
 More bug chasing.

 r9863@SERNOX:  brad | 2005-09-01 05:53:19 +0200
 Cleaned up dssync.c, removed the unneeded DsCrackNames() call, removed DC join/leave related stuff.
 It no longer looks like my house does!

 r9887@SERNOX:  metze | 2005-09-01 11:34:03 +0200
 - fix dssync:highest_usn parameter handling
 - ask for LINKED_ATTRIBUTE replication

 metze
 r9891@SERNOX:  metze | 2005-09-01 14:13:18 +0200
 make the code more readable, and fix a few bugs

 metze
 r9911@SERNOX:  brad | 2005-09-01 20:36:27 +0200
 Bugfixes in libnet_join.c.
 Cleaned up comments.
 Added domain_dn_str and account_dn_str to struct libnet_JoinDomain.
 Removed struct dcerpc_pipe *samr_pipe and struct policy_handle user_handle from struct libnet_Join.

 r9920@SERNOX:  brad | 2005-09-01 23:34:13 +0200
 Added disclaimer (I can't seem to get libnet_JoinDomain() to keep the samr_pipe and u_handle open past the function call, grrrr....).

 r9921@SERNOX:  brad | 2005-09-01 23:37:54 +0200
 Added copyright statement.
 Cleaned up unneeded variables from torture_join_domain().

 r9932@SERNOX:  brad | 2005-09-02 01:49:42 +0200
 Really rushed project notes.

 r10841@SERNOX:  metze | 2005-10-08 20:01:45 +0200
 remove diff to main SAMBA_4_0 branch

 metze
 r10862@SERNOX:  metze | 2005-10-10 10:31:52 +0200
 remove the differences between SAMBA_4_0 and SOC/SAMBA_4_0

 metze
 r10863@SERNOX:  metze | 2005-10-10 10:34:26 +0200
 fix the build

 metze
 r10864@SERNOX:  metze | 2005-10-10 11:10:08 +0200
 remove README file to reduce, diffs to main SAMBA_4_0 branch:

 metze

 README:
 This project was centered around adding a torture test to Samba 4, which used drsuapi_DsGetNCChanges() to retrieve the contents of an Active Directory in the same manner as an Active Directory DC replication event.

 As the project unfolded, I also applied some changes to the functionality of the libnet library related to joining a machine account to a domain.

 One of the first things that I implemented in this project was a 'neighbour_writeable' option for the RPC-DRSUAPI torture test. The command line to execute this torture test is as follows:

 smbtorture --option=drsuapi:neighbour_writeable=True -W <domain name> -U <admin username>%<password> ncacn_ip_tcp:<domain controller dns name> RPC-DRSUAPI

 This option provides us with runtime control over the DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE flag in the struct drsuapi_DsGetNCChanges.in.req.req<level>.replica_flags, allowing us to easily test for differences in the behaviour of AD replication with the switch on or off.

 In the course of the project, I also implemented two more flags for the RPC-DSSYNC test. dssync:last_usn takes an integer representing the USN (Universal Serial Number) of the last recieved replication update for a particular partition (uses the domain DN if drsuapi:parition isn't set).   That value is passed in the DsGetNCChanges() call so that only info which has been updated since that point in time is returned. If this option is not set, 0 is used by default, and all updates for that partition are returned.  dssync:partition takes a string DN and uses that as the name of the AD partition to replicate.

 Based initially on a patch provided to me by one of my mentors, Stephan (metze) Metzmacher, the RPC-DSSYNC test was implemented for this project. Initially functionality was included to perform a DC join prior to initiating replication, but the code was removed when it was realized that replication could indeed take place without being a member of the domain in any way. It has been recently suggested that we may need a DC join after all to get all of the information we may want from the AD replication. This is probably best added using a torture_join_domain() call once the libnet code is able to keep the user policy handle and SAMR RPC pipe open.

 The DC join code was taken out of the RPC-DSSYNC and implemented for the most part in the libnet libraries. To test this, the RPC-NETLOGON test was modified to perform a domain join, leave and rejoin. Currently, the test has a fault in that it is unable to leave the domain using the same SAMR RPC pipe and user_policy information as was used for the first join. This is because I was unable to get the code working properly in libnet to provide that functionality. Currently missing from the DC join in libnet is the code to create the CN=NTDS Settings,CN=<DC NETBIOS NAME>,CN=<Site-Name>,CN=Sites,CN=Configuration,<domain DN> container using the dcerpc_drsuapi_DsAddEntry() call. I did not want to implement this functionality in libnet while there were still problems with the code.

 I also provided the ability in libnet and the RPC-DSSYNC test to look up the proper site name using the cldap library.

 In my investigations, I was unable to find out any information regarding the UnicodePwd attribute, except that the same password is represented differently for two different users in the same directory.

 I was also able to resolve and confirm the meaning of some DRSUAPI_ATTRIBUTE ID's.
  DRSUAPI_OBJECTCLASS_domain  (0xA0042)
  DRSUAPI_OBJECTCLASS_domainDNS  (0xA0043)
  wellKnownObjects  (0x9026A)
  fSMORoleOwner  (0x90171)
  name or dc (0x90001)
  whenCreated  (0x20002)
  instanceType  (0x20001)
  gPLink (0x9037B)
 These were added to the IDL for drsuapi (source/librpc/idl/drsuapi.idl).

 I would like to thank everyone on the Samba team who worked with me and assisted me with this project, specifically all the work done by Stephan Metzmacher, Andrew Bartlett and Jerry Carter. Working on this project with the Samba team really has been a life changing experience, as corny as that sounds.

 I've realized that I was born to be a systems developer, and it has helped confirm in my mind that Open Source (specifically Samba) development is exactly what i've been missing!

 I would also like to take this opportunity to thank Chris Dibona and Google for the amazing opportunity. I don't know if I would have taken the leap in other circumstances.

 I know these notes sound a little rushed, but it is 23:55 after all! :)
(This used to be commit 55552b41cbaa8c57a30373a53176e7f3ae945290)

16 years agor10859: Make the flow a bit clearer
Volker Lendecke [Mon, 10 Oct 2005 06:18:17 +0000 (06:18 +0000)]
r10859: Make the flow a bit clearer
(This used to be commit 66c90483b49bd8a8de1a46b12cce5270571f4090)

16 years agor10856: we need aclocal.m4 in ldb for standalone configure
Andrew Tridgell [Sun, 9 Oct 2005 23:29:26 +0000 (23:29 +0000)]
r10856: we need aclocal.m4 in ldb for standalone configure
(This used to be commit b2551e76e8b0edf99483343d687df3a6cecff1f5)

16 years agor10855: Put the domain SID in secrets.ldb by default, and add http as a
Andrew Bartlett [Sun, 9 Oct 2005 22:19:20 +0000 (22:19 +0000)]
r10855: Put the domain SID in secrets.ldb by default, and add http as a
default SPN alias.

Andrew Bartlett
(This used to be commit e4fe5802dae544f4dabf0c6d04a55be1144d8820)

16 years agor10854: talloc_get_type() can return NULL..
Jelmer Vernooij [Sun, 9 Oct 2005 21:30:41 +0000 (21:30 +0000)]
r10854: talloc_get_type() can return NULL..
(This used to be commit 8f7070055fc577cb4234654420539c68992d9671)

16 years agor10853: Convert wbinfo -n to properly init the domain.
Volker Lendecke [Sun, 9 Oct 2005 20:57:49 +0000 (20:57 +0000)]
r10853: Convert wbinfo -n to properly init the domain.

Volker
(This used to be commit 512ae49270197146e5967acd654dd97452cf4e77)

16 years agor10852: Continuation-based programming can become a bit spaghetti...
Volker Lendecke [Sun, 9 Oct 2005 20:32:24 +0000 (20:32 +0000)]
r10852: Continuation-based programming can become a bit spaghetti...

Initialize a domain structure properly. Excerpt from wb_init_domain.c:

/*
 * Initialize a domain:
 *
 * - With schannel credentials, try to open the SMB connection with the machine
 *   creds. Fall back to anonymous.
 *
 * - If we have schannel creds, do the auth2 and open the schannel'ed netlogon
 *   pipe.
 *
 * - Open LSA. If we have machine creds, try to open with ntlmssp. Fall back
 *   to schannel and then to anon bind.
 *
 * - With queryinfopolicy, verify that we're talking to the right domain
 *
 * A bit complex, but with all the combinations I think it's the best we can
 * get. NT4, W2k3SP1 and W2k all have different combinations, but in the end we
 * have a signed&sealed lsa connection on all of them.
 *
 * Is this overkill? In particular the authenticated SMB connection seems a
 * bit overkill, given that we do schannel for netlogon and ntlmssp for
 * lsa later on w2k3, the others don't do this anyway.
 */

Thanks to Jeremy for his detective work, and to the Samba4 team for providing
such a great infrastructure.

Next step is to connect to SAM. Do it via LDAP if we can, fall back to samr
with all we have.

Volker
(This used to be commit 3e69fdc07cd76b4bc01b032148609ee4b59b8be7)

16 years agor10849: Fix handling of [charset] for strings with fixed or "inline" size
Jelmer Vernooij [Sun, 9 Oct 2005 13:53:48 +0000 (13:53 +0000)]
r10849: Fix handling of [charset] for strings with fixed or "inline" size
(This used to be commit 3c2558d11ec1d0b41e5b36b793d9e64db2e203b6)

16 years agor10848: Fix warning
Jelmer Vernooij [Sun, 9 Oct 2005 13:40:55 +0000 (13:40 +0000)]
r10848: Fix warning
(This used to be commit 48d22a991024f19eccaa63848566b311524260c8)

16 years agor10847: Fix up new 'decrypt samlogon reply' routine to be more robust, and use
Andrew Bartlett [Sun, 9 Oct 2005 13:03:52 +0000 (13:03 +0000)]
r10847: Fix up new 'decrypt samlogon reply' routine to be more robust, and use
it in the RPC-SAMLOGON test.

Andrew Bartlett
(This used to be commit 675b7df2eedbcb7ea89c0411f76429d8e2357222)

16 years agor10846: Create a "wbsrv_domain", change wb_finddcs to the style of the rest of the
Volker Lendecke [Sun, 9 Oct 2005 12:50:35 +0000 (12:50 +0000)]
r10846: Create a "wbsrv_domain", change wb_finddcs to the style of the rest of the
async helpers.

Volker
(This used to be commit 10585ba4e81e979a03aec747db6fc059978fa566)