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

630 Commits

Author SHA1 Message Date
Stefan Metzmacher
63fd883e54 r21826: reorder functions
metze
(This used to be commit 3d0a810ccd)
2007-10-10 14:49:32 -05:00
Stefan Metzmacher
31c674bffc r21821: move comment about the becoming a dc to the code which implements it
and extent the comments a bit

metze
(This used to be commit 16c958600e)
2007-10-10 14:49:32 -05:00
Stefan Metzmacher
952a90814f r21820: move function, so that all are in top-down order as they get called
metze
(This used to be commit 38bb7f5445)
2007-10-10 14:49:32 -05:00
Jelmer Vernooij
fd2d095048 r21541: Export mgmt, samr and atsvc for use in samba-gtk.
(This used to be commit 7f451cbb8d)
2007-10-10 14:48:55 -05:00
Stefan Metzmacher
815d3f2e68 r21538: this looks better...
metze
(This used to be commit 8ddfbbcb93)
2007-10-10 14:48:54 -05:00
Stefan Metzmacher
d92bc6db36 r21516: - use the same assoc_group_id, for all 3 drsuapi connection
- use the PFC_CONC_MPX flag for the 3rd connection
- to DsGetNCChanges requests on the 3rd connection with the bind handle
  from the 2nd connection to match w2k3

metze
(This used to be commit 5071af332c)
2007-10-10 14:48:48 -05:00
Stefan Metzmacher
3b14713f6d r21362: rename:
"ntPwdHash" => "unicodePwd"
"lmPwdHash" => "dBCSPwd"
"sambaLMPwdHistory" => "lmPwdHistory"
"sambaNTPwdHistory" => "ntPwdHistory"

Note: you need to reprovision after this change!

metze
(This used to be commit dc4242c09c)
2007-10-10 14:48:20 -05:00
Stefan Metzmacher
eee140d7da r21300: let the caller decide if it wants rid decrypted hashes or not
metze
(This used to be commit 8711d01ffd)
2007-10-10 14:48:05 -05:00
Stefan Metzmacher
5a61821e7e r21295: pass down the gensec session key to the store_chunk hook
metze
(This used to be commit 91de959173)
2007-10-10 14:48:03 -05:00
Stefan Metzmacher
c672e06cd5 r21293: store the gensec session key for each drsuapi connection
metze
(This used to be commit d399739820)
2007-10-10 14:48:02 -05:00
Stefan Metzmacher
78eb31a8f0 r21292: add become_dc:print = yes option to dump out the drsuapi traffic
metze
(This used to be commit 5065a9b5ff)
2007-10-10 14:48:02 -05:00
Andrew Bartlett
728ff99fe3 r21255: Add a debugging option to avoid rid decryption in the samsync output.
Andrew Bartlett
(This used to be commit 9e15a51579)
2007-10-10 14:44:55 -05:00
Andrew Bartlett
e473050052 r21175: Fix the kerberos keytab update code to handle deletes.
Fix the join code to know that the ldb layer handles the keytab update.

Andrew Bartlett
(This used to be commit d3fbc089f4)
2007-10-10 14:44:42 -05:00
Volker Lendecke
c2c8650825 r21141: Attempt to fix the build
(This used to be commit 3f41a4b014)
2007-10-10 14:44:33 -05:00
Andrew Bartlett
d2bfa66119 r20964: Show the domain name we figured out, rather than a null pointer (in
some error cases)

Andrew Bartlett
(This used to be commit 4195839d1a)
2007-10-10 14:44:04 -05:00
Stefan Metzmacher
e0efa2c97a r20714: we can use talloc_asprintf_append() again, because strupper_talloc()
creates string with the correct memory size without padding zero bytes
at the end

metze
(This used to be commit df8e97014b)
2007-10-10 14:40:30 -05:00
Stefan Metzmacher
faf57b1dc5 r20708: fix crash bug! we can't use stack memory for async requests...
jelmer: please take more care when you fix pidl warnings:-)

metze
(This used to be commit 05da114ea8)
2007-10-10 14:40:29 -05:00
Jelmer Vernooij
e8d2437cd5 r20676: Add ref pointer to fix warning.
(This used to be commit 1afcf85067)
2007-10-10 14:40:19 -05:00
Stefan Metzmacher
927e163670 r20570: use talloc_asprintf() instead of talloc_asprintf_append()
because talloc_asprintf_append() doesn't work like talloc_append_string()
which uses strlen() on the old string instead of (tc->size - 1)

This matter in this case because strlower_talloc() over allocates

tridge: how should we fix this in lib/talloc/?

metze
(This used to be commit 1748af20b1)
2007-10-10 14:37:03 -05:00
Stefan Metzmacher
536ca21c55 r20504: we handle the attribute values always as DATA_BLOB's and
don't need the union with the attribute id as switch anymore

metze
(This used to be commit d47c81923d)
2007-10-10 14:36:01 -05:00
Stefan Metzmacher
16d6d8d4c5 r20484: get rid of the special case for DN strings
metze
(This used to be commit 4c2addf2dd)
2007-10-10 14:35:59 -05:00
Stefan Metzmacher
d70852659b r20476: get rid of extra case for uint32 values
metze
(This used to be commit 13ccd405b5)
2007-10-10 14:35:57 -05:00
Stefan Metzmacher
2754a73d22 r20475: remove special case for GUID values
metze
(This used to be commit b7ab1c0039)
2007-10-10 14:35:56 -05:00
Stefan Metzmacher
2206a7d592 r20418: start to get step by step rid of the union for the attribute
specific attribute values.

start with ntSecurityDescriptor

metze
(This used to be commit c72f5a16b4)
2007-10-10 14:30:33 -05:00
Andrew Bartlett
7d7d01cf4e r20397: Another user of the DsCrackNames call needs a rename following IDL clarification.
Andrew Bartlett
(This used to be commit 77169958fc)
2007-10-10 14:30:22 -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
Andrew Bartlett
728e4e311c r20294: Without this we don't do the ADS join against Win2k3 SP1
Andrew Bartlett
(This used to be commit 7a7f1a9764)
2007-10-10 14:29:33 -05:00
Stefan Metzmacher
7cb96a785f r20293: implement store chunk hook for libnet_BecomeDC()
metze
(This used to be commit aba497f2fd)
2007-10-10 14:29:33 -05:00
Stefan Metzmacher
ce38e5368e r20292: set ntds_dn_str if DsAddEntry() was successful
metze
(This used to be commit 5cb5986067)
2007-10-10 14:29:33 -05:00
Stefan Metzmacher
fdf95ba005 r20291: implement prepare_db hook of libnet_BecomeDC()
metze
(This used to be commit 07f1075d46)
2007-10-10 14:29:32 -05:00
Stefan Metzmacher
64ba98bbd4 r20285: pass more info to check_options hook and move behavior versions etc.
to the domain and forest structures

metze
(This used to be commit 15157bf5b9)
2007-10-10 14:29:32 -05:00
Stefan Metzmacher
4973fbe773 r20283: pass in callbacks to libnet_BecomeDC() from the caller
and implement the check_options call

