Commit Graph

28277 Commits

Author SHA1 Message Date
Jeffrey Altman
d4622f12e5 gssmask: HandleOp unused var principal
Always NULL.

Change-Id: I65074562b029effcec62c4edb5d33e3289a634db
2016-11-18 21:59:18 -05:00
Jeffrey Altman
69fbbfdfcb krb5: fix verify_conf syslog facility check
search for facility not severity

Change-Id: I79e9104d1fd27e8d11f7f9c6006676d947086ac5
2016-11-18 21:24:26 -05:00
Jeffrey Altman
89d87ab66a kadmin: do_mod_entry copy and paste error
when testing hist_kvno_diff_svc_integer do not use
hist_kvno_diff_clnt_integer.

Change-Id: Ib1d0224cdb1bab95ef0b104026f854cbfd8f736f
2016-11-18 21:18:55 -05:00
Jeffrey Altman
5cf454ca54 krb5: _krb5_expand_path_tokens missing va_end()
when returning early due to memory allocation error must call va_end()

Change-Id: Icc42771c166453f67679334cea19ed9be692bd87
2016-11-18 21:12:36 -05:00
Jeffrey Altman
97a40d8838 hdb: hdb_add_aliases frees uninitialized memory
This bug was never shipped in a release.  It was introduced by commit
1c81ddf4e2.

Change-Id: Ia9f6d69b2858a75cc51e50034fe70e29f13b8fc1
2016-11-18 20:58:39 -05:00
Jeffrey Altman
d07fe95b61 krb5: krb5_data_free() do not test before free()
Change-Id: I739eb0b227eb7885bb83b6e68eaf39db81b1ceb5
2016-11-18 20:43:19 -05:00
Nicolas Williams
7fa85e6d6d Round #3 of scan-build warnings cleanup 2016-11-16 23:27:27 -06:00
Nicolas Williams
1c81ddf4e2 Round #2 of scan-build warnings cleanup 2016-11-16 17:03:14 -06:00
Nicolas Williams
953dc07391 Round #1 of scan-build warnings cleanup 2016-11-15 21:27:20 -06:00
Nicolas Williams
274021f7db Make check-ldap run on Ubuntu
Apparmor on Ubuntu prevents slapd from using the Unix domain socket we
want it to.  The fix is to copy the slapd executable into the objdir,
which disables the apparmor profile for slapd.

Also, make sure the ldapi: URI has the right path for the socket in
krb5.conf.
2016-11-15 15:35:29 -06:00
Nicolas Williams
995966f9d1 Fix hdb_create() HDB dbname parsing 2016-11-15 15:35:19 -06:00
Nicolas Williams
2c20a5a8bc Set KRB5_CONFIG earlier in check-ldap
Otherwise the kdc won't find the plugin.
2016-11-15 14:16:54 -06:00
Nicolas Williams
475c222472 Fix lib/hdb/test_hdbplugin 2016-11-15 13:54:45 -06:00
Nicolas Williams
09f0a25fda kdc --builtin-hdb should list loadable backends
This fixes the following problems from #210:

 - hdb_ldap doesn't load even when installed correctly
 - loadable hdb backends not listed by kdc --builtin-hdb

Not fixed:

 - hdb_ldap.so not installed in plugin dir
2016-11-15 11:34:54 -06:00
Viktor Dukhovni
c69a205b4c Properly integrate upstream vis/unvis
Adding appropriate changes to configure.ac and config.h
2016-11-15 02:17:58 -05:00
Viktor Dukhovni
f5b9ec280e Import (unmodified) updated upstream vis/unvis
Will not compile, full integration in next commit.
2016-11-15 02:17:03 -05:00
Jeffrey Altman
f561b55d38 krb5: windows tests require HEIMBASE
When building the lib/krb5 tests link against HEIMBASE in order to
make use of heim_abort() and friends.

