1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

672 Commits

Author SHA1 Message Date
Andrew Bartlett
fe0b8a5df4 r22987: Clarify how the events are handled in the kerberos code, and
standardise with the rest of the code.

Andrew Bartlett
(This used to be commit 3aa9d70723d4377d29e33281b640499193b06c69)
2007-10-10 14:52:36 -05:00
Andrew Tridgell
c42219d735 r22969: fix some more places where we could end up with more than one event
context. We now have an event context on the torture_context, and we
can also get one from the cli_credentials structure
(This used to be commit c0f65eb6562e13530337c23e3447a6aa6eb8fc17)
2007-10-10 14:52:34 -05:00
Andrew Bartlett
b5ae9019b0 r22967: Move to the TCP packet interface for the krb5_send_to_kdc plugin.
This replaces a lump of hand-crafted code with the generic packet
system used in the rest of Samba4.

(I started this while chasing down the epoll bug, which turned out to
be seperate)
(This used to be commit 2a7dec4e5dc453f509493f80fc1270416f30a36e)
2007-10-10 14:52:33 -05:00
Andrew Bartlett
1a7b251319 r22966: Make sure to return LOGON_FAILURE if the user's kerberos password is
incorrect.

Andrew Bartlett
(This used to be commit 9dc6f36e43170bc5bf4f94d893b5a3689460d237)
2007-10-10 14:52:33 -05:00
Andrew Tridgell
2741921a50 r22961: use EVENT_FD_AUTOCLOSE and SOCKET_FLAG_NOCLOSE to fix up some hairy
problems with order of socket closing in krb5
(This used to be commit 46a7d83c2b49798c6c5389c13ec2b9785c47b85b)
2007-10-10 14:52:32 -05:00
Stefan Metzmacher
68b531e817 r22748: fix memleaks by passing an mem_ctx to
irpc_servers_byname()

metze
(This used to be commit b54584dfabee77ec7743cab431bda9765057a295)
2007-10-10 14:52:09 -05:00
Stefan Metzmacher
7983989508 r22635: make it possible to not turn off dns canonicalization of hostnames
with krb5:set_dns_canonicalize=yes

needed for the drsuapi replication, but we should fix this with
a kdc locator plugin ...

metze
(This used to be commit f0a12355bcfab47663e62f3d8ae820815210cdc5)
2007-10-10 14:51:56 -05:00
Stefan Metzmacher
e2633be313 r22627: fix crash msgs_tmp isn't always initialized
and we don't need an extra allocated string anyway

metze
(This used to be commit 44c27b2fe6f130332d9f7c6bdd901eb025aa3eff)
2007-10-10 14:51:55 -05:00
Stefan Metzmacher
a5df01c992 r22621: fix the 'sam' auth module
metze
(This used to be commit 255acbb1132891e0316a38f1d4721863bb7a7226)
2007-10-10 14:51:54 -05:00
Jelmer Vernooij
b481b29a1a r22602: s/HAVE_SOCKET_IPV6/HAVE_IPV6/ to match the define used by Heimdal.
(This used to be commit 5ff665b6531fdb4c7e56c49b7f923546d93b384c)
2007-10-10 14:51:50 -05:00
Andrew Bartlett
ebf5f9f1ef r22594: This helped coax out valgrind errors last night, but we don't need it any more.
Andrew Bartlett
(This used to be commit 367231ea2103b6442ecf8333cb7150dfd98c79f4)
2007-10-10 14:51:48 -05:00
Andrew Bartlett
fcdb99f7ce r22582: Cleanups towards making winbind work again. We still have a long way to go, as this has bitrotted over the past months.
This change in particular catches winbind up with the next
composite_create() function.

We also needed to remove an unused flags field, and fill in the lm
response.

Andrew Bartlett
(This used to be commit bd26e4ffaf1c060fdc3aae28fd4393e83c5a83ea)
2007-10-10 14:51:47 -05:00
Andrew Bartlett
729674054a r22558: Move to a static list of enctypes to put into our keytab. In future,
I'll allow this to be configured from the secrets.ldb, but it should
fix some user issues.