metze
(This used to be commit fc9669e2a0)
2007-10-10 14:29:31 -05:00
Stefan Metzmacher
ceaf036f42 r20282: prepare callback infrastructure to check if the forest/domain
behaviors and the schema version is what the caller expects.
also a callback prepares the new database and commits chunks
to the partitions

metze
(This used to be commit 9b5116be2e)
2007-10-10 14:29:31 -05:00
Stefan Metzmacher
88ef467282 r20251: I found out that the oid-prefix to uint32-id-prefix mapping is transferred
in replication replies, but I don't know the exact encoding.

for example the oids are transferred as:

2.5.4			=> uint8_t v[] = { 0x55, 0x04 };
2.5.5			=> uint8_t v[] = { 0x55, 0x05 };
2.5.6			=> uint8_t v[] = { 0x55, 0x06 };
2.5.18			=> uint8_t v[] = { 0x55, 0x12 };
2.5.20			=> uint8_t v[] = { 0x55, 0x14 };
2.5.21			=> uint8_t v[] = { 0x55, 0x15 };
1.2.840.113556.1.2	=> uint8_t v[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x14, 0x01, 0x02 };
1.2.840.113556.1.3	=> uint8_t v[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x14, 0x01, 0x03 };
1.2.840.113556.1.4	=> uint8_t v[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x14, 0x01, 0x04 };
1.2.840.113556.1.5	=> uint8_t v[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x14, 0x01, 0x05 };
1.2.840.113556.1.5.7000	=> uint8_t v[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x14, 0x01, 0x05, 0xb6, 0x58 };
1.2.840.113549.1.9	=> uint8_t v[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09 };
2.16.840.1.113730.3	=> uint8_t v[] = { 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8, 0x42, 0x03 };
2.16.840.1.113730.3.1	=> uint8_t v[] = { 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8, 0x42, 0x03, 0x01 };
2.16.840.1.113730.3.2	=> uint8_t v[] = { 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8, 0x42, 0x03, 0x02 };
0.9.2342.19200300.100.1	=> uint8_t v[] = { 0x09, 0x92, 0x26, 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x01 };
0.9.2342.19200300.100.4	=> uint8_t v[] = { 0x09, 0x92, 0x26, 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x04 };
1.3.6.1.4.1.250.1	=> uint8_t v[] = { 0x2b, 0x06, 0x01, 0x04, 0x01, 0x81, 0x7a, 0x01 };
1.3.6.1.4.1.1466.101.119=> uint8_t v[] = { 0x2b, 0x06, 0x01, 0x04, 0x01, 0x8b, 0x3a, 0x65, 0x77 };

if someone knows how the encoding works, please tell me:-)
I assume some ASN.1 encoding...

metze
(This used to be commit aa720a1531)
2007-10-10 14:29:27 -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
ba1be45aa2 r20205: remove unused var
metze
(This used to be commit a77e1bd1b4)
2007-10-10 14:29:22 -05:00
Stefan Metzmacher
6e8a88fe2e r20204: use symbolic constant
metze
(This used to be commit a816c2973a)
2007-10-10 14:29:22 -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
5ff19e8ca4 r20162: Always return some error string.
rafal
(This used to be commit 0c37360577)
2007-10-10 14:29:16 -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
f1317dadc0 r20142: only the DDNS updates are missing for the full libnet_BecomeDC(),
but that's not needed untill we can support the DsGetNCChanges()
in the server...

metze
(This used to be commit 9c3267e17f)
2007-10-10 14:29:14 -05:00
Rafal Szczesniak
6de9ae9e43 r20138: return the proper status for the other functions as well.
rafal
(This used to be commit 0b82b9dba1)
2007-10-10 14:29:13 -05:00
Rafal Szczesniak
3dde7ab2c0 r20137: return the proper status.
rafal
(This used to be commit e635f5aeaf)
2007-10-10 14:29:13 -05:00
Andrew Bartlett
334f78d206 r20113: Update the DRSUAPI CrackNames test to explore a few more cases, and in
particular to verify more expected results.

Also return more details from the join process.  Now we also return
the machine account's GUID.

Andrew Bartlett
(This used to be commit 5b32f102af)
2007-10-10 14:29:08 -05:00
Stefan Metzmacher
d23f3119a9 r20109: let libnet_BecomeDC() work against w2k servers
metze
(This used to be commit d295239861)
2007-10-10 14:29:08 -05:00
Stefan Metzmacher
d4ac51982c r20105: remove useless comments
metze
(This used to be commit d70140ed07)
2007-10-10 14:29:07 -05:00
Rafal Szczesniak
47e03d96a2 r20103: Change the returned type of prerequisite checking functions,
as metze once suggested.

rafal
(This used to be commit 1f3fd5f854)
2007-10-10 14:29:06 -05:00
Andrew Bartlett
e8e61a414a r20102: Do not reference remote_ldb before we initialise it. This should fix
up many of the build farm failures.

Andrew Bartlett
(This used to be commit 924af98ffa)
2007-10-10 14:29:06 -05:00
Andrew Bartlett
1e6807d8a1 r20099: Add some comments, and correct others.
Andrew Bartlett
(This used to be commit d1b1a4c059)
2007-10-10 14:29:05 -05:00
Stefan Metzmacher
04b50f0f0d r20095: make a complete copy of the binding string
metze
(This used to be commit b0ee130892)
2007-10-10 14:29:05 -05:00
Stefan Metzmacher
8b137ba30a r20088: implement DsReplicaUpdateRefs() calls for all partitions
metze
(This used to be commit 557bb80089)
2007-10-10 14:29:03 -05:00
Stefan Metzmacher
7312cda3b3 r20086: pull domain partition
metze
(This used to be commit 8b03b3a196)
2007-10-10 14:29:03 -05:00
Stefan Metzmacher
9e426649c5 r20085: add _part to structure elements
metze
(This used to be commit de2f9869b5)
2007-10-10 14:29:03 -05:00
Stefan Metzmacher
d26ac7b937 r20084: pull the config partition
metze
(This used to be commit d770effb89)
2007-10-10 14:29:02 -05:00
Stefan Metzmacher
3155ded048 r20083: move function together which belong to each other
metze
(This used to be commit 0c4a7d713d)
2007-10-10 14:29:02 -05:00
Stefan Metzmacher
662ea9f1c7 r20081: pull the whole schema partition
metze
(This used to be commit 2f1ec24d77)
2007-10-10 14:29:02 -05:00
Stefan Metzmacher
d3c9737e5b r20079: the 2nd guid is the source_dsa invocation_id not the objectGUID,
this wasn't noticed because on the 1st dc in the forest both have the
same value

metze
(This used to be commit 527bd9a0a3)
2007-10-10 14:29:01 -05:00
Stefan Metzmacher
3fd9c96342 r20075: start pulling the schema content.
Note: we're not doing the "use the policy handle on a different connection"
      trick, which w2k3 use

