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

1075 Commits

Author SHA1 Message Date
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
5a5c30cb38 s4-pygensec: a bit closer to working
I'll need help from Andrew on how to get gensec to initialise it's ops
element
2009-10-02 18:50:59 +10:00
Jelmer Vernooij
6a79ad7664 gensec: Avoid exposing lp_ctx on the API level. 2009-09-26 20:55:18 +02:00
Jelmer Vernooij
52a17e5c32 pygensec: Add initial work on a gensec Python module. 2009-09-26 19:41:59 +02:00
Matthias Dieter Wallnöfer
85276e120c s4:auth/gensec/schannel - fix a const warning 2009-09-25 10:59:13 +02:00
Stefan Metzmacher
36e889f2cf s4:schannel: fix some compiler warnings
If we only do signing we can pass down a const data buffer.

metze
2009-09-25 05:20:16 +02:00
Andrew Tridgell
ced2429dfa s4-auth: add SID_NT_ENTERPRISE_DCS is a server trust account 2009-09-19 19:40:03 -07:00
Andrew Tridgell
52f2e26a25 s4-sam: add a note about the solaris client 2009-09-17 15:19:31 -07:00
Kouhei Sutou
f8dae40fc8 spnego: Support ASN.1 BIT STRING and use it in SPNEGO.
Signed-off-by: Günther Deschner <gd@samba.org>
2009-09-17 20:10:54 +02:00
Günther Deschner
503d035814 spnego: share spnego_parse.
Guenther
2009-09-17 01:12:20 +02:00
Stefan Metzmacher
033ced60ac libcli/auth: rewrite schannel sign/seal code to be more generic
This prepares support for HMAC-SHA256/AES.

metze
2009-09-16 12:29:06 +02:00
Günther Deschner
f3979b50a9 schannel: move schannel_sign to main directory.
Guenther
2009-09-16 01:54:59 +02:00
Günther Deschner
1a21db8ea1 s4-schannel: try to fix the build.
Guenther
2009-09-16 01:07:26 +02:00
Günther Deschner
1f4123677e s4-schannel: first step of decoupling schannel from gensec.
Guenther
2009-09-16 00:16:04 +02:00
Günther Deschner
9cb205d753 s4-schannel: strip trailing whitespace.
Guenther
2009-09-16 00:13:20 +02:00
Günther Deschner
8b0f54027c s4-schannel: use NL_AUTH_MESSAGE for schannel.
Guenther
2009-09-13 06:50:11 +02:00
Günther Deschner
760666c107 s4-schannel: strip trailing whitespace.
Guenther
2009-09-13 06:50:03 +02:00
Nadezhda Ivanova
269fe99a62 Added "admin_session" method.
The purpose of admin_session is to be able to execute parts of provisioning
as the user Administrator in order to have the correct group and owner in the
security descriptors. To be used for provisioning and tests only.
2009-09-09 18:57:50 +10:00
Matthias Dieter Wallnöfer
88f546dfd9 s4:sam - Implement also here the right primary group behaviour
We have not only to expand the additional groups but *also* the primary group to
gain all rights of a user account.

Also, remove an unneeded context (tmp_ctx) and "talloc_steal".
2009-09-07 08:37:24 +02:00
Günther Deschner
074c6d4214 s4: include ntlmssp header in auth/ntlmssp/ntlmssp.h.
Guenther
2009-08-28 13:43:35 +02:00
Günther Deschner
38d677bdf2 s4-ntlmssp: use interface constants in TargetInfo blob.
Guenther
2009-08-28 10:09:13 +02:00
Günther Deschner
e8c19f31b3 s4-ntlmssp: use NTLMSSP headers from IDL and remove duplicate constants.
Guenther
2009-08-28 10:09:06 +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
29ef1b2325 s4:kerberos Use MIT compatible names for these enc types
This is a small start on (ie, the only trivial part of) the work shown in:
http://k5wiki.kerberos.org/wiki/Projects/Samba4_Port#Samba.27s_use_of_Heimdal_symbols.2C_with_MIT_differences
(a table of all Kerberos symbols used in Samba4, and notes on where
they differ from those provided with MIT Kerberos)

