1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-30 13:18:05 +03:00
Commit Graph

199 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
85e4995364 s4:sites - get the server site (name) from DSDB 2009-10-18 14:33:43 +02:00
Matthias Dieter Wallnöfer
5d4093a937 s4:dcerpc_netlogon - unify the two workstation object lookups (DNS hostname and supported encryption types)
This is simply for better performance (no functional change).
2009-10-18 14:32:59 +02:00
Matthias Dieter Wallnöfer
e9686985cb s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
For KERBEROS applications the realm should be upcase (function "lp_realm") but
for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch
implements the use of both in the right way.
2009-10-14 10:50:43 +02:00
Andrew Tridgell
4cb055cacd ds-flags: use the new name DS_DNS_FOREST_ROOT
Update to use the new DS_DNS_FOREST_ROOT name, which makes it clearer
what this bit means (according to MS-ADTS doc)
2009-10-02 12:02:00 +10:00
Andrew Tridgell
87b6f2e863 s4-netlogon: always set the dNSHostName in GetDomainInfo
This seems to be what w2k8 does
2009-09-23 14:01:28 -07:00
Andrew Tridgell
c94e3ff064 s4-netlogon: make GetDomainInfo response match w2k8 2009-09-23 13:57:59 -07:00
Andrew Tridgell
1261d694f0 more include minimisation 2009-09-19 14:12:01 -07:00
Andrew Tridgell
46d29fe088 s4-netlogon: implement dcesrv_netr_DsRAddressToSitenamesExW
We don't implement sites properly at the moment so we just return
Default-First-Site-Name
2009-09-19 08:25:41 -07:00
Günther Deschner
f3979b50a9 schannel: move schannel_sign to main directory.
Guenther
2009-09-16 01:54:59 +02:00
Matthias Dieter Wallnöfer
02c30fee21 s4:netlogon - Put the "supported encryption types" more back in the "LogonGetDomainInfo" call
They're needed only at the end.
2009-09-10 00:59:50 +02:00
Matthieu Patou
a915575158 Return a correct value for Supported Encryption Type
Vista and upper version use this value to check wether they should ask the DC
 to change the msDS-SupportedEncryptionTypes attribute or not.
 Declare the different value as a bitmap in Netlogon idl
2009-09-08 22:44:50 +10:00
Matthias Dieter Wallnöfer
b11aaadb68 s4:LogonGetDomainInfo - add a basic check for the hostname
This check is specified in Windows Server after release 2003.
The parameter "hostname" should match as prefix of the dns hostname given as
parameter in the "workstation" structure.
2009-09-07 12:05:56 +02:00
Günther Deschner
17d3800e92 s4-schannel: add ldb suffix to schannel functions.
Guenther
2009-08-27 15:55:18 +02:00
Andrew Bartlett
9b02d23914 s4:netlogon Fix warnings and segfault in GetDomainInfo call
- Correctly use samdb_search_string to do a 'base' search
   (this needs a NULL, not a "" argument for the format string)

 - There is no need (and it caused a security hole) to use
   talloc_asprintf() with the only argument being the string to
   duplicate.

Andrew Bartlett
2009-08-04 16:10:39 +10:00
Matthias Dieter Wallnöfer
c688d37497 s4: Enhancements in the "netr_LogonGetDomainInformations" call
This addresses bug #4888 and #6596 in SAMBA 4 Bugzilla
- It implements the call in the complete form as specified in the MSPP/WSPP docs
  and on the discussion on the "cifs-protocol" list
- Therefore client informations (OS name, OS version, "servicePrincipalName"...)
  are now saved in the AD each time the client invokes the call
2009-08-03 09:46:30 +02:00
Matthias Dieter Wallnöfer
df270cd796 s4: Correct renamed constants 2009-07-31 18:15:39 +02:00
Matthias Dieter Wallnöfer
7bad4b48c8 [SAMBA 4 / NETLOGON] Modify type of SAM contexts
In the SAMBA 4 DCE/RPC NETLOGON server the SAM context references have generally
the type "void *". But we know that those context objects are based on the "struct
ldb_context" type. We've always to cast for using a SAM/LDB call.
This I didn't find very appealing and so I assigned the right (detailed) type to each "sam_ctx".
Therefore, the casts could disappear.