metze
(This used to be commit 1e4abd6a91)
2007-10-10 14:29:00 -05:00
Stefan Metzmacher
6011531ac6 r20073: update the computer_dn_str after ldb_rename()
metze
(This used to be commit c40bc7d287)
2007-10-10 14:28:59 -05:00
Stefan Metzmacher
048279b2be r20071: move common code into a function
metze
(This used to be commit 61c312a943)
2007-10-10 14:28:59 -05:00
Stefan Metzmacher
1e17f6ed38 r20070: implement the 2nd and 3rd drsuapi connection
metze
(This used to be commit 6b84a5b595)
2007-10-10 14:28:59 -05:00
Stefan Metzmacher
99390be80c r20068: handle DsAddEntry() errors
metze
(This used to be commit 45466871b4)
2007-10-10 14:28:58 -05:00
Stefan Metzmacher
3aedc80896 r20067: use a global zero_sid
metze
(This used to be commit 5ebf76d23e)
2007-10-10 14:28:58 -05:00
Stefan Metzmacher
81a3bd7bc8 r20066: use the same sid "Domain Admins" for the security_descriptor
metze
(This used to be commit 58ae1bedf1)
2007-10-10 14:28:58 -05:00
Stefan Metzmacher
0df2c30821 r20062: send values in DsAddEntry(), but it didn't work yet (ACCESS_DENIED...)
metze
(This used to be commit e8c77b5cba)
2007-10-10 14:28:57 -05:00
Stefan Metzmacher
553e339f0d r20061: use a DsBindInfo28 structure
metze
(This used to be commit e8c1457797)
2007-10-10 14:28:57 -05:00
Stefan Metzmacher
ac98f84de7 r20056: send a DsBindInfo28 struct in the DsBind() and take care of the DsBindInfo
the remote end sends back

metze
(This used to be commit ff27129792)
2007-10-10 14:28:56 -05:00
Stefan Metzmacher
383cbaa6b0 r20055: implement dummy DsAddEntry call (without attributes yet)
metze
(This used to be commit 8441500a32)
2007-10-10 14:28:56 -05:00
Stefan Metzmacher
496b65d593 r20053: implement the DsBind on the 1st drsuapi connection
metze
(This used to be commit f66f9c2150)
2007-10-10 14:28:55 -05:00
Stefan Metzmacher
85497ed8cb r20052: implement the first drsuapi connection
metze
(This used to be commit 96e5d89655)
2007-10-10 14:28:55 -05:00
Stefan Metzmacher
840ef0d5cf r20051: handle the case where the server object exist, but doesn't have a serverReference
metze
(This used to be commit e5729a29fd)
2007-10-10 14:28:55 -05:00
Stefan Metzmacher
bb725bbe01 r20045: implement the drsuapi_DsRemoveDSServer() call
metze
(This used to be commit deb85414c4)
2007-10-10 14:28:54 -05:00
Stefan Metzmacher
b3f6211f86 r20044: implement the drsuapi connect and ds_bind
metze
(This used to be commit 69f1b8d388)
2007-10-10 14:28:54 -05:00
Stefan Metzmacher
20f55aaad8 r20043: when becoming a dc:
- implement set userAccountControl = UF_SERVER_TRUST_ACCOUNT | UF_TRUSTED_FOR_DELEGATION
- implement moving to CN=Domain Controllers

metze
(This used to be commit c4037880a0)
2007-10-10 14:28:53 -05:00
Stefan Metzmacher
047f2c7091 r20042: move the computer account to the CN=Computers container if needed
metze
(This used to be commit f901956598)
2007-10-10 14:28:53 -05:00
Stefan Metzmacher
a99d5b799b r20041: when unbecoming a dc:
- implement lookup the computer object
- set userAccountControl = UF_WORKSTATION_TRUST_ACCOUNT if needed

metze
(This used to be commit 3a64eb4e8c)
2007-10-10 14:28:53 -05:00
Stefan Metzmacher
584446d5b1 r20040: uncomplete implementation start for libnet_UnbecomeDC()
metze
(This used to be commit f66a93ec0b)
2007-10-10 14:28:53 -05:00
Stefan Metzmacher
1027451d52 r20031: - implement earching for an existing server object
- implement adding a server object

metze
(This used to be commit 6d5a1f11e7)
2007-10-10 14:28:50 -05:00
Stefan Metzmacher
d0be12ad50 r20030: - implement the computer object search
- fix a source vs. dest dsa bug

metze
(This used to be commit ef9d9799a4)
2007-10-10 14:28:50 -05:00
Stefan Metzmacher
408db037ac r20029: - implement source_dsa site object search
metze
(This used to be commit c6166a5641)
2007-10-10 14:28:49 -05:00
Stefan Metzmacher
bb6f3ece26 r20026: - store the infrastructure server_dn_str
- implement the rid manager info searches

metze
(This used to be commit be3f91afe2)
2007-10-10 14:28:49 -05:00
Stefan Metzmacher
6bf98f3adb r20025: - implement the windows2003update revision search
- finish the infrastructure fsmo detail searches

metze
(This used to be commit f1a2bd6f37)
2007-10-10 14:28:48 -05:00
Stefan Metzmacher
effc51d7db r20024: lookup the infrastructure fSMORoleOwner on the 1st LDAP connection
metze
(This used to be commit 99bdd5523b)
2007-10-10 14:28:48 -05:00
Stefan Metzmacher
46d2824907 r20022: - implement the ldap connect code
- implement rootdse search on the 1st LDAP connection
- implement msDs-Behavior-Version and objectVersion searches on the 1st LDAP connection

metze
(This used to be commit b9b705b7dd)
2007-10-10 14:28:48 -05:00
Stefan Metzmacher
c83efbe900 r20021: implement a CLDAP netlogon request to get some infos
needed for becoming a dc.

metze
(This used to be commit 6a007aaa51)
2007-10-10 14:28:47 -05:00
Stefan Metzmacher
6d7630a516 r20011: define libnet_BecomeDC_state struct and add some dummy functions
metze
(This used to be commit 2a50a885ed)
2007-10-10 14:28:47 -05:00
Stefan Metzmacher
1d7f8edb7a r20009: use a composite context
metze
(This used to be commit ed3826bc47)
2007-10-10 14:28:46 -05:00
Stefan Metzmacher
1e02e77fe1 r20008: add stubs for a libnet_BecomeDC() call
metze
(This used to be commit 103ac9a96b)
2007-10-10 14:28:46 -05:00
Rafal Szczesniak
319ea53a87 r19970: more comments and fixes
rafal
(This used to be commit f4621dae44)
2007-10-10 14:28:42 -05:00
Rafal Szczesniak
50821ebea3 r19956: remove unused function
rafal
(This used to be commit 2b60090ca6)
2007-10-10 14:28:40 -05:00
Stefan Metzmacher
6aa5be6143 r19949: add comment that the configuration_dn needs to be looked up
it's not under the domain_dn if the domain is a child domain
in the forest

metze
(This used to be commit 87a77ee778)
2007-10-10 14:28:39 -05:00
Rafal Szczesniak
14db15657c r19938: Return function status instead of rpc layer status. This is
needed to correctly return STATUS_MORE_ENTRIES and the like.