Change-Id: Ifaf54177bbb14cddf0f3544add370cda158783d1
2016-11-15 00:33:55 -05:00
Nicolas Williams
22790e4508 Test RODC interop fix 2016-11-14 21:29:47 -06:00
Nicolas Williams
9e2b696190 Make kdc name type strictness configurable 2016-11-14 21:29:47 -06:00
Jeffrey Altman
961f543a27 Set princ type to NT-SMTP-NAME when parsing
In krb5_parse_name_flags(), if the principal name is not an enterprise
name, is one component in length and contains an '@', set the principal
type to NT-SMTP-NAME as specified by RFC 4120.
2016-11-14 21:29:47 -06:00
Jeffrey Altman
6a1db3fb1c princ type NT-UNKNOWN + "host" == NT-SRV-HST
Treat principals of type NT-UNKNOWN as NT-SRV-HST if the first component
of the principal name is "host".

Change-Id: I28fb619379daac827436040e701d4ab7b279852b
2016-11-14 21:29:47 -06:00
Jeffrey Altman
5aef50c800 gss-krb5: do_delegate remove dead comment
The check on principal type has been commented out since do_delegate()
was committed.  Remove it.

Change-Id: Id98f35471e346cb3d0e9666b7cdb6f564191e6c1
2016-11-14 21:29:47 -06:00
Jeffrey Altman
09bdb3ab3e Set the right name type for anon princ (client)
In fast_wrap_req() set the correct type in KDC_REQ client principal
name.

Also fix ENOMEM handling.
2016-11-14 21:29:47 -06:00
Jeffrey Altman
020f2c733e kdc: principals of type NT-UNKNOWN can be anonymous
The _kdc_is_anonymous() helper function must take into account
that principals of type NT-UNKNOWN can match any other principal
type including NT-WELLKNOWN.

Change-Id: I6085b9471f6f1d662119e359491bbdce629ef048
2016-11-14 21:29:47 -06:00
Nicolas Williams
a59bb7132f When building a princ name pick a sane def type
This is part of the fix to #173.  MSFT RODCs insist on the name type for
krbtgt principals be set to KRB5_NT_SRV_INST.

Commentary from Jeffrey Altman <jaltman@secure-endpoints.com>

As reported by David Mulder of Dell's Quest, Active Directory will
return a BAD_INTEGRITY error when a request for a krbtgt service
ticket is received with principal type NT-PRINCIPAL instead of NT-SRV-INST
as required by RFC 4120.

[Nico: RFC4120 does not require this.  See the description of the
       name-type field of PrincipalName on page 55.]

  ERROR: VAS_ERR_KRB5: Failed to obtain credentials.
  Client: SLED10-32$@F.QAS,
  Service: SLED10-32$@F.QAS, Server: ad2-f.f.qas
  Caused by: KRB5KRB_AP_ERR_BAD_INTEGRITY (-1765328353): Decrypt integrity check failed

Microsoft began enforcing principal type checking for RODCs in 2008R2.
Microsoft does state that ALL krgtgt/REALM tickets SHOULD be sent using
principal name type of KRB5_NT_SRV_INST instead of KRB5_NT_PRINCIPAL.

From Microsoft:

  "I believe we discovered the problem. There isn't a bug in Windows.
  There's been a code change to address another issue which puts in additional
  checks for Kerberos tickets. The problem is with the Unix clients when the
  client request a TGT. The Unix clients are using Name-type Principal
  [KRB_NT_PRINCIPAL (1)] instead of using Name-type Service and Instance
  [KRB_NT_SRV_INST (2)]...."

This change assigns the NT-SRV-INST principal type each time a krbtgt
service principal is created.  Unlike Microsoft, the Heimdal mostly does
not care about the name-type of any principals, with the exception of
referrals, where the name type is needed to decide how to find a
next-hop realm.
2016-11-14 21:29:47 -06:00
Jeffrey Altman
84e959a752 gssmask: log_function memory leak
Do not leak 'file' on error and reduce clutter. free() in common exit
path.

Change-Id: Icb187ea50e9c3d405076a192aa61cbade4b6d7d4
2016-11-14 17:02:02 -05:00
Jeffrey Altman
d3fc257245 gssmask: client_connect addrinfo leak
In client_connect() getaddrinfo() stores the head of the allocated
addrinfo structure list in 'res0'.  'res' is used to walk the list
and will be NULL at the end of the for() loop when freeaddrinfo(res)
is executed.  Pass 'res0' to freeaddrinfo() instead of 'res'.