Andrew Bartlett
2009-08-21 17:50:49 +10:00
Andrew Tridgell
fd43e0ee09 added a uid_wrapper library
This library intercepts seteuid and related calls, and simulates them
in a manner similar to the nss_wrapper and socket_wrapper
libraries. This allows us to enable the vfs_unixuid NTVFS module in
the build farm, which means we are more likely to catch errors in the
token manipulation.

The simulation is not complete, but it is enough for Samba4 for
now. The major areas of incompleteness are:

 - no emulation of setreuid, setresuid or saved uids. These would be
   needed for use in Samba3

 - no emulation of ruid changing. That would also be needed for Samba3

 - no attempt to emulate file ownership changing, so code that (for
   example) tests whether st.st_uid matches geteuid() needs special
   handling
2009-08-05 10:51:00 +10:00
Matthias Dieter Wallnöfer
0e87f07fc0 s4: Change my nested groups patch to don't include user's SID itself in the "groupSID"s structure 2009-08-04 17:21:39 +02:00
Matthieu Patou
c50dff4cce Return infinite time for last last logoff when last logoff = 0 2009-08-03 14:08:15 +10:00
Stefan Metzmacher
7d470fdb1b s4:auth: make sure we have elements returned at all in authsam_expand_nested_groups()
metze
2009-07-31 14:40:29 +02:00
Matthias Dieter Wallnöfer
71b013f4de s4: Patch to implement nested group and privileges
This patch adds a function "authsam_expand_nested_groups" (calculation of rights
through expanding groups of a certain SID) which basically collects all
memberships through "memberOf" attributes. It works with either user or group SIDs.
For avoiding loops it tests on each call if the SID hasn't been added yet (through
the helper function "sids_contains_sid").
The function itself is called by "authsam_make_server_info".
2009-07-31 14:40:29 +02:00
Stefan Metzmacher
7204ea422b s4:gensec/spnego: only generate the mechListMic when the server expects it
This fixes the ntvfs.cifs tests.

metze
2009-07-28 12:16:13 +02:00
Andrew Bartlett
8ff1f50b0c s4:kerberos Add support for user principal names in certificates
This extends the PKINIT code in Heimdal to ask the HDB layer if the
User Principal Name name in the certificate is an alias (perhaps just
by case change) of the name given in the AS-REQ.  (This was a TODO in
the Heimdal KDC)

The testsuite is extended to test this behaviour, and the other PKINIT
certficate (using the standard method to specify a principal name in a
certificate) is updated to use a Administrator (not administrator).
(This fixes the kinit test).

Andrew Bartlett
2009-07-28 14:10:47 +10:00
Andrew Bartlett
47a7a2e442 s4:kerberos Add 'net export keytab' command for wireshark decryption
It is much easier to do decryption with wireshark when the keytab is
available for every host in the domain.  Running 'net export keytab
<keytab name>' will export the current (as pointed to by the supplied
smb.conf) local Samba4 doamin.

(This uses Heimdal's 'hdb' keytab and then the existing hdb-samba4,
and so has a good chance of keeping working in the long term).

Andrew Bartlett
2009-07-28 08:52:43 +10:00
Stefan Metzmacher
b7c003c09c Revert "s4:kerberos Add 'net export keytab' command for wireshark decryption"
This reverts commit a40ce5d0d9.

This breaks the build...

Andrew, please repush it, when it's fixed:-)

metze
2009-07-27 17:41:11 +02:00
Andrew Bartlett
a40ce5d0d9 s4:kerberos Add 'net export keytab' command for wireshark decryption
It is much easier to do decryption with wireshark when the keytab is
available for every host in the domain.  Running 'net export keytab
<keytab name>' will export the current (as pointed to by the supplied
smb.conf) local Samba4 doamin.