rafal
(This used to be commit 0dbba04fe0)
2007-10-10 14:28:39 -05:00
Rafal Szczesniak
176d210ec7 r19937: fix sending monitor message (spotted by metze).
rafal
(This used to be commit 16f1f075fb)
2007-10-10 14:28:38 -05:00
Stefan Metzmacher
542729273c r19934: - allow to pass a samr_UserInfo21 struct to be passed to libnet_SetPassword()
- as the SetUserInfo2() levels 26/25 and 24/23 have the same encryption
  but 26 and 24 change only the password and 25 and 23 take a info21 and change the password,
  we now use 26 with fallback to 24 or 25 with fallback to 23.
- use samr_SetUserInfo2() to match what w2k3 does (works also against nt4)
- pass the info21 to libnet_SetPassword() to set acct_flags and full_name
  together with the password (to match what w2k3 does)

metze
(This used to be commit 1b86af32f3)
2007-10-10 14:28:38 -05:00
Stefan Metzmacher
8ffc2d47ab r19933: something is really wrong here...
mimir: please take a look!

metze
(This used to be commit 0b4da84d70)
2007-10-10 14:28:38 -05:00
Stefan Metzmacher
a7795460a9 r19931: remove unused struct members
metze
(This used to be commit 45d5da4728)
2007-10-10 14:28:37 -05:00
Rafal Szczesniak
fdf4a6a97f r19922: Use new composite_create functions in composite context
initialisation.
Redesign libnet_UserList function to actually do what it
was intended to do.

rafal
(This used to be commit 4ccc6e63dd)
2007-10-10 14:28:36 -05:00
Simo Sorce
a9e31b33b5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
(This used to be commit 3929c086d5)
2007-10-10 14:28:22 -05:00
Simo Sorce
4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
(This used to be commit a580c871d3)
2007-10-10 14:28:22 -05:00
Andrew Bartlett
2ddd807979 r19759: Allow a join to occour against ncacn_ip_tcp again (useful for torture
tests).  The issue is that Win2k3 SP1 will not answer many LSA
requests on that port (I think this is as a security measure).

In this case, we need to skip ahead in the composite functions.

We were also checking the wrong variable to determine sucess/failure
of the LsaOpenPolicy2.

Andrew Bartlett
(This used to be commit 67c191305f)
2007-10-10 14:28:19 -05:00
Rafal Szczesniak
e8f77306dd r19753: verify result of received request before sending the next one.
I don't know why I forgot this...

rafal
(This used to be commit d5f7141a6c)
2007-10-10 14:28:19 -05:00
Stefan Metzmacher
65a50f46c8 r19699: - use better names for the site strings
- use the client_site when creating the server object

metze
(This used to be commit b02d0e1be3)
2007-10-10 14:28:12 -05:00
Rafal Szczesniak
b5bdec2f54 r19640: add some comments
rafal
(This used to be commit 1ea37bf3b3)
2007-10-10 14:25:23 -05:00
Andrew Bartlett
13dbee3ffe r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world.

Add credentials_krb5.h with the kerberos dependent prototypes.

Andrew Bartlett
(This used to be commit 2b569c42e0)
2007-10-10 14:25:00 -05:00
Rafal Szczesniak
4e61cee33c r19587: Fix indentation and correctly set error string when completing
a composite call - don't leave it unset.

rafal
(This used to be commit 8bd57beca1)
2007-10-10 14:24:57 -05:00
Rafal Szczesniak
cde653b55a r19586: draft version of libnet_UserList function. still a bit of work
to do left.

rafal
(This used to be commit 4e6d479b07)
2007-10-10 14:24:57 -05:00
Rafal Szczesniak
6317ba1cf7 r19584: add the new file to the build.
rafal
(This used to be commit 936e87b89d)
2007-10-10 14:24:57 -05:00
Rafal Szczesniak
62a1cb27f1 r19583: a few prerequisite functions called from within libnet functions
(in this case domain related) to ensure certain conditions before
doing what libnet function is expected to do.

rafal
(This used to be commit e3159ceeed)
2007-10-10 14:24:56 -05:00
Jelmer Vernooij
5a6e2bc9ae r19573: Move secrets.o into param/ (subsystems haven't been integrated yet).
(This used to be commit 8143de855c)
2007-10-10 14:24:55 -05:00
Simo Sorce
7f833458ca r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth argument.
This is a pointer to an element pointer. If it is not null it will be
filled with the pointer of the manipulated element.
Will avoid double searches on the elements list in some cases.
(This used to be commit 0fa5d4bc22)
2007-10-10 14:24:38 -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
f8a82ebe2b r19398: more comments
rafal
(This used to be commit 2ed463e3cd)
2007-10-10 14:21:25 -05:00
Andrew Bartlett
2ac52f809a r19309: Split out checks for LDB_SUCCESS from checks for the expected number
of returned entries.

Andrew Bartlett
(This used to be commit 84efd9ecd9)
2007-10-10 14:21:06 -05:00
Andrew Bartlett
379e6598e1 r19308: Merge samsync fixes from SAMBA_4_0_RELEASE
Andrew Bartlett
(This used to be commit 3310032399)
2007-10-10 14:21:06 -05:00
Simo Sorce
59b66744f7 r19299: Fix possible memleaks
(This used to be commit 6fad80bb09)
2007-10-10 14:21:04 -05:00
Andrew Bartlett
57b8c5cd22 r19266: Add a target_hostname element to the binding struct. This allows us
to perform a lookup once, resolve the name to an IP, while still
communicating the full name to the lower layers, for kerberos etc.

This fixes 'net samdump', which was failing due to the schannel target
name being *smbserver.

Andrew Bartlett
(This used to be commit 0546f487f4)
2007-10-10 14:21:00 -05:00
Andrew Bartlett
9ce0de670b r19261: Fix use of unitialised variables. (The binding string is used, if not
NULL).

This showed up in a manual pre-TP3 test of the 'net samdump' code, and
shows the critical need for the windows testing infrustructure on the
build farm.

Andrew Bartlett
(This used to be commit 9cef40779a)
2007-10-10 14:20:59 -05:00
Rafal Szczesniak
71ec249e02 r19053: match the flag values with the actual equivalents in samr.idl
rafal
(This used to be commit 07aee70811)
2007-10-10 14:20:32 -05:00
Rafal Szczesniak
89e4387a08 r19024: remove read-only and policy dependent fields and flags
from user modify routines.

rafal
(This used to be commit 7ca0d3dbcb)
2007-10-10 14:20:29 -05:00
Rafal Szczesniak
2a689f463b r18752: When change is a big one, it needs to be made in a couple
of set user info calls one after another (each one using
different info level). Also, try to do as many changes as
possible using a single infolevel.

rafal
(This used to be commit cee9a69ffa)
2007-10-10 14:19:07 -05:00
Günther Deschner
8c8240c677 r18743: Mention share name in error output.
Guenther
(This used to be commit 18505ce283)
2007-10-10 14:19:06 -05:00
Rafal Szczesniak
3394bb23fd r18682: a bit of a change in setfield function.
one more change to do...

rafal
(This used to be commit 43b550c83b)
2007-10-10 14:19:01 -05:00
Rafal Szczesniak
1ba24e8680 r18657: handle the case where rpc call went fine, but the result
not necessariy did.

rafal
(This used to be commit 69c379cc63)
2007-10-10 14:19:00 -05:00
Rafal Szczesniak
e0da0acac0 r18656: fix stupid mistake causing segfaults in torture test
and also add one more field to be set.

rafal
(This used to be commit e2621d0063)
2007-10-10 14:19:00 -05:00
Rafal Szczesniak
602b604599 r18655: add more fields and better handle the error case where fields
setting routine don't know how to do that (and user info level
is invalid).