Change-Id: Ie1358c0356b6b0f98470e46e25216cfa0ab4adac
2016-11-14 16:56:08 -05:00
Jeffrey Altman
19e8852697 hdb: hdb_ldap_common NULL dereference
In hdb_ldap_common() the test

  if (search_base == NULL && search_base[0] == '\0')
     error handling ...

must be

  if (search_base == NULL || search_base[0] == '\0')
     error handling ...

Change-Id: I8d876a9c56833431b3c4b582fbb0a8cc7353893d
2016-11-14 16:33:51 -05:00
Jeffrey Altman
95c2940a02 hdb: LDAP_message2entry fix ntPasswordIN leak
free ntPasswordIN from all exit paths.  Do not leak it.

Change-Id: I90c5240439eefabca4458fe4791eb0de693a50f7
2016-11-14 16:25:36 -05:00
Viktor Dukhovni
6ee0e99cf3 Upstream NetBSD libedit has readline.h in readline/ not editline/ 2016-11-14 16:13:42 -05:00
Viktor Dukhovni
a3eb786491 Finish X removal 2016-11-14 16:02:43 -05:00
Jeffrey Altman
f917c9d17b configure.ac: remove AC_CHECK_XUA
The prior patch removed the definition of the XUA check but failed
to remove the execution of the check.  Do so now.

Change-Id: I648a374370d3549db0d98b90f810bd018dc28962
2016-11-14 15:38:09 -05:00
Viktor Dukhovni
d454492d01 Drop X11 autoconf and travis deps 2016-11-14 14:34:43 -05:00
Viktor Dukhovni
bb507cd4d4 Goodbye push 2016-11-14 14:19:58 -05:00
Viktor Dukhovni
b77e701a22 Goodbye login 2016-11-14 02:59:12 -05:00
Viktor Dukhovni
63d2935c4f Goodbye FTP 2016-11-14 02:42:08 -05:00
Viktor Dukhovni
eeeb216451 Restore unconditional use of getpwent vs. non-POSIX getpwent_r 2016-11-14 02:22:52 -05:00
Viktor Dukhovni
77ff7185d7 Updated libedit to NetBSD upstream
Note: This unconditionally assumes wchar_t support.  May need revision
if some platforms prove problematic.
2016-11-14 02:22:51 -05:00
Viktor Dukhovni
e1c1cdb1b6 HDB compiler warnings 2016-11-14 02:22:51 -05:00
Viktor Dukhovni
e4ba666221 hcrypto compiler warnings 2016-11-14 02:22:32 -05:00
Viktor Dukhovni
17d6d0ac1e Avoid yydebug compiler warning 2016-11-14 01:05:55 -05:00
Viktor Dukhovni
6b68a56820 Updated SQLite to 3.15.1 2016-11-14 01:05:41 -05:00
Viktor Dukhovni
cf69f3321d Fix cut/paste error from f5f76ee7 that breaks LDAP 2016-11-14 16:39:42 +11:00
Jeffrey Altman
ec9c990dec refer bug reports to github issues
Change-Id: Idfd5f3423fb91ad6d235c4ebb87738641fa3d462
2016-11-12 23:40:56 -05:00
Viktor Dukhovni
da8052fefc Don't scale SRV weights when none have weight zero 2016-11-13 15:22:17 +11:00
Viktor Dukhovni
ee8b2b4253 Drop code that's been dead for 10 years or more 2016-11-13 05:36:11 +11:00
Viktor Dukhovni
c8753450b1 Fix (linux) compiler warnings in libroken 2016-11-13 03:41:33 +11:00
Nicolas Williams
2d3c21cb61 There is no lib/hcrypto/dllmain.c 2016-11-11 15:58:33 -06:00
Nicolas Williams
81c778e0a3 Fix EVP PKCS#11 backend (#194) 2016-11-11 14:34:11 -06:00
Nicolas Williams
9c8b450aa0 Add EVP backend selection to example_evp_cipher.c 2016-11-11 14:30:13 -06:00