Andrew Bartlett
(This used to be commit 0fd74ada220fb07d4ebe8c2d9b8ae50a387c2695)
2007-10-10 14:51:43 -05:00
Stefan Metzmacher
44760c3e6f r22404: more dependencies which should be private
metze
(This used to be commit e0e35965d1eaab182941d17da744b70c4234ca52)
2007-10-10 14:51:14 -05:00
Stefan Metzmacher
1fc97d3ee4 r22397: hopefully fix the build on some aix hosts in the build-farm
we need to make sure -Iheimdal/lib/gssapi comes before -I/usr/local/include

metze
(This used to be commit a6ba465fa8b0a4a0835593526d3f2670736c2c8e)
2007-10-10 14:51:13 -05:00
Stefan Metzmacher
b4a6a14017 r22387: see if this fixes the build on the aix1 hosts
metze
(This used to be commit fbf1b1bfa015e2126102d8eaf8861d779c21d969)
2007-10-10 14:51:12 -05:00
Stefan Metzmacher
17328316de r22385: remove unused include
metze
(This used to be commit c8a210bc6fa2529944bb1303ba06fe0734bdd23e)
2007-10-10 14:51:12 -05:00
Andrew Bartlett
d7fe1f182b r22294: Lock the delegated credentials to being kerberos only, we just don't
have the data for anything else.

Andrew Bartlett
(This used to be commit 9e0c0cd0ff678388436430bb1ba4eb7595cbefbd)
2007-10-10 14:50:58 -05:00
Andrew Bartlett
c2688ec228 r22293: Try to make it more clear what failed to parse.
Andrew Bartlett
(This used to be commit 144ab7294d76397a5e6662d344105a0d59c9f423)
2007-10-10 14:50:57 -05:00
Andrew Bartlett
2bedec23ee r22208: Print the target principal name, to help with kdc unreachable errors.
Andrew Bartlett
(This used to be commit bbde5b6a2f85f22110d6840857eaceb6b923c1b4)
2007-10-10 14:50:38 -05:00
Stefan Metzmacher
a88ac66d98 r22199: fix typo
metze
(This used to be commit 4e8f844be939a6e11a3bece4e7e66534fce00cc0)
2007-10-10 14:50:37 -05:00
Andrew Bartlett
f1b2b43ba5 r22187: Test kerberos logins in the smbclient blackbox tests, including with a
machine account.

Andrew Bartlett
(This used to be commit 16a2bb87a80ffb921f267492f453eb3457666315)
2007-10-10 14:50:01 -05:00
Andrew Bartlett
68094302c1 r22115: I don't like the DOMAIN environment variable. It really isn't a good
match for what we are using it for here.

Andrew Bartlett
(This used to be commit 305d1421efff3f01db1dce499568874965058e79)
2007-10-10 14:49:51 -05:00
Andrew Bartlett
847102c6ca r21736: Fix the smbclient test to do something more interesting with the last
few authentication tests.  Now that the tests correctly 'fail', I was
able to fix the credentials subsystem to honour USER and PASSWD.

To get --machine-pass working, I needed ldb to always load it's static
modules, so I put this in ldb_connect().

Andrew Bartlett
(This used to be commit 3430d8c072407a1c33c32229095fc9db2142b6fa)
2007-10-10 14:49:20 -05:00
James Peach
fcaeedeff3 r21668: Add SMB_QFS_POSIX_WHOAMI to trans2.h so it's easy to find. Add
convenience API to create an anonymous credential. Don't clobber
cmdline_credentials in the UNIX-WHOAMI test.
(This used to be commit 73cea4e0c66f57057ed12b07bbb94b4e783ba6bf)
2007-10-10 14:49:07 -05:00
Stefan Metzmacher
908bc58cdd r21451: if kerberos is requested ( -k yes ), we should use authentificated connections
metze
(This used to be commit 426238eb45f0cc41d99961ac554c2528fd8e96f5)
2007-10-10 14:48:37 -05:00
Stefan Metzmacher
6e2d85e38b r21434: - get rid of "krb5Key"
- use "sambaPassword" only as virtual attribute for passing
  the cleartext password (in unix charset) into the ldb layer
- store des-cbc-crc, des-cbc-md5 keys in the Primary:Kerberos
  blob to match w2k and w2k3