rafal
(This used to be commit a7564931a7)
2007-10-10 14:18:59 -05:00
Rafal Szczesniak
2ccef5554f r18615: add more time fields and fix a silly mistake.
rafal
(This used to be commit 06e0c5d166)
2007-10-10 14:18:56 -05:00
Günther Deschner
57cd2235fa r18611: Do not return NT_STATUS_OK when libnet_Add|DelShare has failed.
Guenther
(This used to be commit 1709ad741b)
2007-10-10 14:18:56 -05:00
Günther Deschner
28c9c212bc r18610: Fix typo.
Guenther
(This used to be commit 759914a07e)
2007-10-10 14:18:56 -05:00
Günther Deschner
e7ede84c33 r18609: error_string should not contain newlines.
Guenther
(This used to be commit 5566667564)
2007-10-10 14:18:56 -05:00
Stefan Metzmacher
6e47a2bb75 r18607: remove unused structure element
rafal: is there a reason why we don't use libnet_AddShare() in the torture test?

metze
(This used to be commit 070a98379a)
2007-10-10 14:18:55 -05:00
Andrew Tridgell
e13715774c r18587: fixed a potential memory leak in libnet
(This used to be commit 935f6f34cf)
2007-10-10 14:18:52 -05:00
Rafal Szczesniak
0f0879eacf r18104: A couple of important fixes to samr domain open so that
the corresponding test may pass.

rafal
(This used to be commit f0eb209e84)
2007-10-10 14:17:17 -05:00
Rafal Szczesniak
1da09b94eb r18101: Use composite_create function and add monitor function pointer
to the state structure.

rafal
(This used to be commit 76d73bc97d)
2007-10-10 14:17:16 -05:00
Andrew Bartlett
626d3ad012 r17954: Avoid including \n in error strings (left over from DEBUG() conversion).
Make it easier to debug CrackNames failures.

Andrew Bartlett
(This used to be commit 5dd07074db)
2007-10-10 14:16:56 -05:00
Rafal Szczesniak
b07435f3e1 r17938: More comments.
rafal
(This used to be commit 4a127aacfa)
2007-10-10 14:16:55 -05:00
Jelmer Vernooij
0329d755a7 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
(This used to be commit f7afa1cb77)
2007-10-10 14:16:54 -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
1f8fda717f r17670: 1) Refactor libnet context structure a bit, to have rpc connection
properties more consistently reflected.
2) Add domain open routine for lsa pipe - this is needed for ongoing
   name resolve function.

Tests (still neglected) and comments to follow.

rafal
(This used to be commit fe5652c2b8)
2007-10-10 14:16:21 -05:00
Simo Sorce
a23b63a8e5 r17516: Change helper function names to make more clear what they are meant to do
(This used to be commit ad75cf8695)
2007-10-10 14:15:31 -05:00
Rafal Szczesniak
5104e4e83f r17472: Remove unused variable.
rafal
(This used to be commit 04c94e4a52)
2007-10-10 14:15:27 -05:00
Rafal Szczesniak
8b659a2439 r17450: A bit more protection against memory allocation errors.
rafal
(This used to be commit a3ef0d051a)
2007-10-10 14:15:26 -05:00
Rafal Szczesniak
84f8d208ef r17448: Define macros to set fields in api function modifying user account.
rafal
(This used to be commit 8d9330c490)
2007-10-10 14:15:26 -05:00
Rafal Szczesniak
9ea3b567e4 r17447: Add more fields to user modify routines.
rafal
(This used to be commit 8fa1cd62ec)
2007-10-10 14:15:26 -05:00
Rafal Szczesniak
45b64e394d r17079: Remove an attempt to connect on ncacn_ip_tcp transport after failure
on ncacn_np, as abartlet suggested. Also, named pipe remains the default
transport for all kinds of servers to be contacted.

rafal
(This used to be commit 76888c74a6)
2007-10-10 14:10:11 -05:00
Rafal Szczesniak
6078bfda5e r17028: Remove extra newline.
rafal
(This used to be commit 7da9ebffbd)
2007-10-10 14:10:09 -05:00
Rafal Szczesniak
752fda46a5 r17027: My copyright notice.
rafal
(This used to be commit a2229f8c80)
2007-10-10 14:10:09 -05:00
Rafal Szczesniak
434087bb4b r17026: Make rpc connect routine a bit smarter. Try to connect again
using different transport and possibly address type, when
the first attempt fails (only if it makes any sense, of course).
This may be especially useful when connecting DCs and PDCs in
mixed environments.

Also, add monitor messages issuing.

rafal
(This used to be commit d69b31230d)
2007-10-10 14:10:09 -05:00
Rafal Szczesniak
ad521ee793 r17001: Prepare a new monitor messages.
rafal
(This used to be commit aaa2a5a27a)
2007-10-10 14:10:07 -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
Andrew Bartlett
12dc0ae78c r16830: Fix IBM checker and GCC warnings.
Andrew Bartlett
(This used to be commit 5ef924bc73)
2007-10-10 14:09:48 -05:00
Rafal Szczesniak
5b19070ac7 r16694: Store lsa rpc pipe pointer in a right place.
rafal
(This used to be commit fa6b52dbf7)
2007-10-10 14:09:39 -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
Rafal Szczesniak
828e95e81f r16692: More comments and further code in set_user_changes routine.
rafal
(This used to be commit c58fa8676c)
2007-10-10 14:09:38 -05:00
Rafal Szczesniak
6e92c83d52 r16573: Fixes in comments.
rafal
(This used to be commit 1258e6cad8)
2007-10-10 14:09:36 -05:00
Rafal Szczesniak
61705d9c55 r16572: More comments and simple refactoring of one condition.
rafal
(This used to be commit 24006a3601)
2007-10-10 14:09:36 -05:00
Rafal Szczesniak
7414c0206f r16532: Tell username from account name (source from target, when
changing).

rafal
(This used to be commit e5a50ca14a)
2007-10-10 14:09:33 -05:00
Rafal Szczesniak
7d1533f616 r16531: Add a function preparing argument for modify user routine.
rafal
(This used to be commit d91cbec264)
2007-10-10 14:09:33 -05:00
Rafal Szczesniak
3ef6f35dde r16530: Send monitor messages only after successful receiving result of a stage.
rafal
(This used to be commit e5dc631163)
2007-10-10 14:09:33 -05:00
Rafal Szczesniak
240ec86942 r16476: Error in composite functions implemented the 'old way' (single event handler,
no continue functions) need to report an error by means of state only.
composite_error calls event handler function which frees the context and
state structure. This fixes a segfault in some cases (caught it on modifyuser
test).