(This uses Heimdal's 'hdb' keytab and then the existing hdb-samba4,
and so has a good chance of keeping working in the long term).

Andrew Bartlett
2009-07-27 22:41:42 +10:00
Stefan Metzmacher
210181de75 s4:gensec_gssapi: pass the correct oid to the gssapi layer.
metze
2009-07-24 09:48:13 +02:00
Stefan Metzmacher
c00e4040bc s4:gensec/spengo: make sure we send the blob with the micListMech signature to the peer
We should even do this if the submech has no more data to send.

metze
2009-07-24 09:38:30 +02:00
Andrew Bartlett
19bc4ce95c s4:kdc Rework KDC to pull in less attributes for krbtgt lookups
Each attribute we request from LDB comes with a small cost, so don't
lookup any more than we must for the (very) frequent krbtgt lookup
case.  Similarly, we don't need to build a PAC for a server (as a
target), so don't ask for the PAC attributes here either.

Andrew Bartlett
2009-07-17 08:26:49 +10:00
Andrew Bartlett
e16a2a1fa9 s4:gensec Rework gensec_krb5 mutual authentication defaults
When emulating Samba3 (which we do to ensure we don't break
compatability), don't do mutual authentication by default, as it
breaks the session key with AES and isn't what Samba3 does anyway.

Andrew Bartlett
2009-07-16 09:23:36 +10:00
Andrew Bartlett
bc354fb1a6 s4:gensec Allow mutual auth to be turned off in 'fake_gssapi_krb5'
This allows the older 'like Samba3' GENSEC krb5 implementation to work
against Windows 2008.  I'm using this to track down interop issues in
this area.

Andrew Bartlett
2009-07-16 09:23:35 +10:00
Stefan Metzmacher
57afa1edeb s4:auth/ntlmssp: let _unwrap fallback to seal if sign only doesn't work
s4:auth/ntlmssp: let _unwrap fallback to seal if sign only doesn't work

Windows always uses SEAL with NTLMSSP on LDAP connection even if not negotiated.

metze
2009-07-08 13:15:22 +02:00
Andrew Bartlett
6dd6ccbdc9 s4:auth It is easier to copy the session key than get talloc right.
The session keys as supplied already have a reference on them, so
stealing them creates challenges.  For 16 bytes, it is just easier to
be consistant and copy them.

Andrew Bartlett
2009-07-07 13:27:47 +10:00
Andrew Tridgell
6a192020a2 gensec_start now steals the auth_context 2009-07-01 15:15:37 +10:00
Andrew Tridgell
08ed6a2281 another case that should use py_talloc_reference 2009-07-01 15:15:37 +10:00
Andrew Tridgell
f7a6206b55 removed a redundent talloc_steal 2009-07-01 15:15:36 +10:00
Andrew Tridgell
b2c3c08b46 fixed the use of talloc_steal in ntlmssp_server
The previous use of talloc_steal could cause a steal of a pointer that
had references. This ensures that doesn't happen
2009-07-01 15:15:36 +10:00
Don Davis
9aff7b0b59 Rework the kerberos-notes.txt in order and format
This reworks the notes file to be less stream-of-consciousness and more
task for porting, with a very particular focus on a potential port of
Samba4 to use MIT Kerberos.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-06-30 18:12:02 +10:00
Kai Blin
4250eab4b5 s4 auth_winbind: Internally, info3 has utf8 buffers, not utf16 buffers.
Thanks to gd for the catch.
2009-06-25 21:36:49 +02:00
Kai Blin
309924e5c1 s4 auth_winbind: Don't allocate the rids for the info3 structure within the loop 2009-06-25 19:38:51 +02:00
Kai Blin
946beae010 s4: Add libwbclient backend to auth_winbind 2009-06-25 19:18:40 +02:00
Matthias Dieter Wallnöfer
2627c6c0c2 Fixed some uninitialised variables
I tried hard to not change the program logic. Should fix bug #6439.
2009-06-19 11:32:01 +10:00