- aes key support is disabled by default, as we don't know
  exacly how longhorn stores them. use password_hash:create_aes_key=yes
  to force creation of them.
- store the cleartext password in the Primary:CLEARTEXT blob
  if configured

TODO:
 - find out how longhorn stores aes keys
 - find out how the Primary:WDigest blob needs to be constructed
   (not supported by w2k)

metze
(This used to be commit e20b53f6feaaca2cc81ee7d296ca3ff757ee3953)
2007-10-10 14:48:34 -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 dc4242c09c0402cbfdba912f82892df3153456ad)
2007-10-10 14:48:20 -05:00
Stefan Metzmacher
41771deb29 r21314: add more usefull debug output
metze
(This used to be commit a246e4bbaaab6f98f50a3c28b47d2c541af7b44a)
2007-10-10 14:48:08 -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 d3fbc089f4161ae71b21077d50130fdabd8b2d77)
2007-10-10 14:44:42 -05:00
Stefan Metzmacher
a8d0f5df62 r21142: fix compiler warnings
metze
(This used to be commit 1f8a037ac4f592d29f7d66e1f924efe1c5d8c2b0)
2007-10-10 14:44:33 -05:00
Andrew Bartlett
744dddd75b r21135: Instead of having hooks to update keytabs as an explicit thing, update
them as a hook on ldb modify, via a module.

This should allow the secrets.ldb to be edited by the admin, and to
have things update in the on-disk keytab just as an in-memory keytab
would.

This isn't really a dsdb plugin, but I don't have any other good ideas
about where to put it.

Andrew Bartlett
(This used to be commit 6ce557a1aff4754d2622be8f1c6695d9ee788d54)
2007-10-10 14:44:31 -05:00
Andrew Bartlett
0f01aae914 r21039: Test some more failure paths (trying to increase the lcov score).
Andrew Bartlett
(This used to be commit 76812a0337fbfcb19939c6ee7a57975b6d690a4d)
2007-10-10 14:44:23 -05:00
Andrew Bartlett
d5bbd817fe r20988: Call out to Heimdal's krb5.conf processing to configure many aspects
of KDC behaviour.  This should allow PKINIT to be turned on and
managed with reasonable sanity.

This also means that the krb5.conf in the same directory as the
smb.conf will always have priority in Samba4, which I think will be
useful.

Andrew Bartlett
(This used to be commit a50bbde81b010bc5d06e3fc3417ade44627eb771)
2007-10-10 14:44:18 -05:00
Andrew Bartlett
0ee01e6fc2 r20949: Looking over some lcov output, try and walk some error paths.
Andrew Bartlett
(This used to be commit 9ed9a032c249461e69242afc2e0ccdd47524064e)
2007-10-10 14:43:59 -05:00
Andrew Tridgell
1cd4339b9a r20646: first preparations for cluster enablement. This changes "
uint32_t server_id
to
  struct server_id server_id;

which allows a server ID to have an node number. The node number will
be zero in non-clustered case. This is the most basic hook needed for
clustering, and ctdb.
(This used to be commit 2365abaa991d57d68c6ebe9be608e01c907102eb)
2007-10-10 14:37:23 -05:00
Andrew Bartlett
08976cb3d2 r20639: Commit part 1 of 2.
This patch updates our build system and glue to support a new snapshot
of lorikeet-heimdal.

We now procude a [SUBSYTEM] in the ans1_deps.pl script, and can depend
on that in the heimdal_build/config.mk.  This is much easier than
listing every generated .o file individually.

This required some small changes to the build system, due to the way
the parent directory was handled for the output of scripts.  I've also
cleaned up et_deps.pl to handle cleaning up it's generated files on
clean.

The PAC glue in Heimdal has changed significantly: we no longer have a
custom hack in the KDC, instead we have the windc plugin interface.
As such, pac-glue.c is much smaller.  In the future, when I'm
confident of the new code, we will also be able to 'downsize'
auth/kerberos/kerberos_pac.c.