rafal
(This used to be commit 9e800fd0cf)
2007-10-10 14:09:30 -05:00
Andrew Bartlett
345c9f043f r16226: Fixes for various segfault bugs found against a buggy Samba4. With
the current API we need to check both that the RPC didn't fault, and
that the query succeeded.

Also print the right things in debug messages.

Andrew Bartlett
(This used to be commit d18e515391)
2007-10-10 14:09:06 -05:00
Rafal Szczesniak
9fb340758b r16211: Refactor domain_opened function a bit and add a few comments.
rafal
(This used to be commit d8113fa5e1)
2007-10-10 14:09:06 -05:00
Rafal Szczesniak
04bc987b29 r15996: Implement a missing monitor message.
rafal
(This used to be commit 37ec35672e)
2007-10-10 14:08:47 -05:00
Rafal Szczesniak
f40a2e9786 r15940: Add new field to pass username to libnet_rpc_userinfo function.
rafal
(This used to be commit 16b4b4dbb7)
2007-10-10 14:08:42 -05:00
Rafal Szczesniak
95399b1e66 r15938: Extend userinfo call with one optional stage - lookup for
username to resolve it to a rid, when a sid argument is not
explicitly provided.

rafal
(This used to be commit 9bc4ef267c)
2007-10-10 14:08:42 -05:00
Rafal Szczesniak
ab7d25c4d1 r15937: Currently, we don't use nor support distinguished call levels, so remove
them until we do such thing. There's no need to complicate things more
at the moment.

rafal
(This used to be commit 94fb191e6b)
2007-10-10 14:08:42 -05:00
Rafal Szczesniak
8a6ac85a96 r15920: Move userman.c and userinfo.c definition into respective
header files instead of composite.h

rafal
(This used to be commit 8cafbe7afe)
2007-10-10 14:08:40 -05:00
Rafal Szczesniak
78fea25786 r15919: - Create function checking prerequisites like valid domain
opened and rpc pipe connected. Each user management routine
  calls the function before doing their job
- Initial work on user modify functionality (does nothing yet)

rafal
(This used to be commit 51501cdeef)
2007-10-10 14:08:40 -05:00
Stefan Metzmacher
9ff4fcab36 r15858: - initialize s->r.out
- don't check for mem_ctx, ctx and r, we should crash when they're wrong
  as it's a programmer error!
- pass the error string to the caller

metze
(This used to be commit 5f65447f5d)
2007-10-10 14:08:33 -05:00
Stefan Metzmacher
d8376686cd r15857: don't clear the error string after setting it
metze
(This used to be commit d273d8ae52)
2007-10-10 14:08:33 -05:00
Andrew Tridgell
3372344ade r15850: another spot where r->out.error_string can be uninitialied
(This used to be commit 4898b29c32)
2007-10-10 14:08:32 -05:00
Andrew Tridgell
6e0511f3ee r15849: ensure we don't try to talloc_steal() an invalid error_string in
r->out on error
(This used to be commit 1d1d2aaeae)
2007-10-10 14:08:31 -05:00
Rafal Szczesniak
dda3dceac7 r15726: Comments and a couple of minor formattings in the code.
rafal
(This used to be commit 2ab8343e99)
2007-10-10 14:08:09 -05:00
Rafal Szczesniak
3b07abf2d7 r15667: Make sure the rpc pipe pointers are zeroed during
initialisation of libnet_context.
This fixes a valgrind warning.

rafal
(This used to be commit b751eb1102)
2007-10-10 14:08:05 -05:00
Rafal Szczesniak
e1e4474fb0 r15666: Fix a silly typo.
rafal
(This used to be commit dc93aef09a)
2007-10-10 14:08:05 -05:00
Rafal Szczesniak
251ea035b5 r15663: Turn libnet_DeleteUser into async function and fix subtle bug probably
causing ejsnet test to segfault. Also, cleanup a bit and add monitor
fn pointer to internal user delete libnet function.
Time for some comments now.

rafal
(This used to be commit 89e9a88719)
2007-10-10 14:08:04 -05:00
Rafal Szczesniak
16b5eac38d r15625: Partial commit of my current work. It makes libnet api functions
a bit more smart and more aware of what libnet_context can offer.
The context is a help when some of the arguments are not passed
(programmer counts on using sensible defaults) and stores some of
results so that similar subsequent calls don't need to reopen some
of policy handles, pipes, etc. again. It also helps to hide some
of details the library user don't really want to know much about.

Also, change domain open function to be part of public api, as
it is going to be used in ejsnet interface.

Note, this is work in progress. Comments are welcome.

rafal
(This used to be commit 1ed80c594c)
2007-10-10 14:07:24 -05:00
Andrew Bartlett
7f0a396e3b r15504: Revert -r 15500 and -r 15503 until I'm awake, and can get my head
around the mess that is composite functions...

Async might be all the rage, but it's bloody painful to debug.

Andrew Bartlett
(This used to be commit 756e1dad7c)
2007-10-10 14:05:43 -05:00
Andrew Bartlett
5f36534629 r15500: Add support for interactive prompting on bad passwords to the RPC libraries.
This support requires that the bind_ack and alter_ack recv functions
also be send the DCE/RPC fault.  This would be best done by having the
ack run as a normal RPC reply callback, but this isn't easily possible
for now.

Andrew Bartlett
(This used to be commit be6dde22fe)
2007-10-10 14:05:42 -05:00
Rafal Szczesniak
4010a61fd8 r15489: Typo fixes.
rafal
(This used to be commit 221907fc0d)
2007-10-10 14:05:41 -05:00
Rafal Szczesniak
f8f231da25 r15488: This structure is not needed any longer.
rafal
(This used to be commit 45cd7bc4ec)
2007-10-10 14:05:40 -05:00
Rafal Szczesniak
4d8aaf5f1c r15487: More comments and a few minor changes (not even fixes).
rafal
(This used to be commit 12d0faf9bc)
2007-10-10 14:05:40 -05:00
Rafal Szczesniak
eff21e317e r15459: Add forgotten guid retrieval among other data and thus prevent
from returning uninitialised structure member. Thank heavens for build
farm and valgrind :)

rafal
(This used to be commit daca283990)
2007-10-10 14:05:38 -05:00
Rafal Szczesniak
ccf5696b97 r15439: Reorder the code a bit to be like in other calls. More comments
and comment-fixes.

rafal
(This used to be commit d35f1e07be)
2007-10-10 14:05:37 -05:00
Rafal Szczesniak
538adbf677 r15435: Turn libnet_RpcConnectDCInfo into another level of libnet_RpcConnect
and make it async. Also, update any other usages of old function.
Build goes fine and so do tests, comments to follow.

rafal
(This used to be commit aef0a2de9d)
2007-10-10 14:05:36 -05:00
Andrew Bartlett
5f4d86f955 r15426: Implement SPNEGO as the default RPC authentication mechanism. Where
this isn't supported, fallback to NTLM.