Also this change is only cosmetic.
2009-07-23 09:58:20 +10:00
Günther Deschner
8db45607f8 libds: share UF_ flags between samba3 and 4.
Guenther
2009-07-13 15:36:06 +02:00
Matthias Dieter Wallnöfer
efe6552f0c NETLOGON pipe improvements
Patch for bug #4939

This refactors the NETLOGON code related to this bug:

- Introduces a new "SYNCSTATE" enum required by the "DatabaseSync2" call (acc.
to WSPP)
- Make "DatabaseSync" dependant from "DatabaseSync2" (acc. to WSPP)
- Let "DatabaseSync2" return NT_STATUS_NOT_IMPLEMENTED (I'm not sure if this is
also true when a domain is running in mixed mode)
- Make "LogonControl" and "LogonControl2" dependant form "LogonControl2Ex"
(acc. to WSPP)
- Let "LogonControl2Ex" return WERR_NOT_SUPPORTED for now
2009-06-18 13:49:25 +10:00
Andrew Bartlett
6ef65389fd Don't use crossRef records to find our own domain
A single AD server can only host a single domain, so don't stuff about
with looking up our crossRef record in the cn=Partitions container.
We instead trust that lp_realm() and lp_workgroup() works correctly.

Andrew Bartlett
2009-05-26 12:37:09 +10:00
Andrew Bartlett
d78cdc5fe2 Rework to use new API for common netlogon credential chaining 2009-04-14 16:23:45 +10:00
Andrew Bartlett
5095d7b1c8 Rework Samba4 to use the new common libcli/auth code
In particular, this is the rename from creds_ to netlogon_creds_, as
well as other links to use the new common crypto.

Andrew Bartlett
2009-04-14 16:23:44 +10:00
Andrew Bartlett
76a0050e23 A simple hack to avoid the segfault in #6138
Thanks to Andrew Kroeger <andrew@id10ts.net> for reporting this.  This
fix just for the release.  A better fix will make it into the master
branch soon.

Andrew Bartlett
2009-02-26 13:12:07 +11:00
Volker Lendecke
e3746ac922 Fix some C++ warnings 2009-02-24 21:12:01 +01:00
Stefan Metzmacher
3f147cb7a3 s4:netlogon: don't mix in and out negotiate_flags in dcesrv_netr_ServerAuthenticate()
metze
2009-02-18 10:22:30 +01:00
Stefan Metzmacher
94abbead1b s4:netlogon: implement netr_LogonGetCapabilities with NT_STATUS_NOT_IMPLEMENTED
This hopefully fixes bug #6109.

metze
2009-02-16 11:00:07 +01:00
Stefan Metzmacher
201a033c8f s4:netlogon: always return correct negotiate_flags in Authenticate[2|3]()
metze
2009-02-16 09:53:51 +01:00
Andrew Tridgell
72c2da9d32 fixed two problems with the DsRGetDCNameEx2 call, as used by
Win7-beta.

The first problem is that we removed the dnsDomain attribute a while
back, so we were returning NULL for two fields. We now return the
realm.