(I'll include the updated copy of heimdal in the next chekin, to make
it clearer what's changed in Samba4 itself).

Andrew Bartlett
(This used to be commit 75fddbbc0811010a28ca5bb597b573b3f10ef6d6)
2007-10-10 14:37:20 -05:00
Stefan Metzmacher
3b7686447a r20520: allow the caller to pass NULL if it doesn't want a session info
this can be used when we start to support the FAST BIND LDAP Control

metze
(This used to be commit 0a73d3262d5deb5a9d0052751336413fbea370b1)
2007-10-10 14:36:11 -05:00
Andrew Bartlett
f9dd1d7ef8 r20352: Use the common function to find the DN for a domain.
Andrew Bartlett
(This used to be commit 929fd1beee5cab647702a9b8d8d5e4c2aab23d11)
2007-10-10 14:30:14 -05:00
Stefan Metzmacher
f09c0c1237 r20275: we should check for the oid the caller gave us!
metze
(This used to be commit 4b9e196288f2deb3594db9ba2dd36d774e774574)
2007-10-10 14:29:29 -05:00
Stefan Metzmacher
b2d5ec0339 r20274: add missing return statement and make it more explicit that we return a NULL DATA_BLOB
metze
(This used to be commit 7256481f08b5e860308e73c2b51926b55b1f4c43)
2007-10-10 14:29:29 -05:00
Stefan Metzmacher
b55a68b368 r20258: add functions to read and write asn1 encoded OID strings without leading tag
metze
(This used to be commit 576d4c54cca844164b90e5d6ec71fe44b59607b7)
2007-10-10 14:29:28 -05:00
Andrew Bartlett
d471e52d23 r20149: Remove the smb.conf distinction between PDC and BDC. Now the correct
way to setup a Samba4 DC is to set 'server role = domain controller'.

We use the fSMORoleOwner attribute in the base DN to determine the PDC.

This patch is quite large, as I have corrected a number of places that
assumed taht we are always the PDC, or that used the smb.conf
lp_server_role() to determine that.

Also included is a warning fix in the SAMR code, where the IDL has
seperated a couple of types for group display enumeration.

We also now use the ldb database to determine if we should run the
global catalog service.

In the near future, I will complete the DRSUAPI
DsGetDomainControllerInfo server-side on the same basis.

Andrew Bartlett
(This used to be commit 67d8365e831adf3eaecd8b34dcc481fc82565893)
2007-10-10 14:29:15 -05:00
Stefan Metzmacher
38a472c994 r20135: attach default gensec features to the cli_credentials structure,
so make it possible to force encryption or signing.

metze
(This used to be commit a91dc4a02a46370c52f59cbd4dea9580fa6efafa)
2007-10-10 14:29:12 -05:00
Stefan Metzmacher
78ea6370bf r20108: match w2k3 and send 1.2.840.48018.1.2.2 before 1.2.840.113554.1.2.2
to work better against w2k, so we don't get redirected from
1.2.840.113554.1.2.2 to 1.2.840.48018.1.2.2 by a w2k server, causing 2 additional
auth roundtrips.

metze
(This used to be commit fa5c942ee99d3b5779598aa75f71d0317ba3f622)
2007-10-10 14:29:08 -05:00
Stefan Metzmacher
ae9f7857d5 r20107: don't segfault when the server didn't send a supportedMech in a negTokenTarg
this happens because we send 1.2.840.113554.1.2.2 before 1.2.840.48018.1.2.2
in the negTokenInit. And w2k's spnego code redirects us to use 1.2.840.48018.1.2.2
and then we start the our spnego engine with 1.2.840.48018.1.2.2 and in the then following
negTokenTarg w2k don't send the supportedMech (which means it aggrees in what we've choosen)

metze
(This used to be commit 5af5488593991ab4a2a8e17d38501ad9ec539020)
2007-10-10 14:29:07 -05:00
Simo Sorce
ea212eb00f r20034: Start using ldb_search_exp_fmt()
(This used to be commit 4f07542143ddf5066f0360d965f26a8470504047)
2007-10-10 14:28:51 -05:00
Stefan Metzmacher
a6e2442a5f r20010: cosmetic fix
metze
(This used to be commit 9c992a39db32cbe35f0ecb8fe98223bb24a1e973)
2007-10-10 14:28:47 -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 3929c086d5d0b3f08b1c4f2f3f9602c3f4a9a4bd)
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 a580c871d3784602a9cce32d33419e63c8236e63)
2007-10-10 14:28:22 -05:00