Also, where we get a failure as 'logon failure', try and do a '3
tries' for the password, like we already do for CIFS.  (Incomplete:
needs a mapping between RPC errors and the logon failure NTSTATUS).

Because we don't yet support Kerberos sign/seal to win2k3 SP1 for
DCE/RPC, disable this (causing SPNEGO to negotiate NTLM) when kerberos
isn't demanded.

Andrew Bartlett
(This used to be commit b3212d1fb9)
2007-10-10 14:05:36 -05:00
Jelmer Vernooij
e002300f23 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
(This used to be commit c19c2b51d3)
2007-10-10 14:05:17 -05:00
Jelmer Vernooij
69b51f702a r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
(This used to be commit adc8a019b6)
2007-10-10 14:04:18 -05:00
Andrew Tridgell
48bf8e2b6d r14983: fix an uninitialised var
(This used to be commit 58ac1e4eb1)
2007-10-10 14:00:51 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Andrew Bartlett
d52f31848d r14716: Remove username from debug message, it just causes valgrind assertions.
Andrew Bartlett
(This used to be commit c978fea2a1)
2007-10-10 13:59:12 -05:00
Rafal Szczesniak
d0c7651a7d r14591: More comments.
rafal
(This used to be commit 44b89cd47a)
2007-10-10 13:58:57 -05:00
Jelmer Vernooij
184955ffd7 r14572: Give libraries saner names, remove some .pc files, make some things
subsystems in case a library doesn't make sense.
(This used to be commit ed382873fd)
2007-10-10 13:58:49 -05:00
Rafal Szczesniak
1d23d26dd2 r14568: Remove unused function.
rafal
(This used to be commit 473d6c8e68)
2007-10-10 13:58:48 -05:00
Rafal Szczesniak
79f844e6a6 r14566: Remove unnecessary headers.
rafal
(This used to be commit 1ba4245fcb)
2007-10-10 13:58:48 -05:00
Rafal Szczesniak
986532fbbd r14560: Finally! Start working on async libnet_RpcConnect and other
rpc-related calls.

rafal
(This used to be commit 860f9bcb1e)
2007-10-10 13:58:46 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00
Jelmer Vernooij
b785a7c40c r14492: Fix shared libs - set SO_VERSION to 0 everywhere for now.
(This used to be commit 4682bc5ce0)
2007-10-10 13:57:32 -05:00
Jelmer Vernooij
4f1c8daa36 r14470: Remove some unnecessary headers.
(This used to be commit f7312dab3b)
2007-10-10 13:57:29 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
1060f6b3f6 r14402: Generate seperate headers for RPC client functions.
(This used to be commit 7054ebf024)
2007-10-10 13:57:19 -05:00
Jelmer Vernooij
7651d097b4 r14383: Fix non-developer build.
(This used to be commit f4de155c94)
2007-10-10 13:57:17 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1df)
2007-10-10 13:57:16 -05:00
Jelmer Vernooij
3f16241a1d r14363: Remove credentials.h from the global includes.
(This used to be commit 98c4c30513)
2007-10-10 13:57:14 -05:00
Jelmer Vernooij
e153a8099e r14327: Replace MAJOR_VERSION/MINOR_VERSION/RELEASE_VERSION with two parameters:
- VERSION: should contain the current version. Will be made part of the filename.
 - SO_VERSION: should contain the latest version that this on is compatible to. Will be used for setting the soname of the shared library.

Fix sonames and use them on platforms that support them
Remove symlinking code. ldconfig will take care of creating the symlinks now
that we set the soname.
(This used to be commit 7871b07e21)
2007-10-10 13:57:12 -05:00
Stefan Metzmacher
da7c2d3a66 r14063: libnet depends on dcerpc
metze
(This used to be commit 7fc2d08269)
2007-10-10 13:52:39 -05:00
Andrew Bartlett
91b1815fa9 r14058: Try to make the continuation on the list of password set mechs clearer.
Andrew Bartlett
(This used to be commit 0aa7160a66)
2007-10-10 13:52: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
Jelmer Vernooij
ba564a901e r13903: Don't generate prototypes for modules and binaries in include/proto.h by
default.
(This used to be commit c80a8f1102)
2007-10-10 13:52:21 -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
fc29c3250a r13104: Migrate and set secrets keytab values in the 'net join' code. This
avoids falling back to in-memory keytabs.

Andrew Bartlett
(This used to be commit 59fbce01c6)
2007-10-10 13:51:25 -05:00
Andrew Bartlett
8641271e65 r12979: Grr, I forgot to commit this file (from Brad Henry's libnet_site
patch) before the power went out :-)

Andrew Bartlett
(This used to be commit 352d6493bb)
2007-10-10 13:51:13 -05:00
Andrew Bartlett
1f72942873 r12976: Patch from Brad Henry <j0j0@riod.ca>:
This patch pulls the AD site name generation and site join code from
libnet/libnet_join.c and puts it into a new file, libnet/libnet_site.c.
This way, a common means for site name, configuration dn and server dn
generation exists so it doesn't need to be rewritten in new code (such
as the future libnet_leave for example).

I've made a couple of changes, but nothing dramatic.  Nice work Brad!

Andrew Bartlett
(This used to be commit 45f67b3f6d)
2007-10-10 13:51:13 -05:00
Andrew Bartlett
243e07cfa2 r12930: Fix ADS join: I wasn't filling in the flag 'realm' variable any more.
Andrew Bartlett
(This used to be commit 5c5a2974c9)
2007-10-10 13:51:08 -05:00
Andrew Bartlett
f3db23ac75 r12928: This patch improves the interaction between the vampire and provsion code.
Previously, we had to know (or guess) the host and domain guid at the
provision stage.  Now we query the database post-provision, to extract
the values and fill in the zone file.

This allows us to generate a correct zone file in the Windows migration case.

In an effort to make SWAT easier to use, I have removed and renamed
some of the provision options.

I have also fixed a nasty issue in my js code.  I had implictly
declared a global variable of the name 'join', with disasterious
results for any subsequent user of the string utility function:

esp exception - ASSERT at lib/appweb/ejs/ejsParser.c:2064, 0

Backtrace:
        [ 0]       substitute_var:20   ->               list[i] = join("", list2)
        [ 1]           setup_file:9    ->       data = substitute_var(data, subobj)

Andrew Bartlett
(This used to be commit a38ceefd11)
2007-10-10 13:51:07 -05:00
Andrew Bartlett
dcd63b9770 r12926: Syncronsise GUIDs on users and domains from the server. These also
appear in DNS, so need to match.

Andrew Bartlett
(This used to be commit d092b0493d)
2007-10-10 13:51:07 -05:00
Andrew Bartlett
b15582ed81 r12903: Factor out a new routine libnet_RpcConnectDCInfo, to both connect to
the remote sever, and to query it for domain information.

Provide and use this information in the SamSync/Vampire callbacks, to allow a
parallel connection to LDAP, if we are talking to AD.  This allows us
to get at some important attributes not exposed in the old protocol.

With this, we are able to do a all-GUI vampire of a AD domain from
SWAT, including getting all the SIDs, servicePrincipalNames and the
like correct.