The second problem is that Win7-beta sends the domain in the form the
user typed it, so it may be in either the short or long form. We check
for the short form and convert if needed.
2009-02-10 17:28:05 +11:00
Stefan Metzmacher
5bca70a0c2 s4:rpc_server: s/private/private_data
metze
2009-02-02 13:08:49 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Günther Deschner
9fa4dfc4ea s4-netlogon: fix the build of netlogon server.
Guenther
2008-12-10 11:58:28 +01:00
Stefan Metzmacher
9d44600470 s4:netlogon: for now implement netr_GetAnyDCName() as wrapper of netr_GetDcName()
metze
2008-12-04 12:48:44 +01:00
Stefan Metzmacher
885a1be8b9 s4:netlogon: Implement netr_GetDcName() similar to netr_DsGetDCName()
metze
2008-12-04 12:48:39 +01:00
Günther Deschner
524156333b s4-netlogon: merge netr_ServerPasswordSet2 from s3 idl.
Guenther
2008-10-29 08:57:52 +01:00
Günther Deschner
556b5bb9ee s4-netlogon: merge netr_ServerPasswordSet from s3 idl.
Guenther
2008-10-29 08:57:52 +01:00
Günther Deschner
1798e9d7ec s4-netlogon: merge netr_ServerReqChallenge from s3 idl.
Guenther
2008-10-29 08:57:52 +01:00
Günther Deschner
8e4c691c0a s4-netlogon: merge netr_ServerAuthenticate{2,3} from s3 idl.
Guenther
2008-10-29 08:57:51 +01:00
Günther Deschner
f285af6367 s4-netlogon: merge netr_LogonSamLogon{Ex,WithFlags} from s3 idl.
Guenther
2008-10-29 08:57:31 +01:00
Günther Deschner
4f6264b66c s4-netlogon: merge netr_LogonGetDomainInfo from s3 idl.
Guenther
2008-10-29 08:57:27 +01:00
Günther Deschner
f0697b0ad5 s4-netlogon: merge netr_DsRGetDCName{Ex,Ex2} from s3 idl.
Guenther
2008-10-29 08:56:52 +01:00
Günther Deschner
2a7de4e3f8 s4-netlogon: merge netr_DsrEnumerateDomainTrusts from s3 idl.
Guenther
2008-10-28 23:40:52 +01:00
Andrew Bartlett
7c88ea8aad Create a 'straight paper path' for UTF16 passwords.
This uses a virtual attribute 'clearTextPassword' (name chosen to
match references in MS-SAMR) that contains the length-limited blob
containing an allegidly UTF16 password.  This ensures we do no
validation or filtering of the password before we get a chance to MD4
it.  We can then do the required munging into UTF8, and in future
implement the rules Microsoft has provided us with for invalid inputs.

All layers in the process now deal with the strings as length-limited
inputs, incluing the krb5 string2key calls.

This commit also includes a small change to samdb_result_passwords()
to ensure that LM passwords are not returned to the application logic
if LM authentication is disabled.

The objectClass module has been modified to allow the
clearTextPassword attribute to pass down the stack.

Andrew Bartlett
2008-10-16 12:48:16 +11:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Andrew Bartlett
320d402180 Start implementing AD-style trusted domains in Samba4's NETLOGON server 2008-10-06 14:28:26 -07:00
Andrew Tridgell
de5edb1d0c remove dependencies on my home domain
(in other words, don't do commits in airports)
2008-10-05 15:48:46 +11:00
Andrew Tridgell
fe67306fc6 removed some debug lines I left in the last commit 2008-10-05 08:17:16 +11:00
Andrew Tridgell
ba5ef49f83 updated the LSA and NETLOGON servers with fixes resulting from the AD
plugfest in Redmond
2008-10-03 17:52:59 -07:00
Andrew Bartlett
c39d1b829b Remove unused parameter from decode_pw_buffer and fail on invalid
UTF-16 input

The input checking is important, as otherwise we could set the wrong
password.

Andrew Bartlett
2008-09-22 17:50:43 -07:00
Andrew Bartlett
07a3b7a930 Update copyright, I've been working here many long years...
(This used to be commit 842ab59412)
2008-09-05 16:45:37 +10:00
Andrew Bartlett
a35263e1ab Implement NETLOGON PAC verfication on the server-side
This is implemented by means of a message to the KDC, to avoid having
to link most of the KDC into netlogon.

Andrew Bartlett
(This used to be commit 82fcd7941f)
2008-09-03 15:30:17 +10:00