Andrew Bartlett
(This used to be commit 918358cee0)
2007-10-10 13:51:00 -05:00
Andrew Bartlett
17402db4df r12894: Add more detail to error messages.
Andrew Bartlett
(This used to be commit 31fd39f356)
2007-10-10 13:50:59 -05:00
Andrew Bartlett
1460719b6a r12893: Filling in *error_string is critical for SWAT, as the errors otherwise
do not propogate back to the user, they just end up in the logfile.

Andrew Bartlett
(This used to be commit 7c9f8e524b)
2007-10-10 13:50:59 -05:00
Andrew Bartlett
58f78fa182 r12892: Add a 'Migrate from Windows' page to our installation section in SWAT.
Doing this required reworking ejsnet, particularly so it could take a
set of credentials, not just a username and password argument.

This required fixing the ejsnet.js test script, which now adds and
deletes a user, and is run from 'make test'.  This should prevent it
being broken again.

Deleting a user from ejsnet required that the matching backend be
added to libnet, hooking fortunetly onto already existing code for the
actual deletion.

The js credentials interface now handles the 'set machine account' flag.

New functions have been added to provision.js to wrap the basic
operations (so we can write a command line version, as well as the web
based version).

Andrew Bartlett
(This used to be commit a5e7c17c34)
2007-10-10 13:50:59 -05:00
Andrew Bartlett
d790d8d6ed r12886: Rename 'secure_channel_type' parameter to domain join as 'join_type'.
Andrew Bartlett
(This used to be commit a3b3e09a9a)
2007-10-10 13:50:58 -05:00
Andrew Bartlett
f2df13958c r12883: Fix the build...
Andrew Bartlett
(This used to be commit 8f7d14048f)
2007-10-10 13:50:57 -05:00
Andrew Bartlett
e15136af9e r12882: Allow the netbios name to be specified at all times.
Andrew Bartlett
(This used to be commit f4f4dcf217)
2007-10-10 13:50:57 -05:00
Andrew Bartlett
7d90b3f802 r12881: Hard-coded defaults are silly. We have smb.conf for a reason.
Andrew Bartlett
(This used to be commit c9402f9227)
2007-10-10 13:50:57 -05:00
Andrew Bartlett
99125b6510 r12873: Fix valgrind-found uninitialised value.
Andrew Bartlett
(This used to be commit 38e8a6477a)
2007-10-10 13:50:56 -05:00
Andrew Bartlett
e0f69bf1d3 r12872: Add some more detail to debug message.
Andrew Bartlett
(This used to be commit cefba10bd5)
2007-10-10 13:50:56 -05:00
Andrew Bartlett
a5a79e8b8c r12865: Upgrade the librpc and libnet code.
In librpc, always try SMB level authentication, even if trying
schannel, but allow fallback to anonymous.  This should better
function with servers that set restrict anonymous.

There are too many parts of Samba that get, parse and modify the
binding parameters.  Avoid the extra work, and add a binding element
to the struct dcerpc_pipe

The libnet vampire code has been refactored, to reduce extra layers
and to better conform with the standard argument pattern.  Also, take
advantage of the new libnet_Lookup code, so we don't require the silly
'password server' smb.conf parameter.

To better support forcing traffic to be sealed for the vampire
operation, the dcerpc_bind_auth() function now takes an auth level
parameter.

Andrew Bartlett
(This used to be commit d65b354959)
2007-10-10 13:50:55 -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
Stefan Metzmacher
af5032acfd r12724: fix warnings
metze
(This used to be commit 4ca1a9a606)
2007-10-10 13:49:45 -05:00
Andrew Bartlett
4bfe2907e7 r12719: Rename unicodePwd -> sambaPassword.
Because we don't know the syntax of unicodePwd, we want to avoid using
that attribute name.  It may cause problems later when we get
replication form windows.

I'm doing this before the tech preview, so we don't get too many
supprises as folks upgrade databases into later versions.

Andrew Bartlett
(This used to be commit 097d9d0b7f)
2007-10-10 13:49:45 -05:00
Jelmer Vernooij
63d718e243 r12696: Reduce the size of include/structs.h
(This used to be commit 6391761601)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
bc4aebfaec r12670: Make a couple of dependencies stricter
Re-introduce and use the OUTPUT_TYPE property for MODULEs to force
specific modules to always be included
(This used to be commit f9eede3d40)
2007-10-10 13:49:35 -05:00
Stefan Metzmacher
ba76f23df9 r12611: fix compiler warnings
metze
(This used to be commit 50940879f6)
2007-10-10 13:49:04 -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
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Andrew Bartlett
773d5e0af0 r12538: Clarify why we are doing the delete here.
Andrew Bartlett
(This used to be commit 6d8405038f)
2007-10-10 13:47:53 -05:00
Jelmer Vernooij
acd6a086b3 r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
(This used to be commit 8aae0f168e)
2007-10-10 13:47:48 -05:00
Jelmer Vernooij
d8e35f8828 r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
(This used to be commit b24f2583ed)
2007-10-10 13:47:45 -05:00
Andrew Bartlett
7448b93a2e r12430: Clarify libnet_join code. Add/fix comments.
Andrew Bartlett
(This used to be commit a3372935ee)
2007-10-10 13:47:37 -05:00
Andrew Bartlett
758873b9fb r12423: Remove DEBUG(0) printouts in favor of more information to the caller.
I assume this works better with SWAT and the like anyway.

Andrew Bartlett
(This used to be commit b11975703d)
2007-10-10 13:47:36 -05:00
Andrew Bartlett
8e0948bbad r12421: Handle the case where we are a joining as different account types far better.
Andrew Bartlett
(This used to be commit 0ce82e8a41)
2007-10-10 13:47:35 -05:00
Andrew Bartlett
221c1512a8 r12411: Add 'net samdump keytab <keytab>'.
This extracts a remote windows domain into a keytab, suitable for use
in ethereal for kerberos decryption.

For the moment, like net samdump and net samsync, the 'password
server' smb.conf option must be set to the binding string for the
server. eg:

password server = ncacn_np:mypdc

Andrew Bartlett
(This used to be commit 272013438f)
2007-10-10 13:47:35 -05:00
Jelmer Vernooij
ab31a44216 r12254: Add some (hopefully correct) descriptions for libraries that are installed.
Install pkg-config files.
(This used to be commit a86abe84e2)
2007-10-10 13:47:24 -05:00
Andrew Bartlett
a1827a1deb r12227: I realised that I wasn't yet seeing authenticated LDAP for the ldb
backend.

The idea is that every time we open an LDB, we can provide a
session_info and/or credentials.  This would allow any ldb to be remote
to LDAP.  We should also support provisioning to a authenticated ldap
server.

(They are separate so we can say authenticate as foo for remote, but
here we just want a token of SYSTEM).

Andrew Bartlett
(This used to be commit ae2f3a64ee)
2007-10-10 13:47:22 -05:00
Rafal Szczesniak
25f82c19f6 r12105: Formatting.
rafal
(This used to be commit 13d7b8fa43)
2007-10-10 13:47:10 -05:00