Commit Graph

27740 Commits

Author SHA1 Message Date
Love Hornquist Astrand
9f979d20d7 prefix json functions 2013-07-16 13:06:57 +02:00
Jeffrey Altman
72e6a0f383 fcache: correct build errors on Windows
Windows does not have getuid().

Change-Id: Ib92785716b056a69e42c32ec122d8a5f6f12ffbe

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2013-07-16 12:44:36 +02:00
Love Hornquist Astrand
884b007938 Check owner too 2013-07-12 17:20:41 +02:00
Love Hornquist Astrand
f396f66523 add [libdefaults]fcache_strict_checking to gate the strict checking, defaults to on 2013-07-11 21:17:49 +02:00
Love Hornquist Astrand
2a565482f4 More strict fcache rules
- use O_NOFOLLOW
- be more strict not to follow symlinks
- require cache files to be owned by the user
- have sane permissions (not group/other readable)
2013-07-11 19:29:04 +02:00
Love Hornquist Astrand
efe81b12ef allow the non preauth case again 2013-07-11 15:56:04 +02:00
Love Hornquist Astrand
3ad1bf2dcc provide O_NOFOLLOW if there is non 2013-07-10 22:06:19 +02:00
Love Hornquist Astrand
44ddd05ec1 honor env when not issuid 2013-07-10 22:02:43 +02:00
Love Hornquist Astrand
403f599dbd better error reporting 2013-07-10 21:50:23 +02:00
Ben Kaduk
5dfaa0d10b Be friendly to krb5_generate_random_block consumers
Allow them to disable the EGD/profile access and the use of a
random seed file.

These facilities are not tenable when running in the kernel.
2013-07-03 23:17:38 -05:00
Love Hornquist Astrand
2107924b37 catch error from krb5_ functions
Reported by http://www.forallsecure.com/bug-reports/2f227b78584144ab1f55549b36ea16ba2d1664e0/ via
Brian May <bam@debian.org>
2013-06-28 08:46:26 +02:00
Love Hornquist Astrand
1cd578f6b4 catch error value from krb5_ functions and exit
Reported at http://www.forallsecure.com/bug-reports/ab3ec8cc54656801f51daa47b6d5608ef9339eb9/
via Brian May <brian@microcomaustralia.com.au>
2013-06-28 08:40:49 +02:00
Love Hornquist Astrand
786e790f2c mdoc uses the .Lk macro to mark up hyperlinks (from Igor Sobrado <sobrado@orion.ciencias.uniovi.es>) 2013-06-27 19:41:10 +02:00
Igor Sobrado
be204adf4c Add more documentation links to section 8 pages
As kerberos(8) provides a brief outline of this network authentication
system I would suggest extending SEE ALSO to include a few section 8
commands.  I have excluded kadmind(8) and kpasswdd(8) as these servers
can be easily reachable from kadmin(8) and kpasswd(8) manual pages
respectively.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2013-06-27 09:33:08 +02:00
Jeffrey Altman
5f138a16ef libkrb5: Add missing KRB5_LIB_FUNCTION/KRB5_LIB_CALL
KRB5_LIB_FUNCTION and KRB5_LIB_CALL are necessary even on private
functions that are exported.

Change-Id: Iccd0cfe87ff0a9d851e29890e9cb55b3ae517ce1
2013-06-22 21:17:32 -04:00
Jeffrey Altman
dd47d25e5d libkrb5: No fchmod on Windows
There is no fchmod() implementation on Windows.  For now prevent its
use on Windows with #ifndef _WIN32 but in the future set_default_cache()
should be updated to set ownership permissions for the cache file.

Change-Id: I57214dfecbd25d7b337a568fa5e522c0a22dbb76
2013-06-22 21:17:29 -04:00
Jeffrey Altman
57d55d2b81 libkrb5: replace mkdir with rk_mkdir in dcache.c
Now that libroken provides rk_mkdir(), use it.

Change-Id: Ibf208e45cc36b85198bcb266267bf4665f32ba2f
2013-06-22 21:17:27 -04:00
Jeffrey Altman
8fa446d75c roken: Add rk_mkdir()
The Windows version of mkdir() does not share the same signature
as the POSIX version.  Add rk_mkdir() with an POSIX compliant signature
to libroken.  The current implementation ignores the 'mode' parameter
on Windows but a future implementation could provide the required
functionality with native Win32 APIs.

Change-Id: I084d42e0f27932e9b8131d310dbf34849f5fe4b6
2013-06-22 21:17:26 -04:00
Jeffrey Altman
de305a6f4c roken: Define S_IRWXU and friends on Windows
POSIX mkdir (unlike the Windows version) takes a 'mode_t' parameter.
Provide definitions for the mode_t constants.

Change-Id: Ie57e746aa3e579e28f93064ab430f1128508cc84
2013-06-22 21:17:24 -04:00
Jeffrey Altman
63735cc066 roken: include direct.h if HAVE_DIRECT_H
the prototype for "mkdir() on Windows is provided by direct.h.

Change-Id: I15c1d8fcc6fe58ba763bae236e92cfac958c66d1
2013-06-22 21:17:23 -04:00
Jeffrey Altman
bdfb19128d roken: build writev.c on Windows
Change-Id: I3c3fb4abb7cd093355c26b4a18366fa2b5a3224c
2013-06-22 21:17:22 -04:00
Jeffrey Altman
9547a2ca9e Avoid unused variable warning on Windows
Windows has neither O_NONBLOCK nor FIOBIO and sockets aren't file
descriptors in any case.  Avoid warning that 'flags' is unused in
socket_set_nonblocking().

Change-Id: I431cfae3a88577e75b5230f645639b5a17832f5c
2013-06-22 21:17:20 -04:00
Jeffrey Altman
b07058dbe1 Build new lib/krb5 sources on Windows
db_plugin.c
   dcache.c
   plugin.c

Change-Id: Icb67253d8c1cb8a368c886010e7b4aedca61348c
2013-06-22 21:17:19 -04:00
Jeffrey Altman
8fe301c692 Include krb5-private.h in gssapi/ntlm/crypto.c
Instead of locally defining prototypes for private functions
_krb5_crc_update and _krb5_crc_init_table simply include
krb5-private.h.

Change-Id: Ia7931f8df2e68eb038d112797edfd456ffcdd23a
2013-06-22 21:17:18 -04:00
Jeffrey Altman
ab72ccbab3 Export missing asn1 and hx509 functions on Windows
der_copy_unsigned64
der_free_unsigned64
der_get_integer64
encode_KDCFastCookie
encode_KDCFastState
free_KDCFastCookie
free_KDCFastState
hx509_revoke_print

Change-Id: I29d96705d1ac811109719b6358dc0932c72e8df8
2013-06-22 21:17:16 -04:00
Jeffrey Altman
a97c9c9be4 avoid "*/" outside of comment warning on Windows
Separate the "*" meant to indicate a pointer from "/*" which begins
and end of line comment.

Change-Id: Ib671aace4f493b58ea9d43c11642c7c1896f773f
2013-06-22 21:17:15 -04:00
Jeffrey Altman
eccbdac238 Remove unused variable
Change-Id: Id0249ead009e0a544913460aec15a3abc5bc0f98
2013-06-22 21:17:13 -04:00
Jeffrey Altman
423ef23e43 Windows: _krb5_store_string_to_reg_value REG_DWORD
If the registry type is NONE and the string is all numeric or
if the type is DWORD, the string is converted to a DWORD and then
stored into the registry as a REG_DWORD using RegSetValueEx().
The input parameter should be a pointer to the DWORD variable not
its value.

Change-Id: I9ff12121c6c17eb5afb2ea89adf8bb9cc6aa3a89
2013-06-22 21:17:12 -04:00
Nicolas Williams
f80cc553f8 Make build on Windows 2013-06-21 23:09:44 -05:00
Jeffrey Altman
b935bf493e roken: include limits.h unconditionally
Everywhere that roken is used supports limits.h.  The behavior of
roken should not depend on whether or not the including application
includes limits.h before or after roken.h.   Include limits.h in
roken.h and be done with it.

Change-Id: Id0be5487c791592dfe722ce880b8400bb16d05b1
2013-06-21 16:06:59 -04:00
Love Hörnquist Åstrand
dc87425f93 Merge pull request #31 from jhutz/rand-unix-ignore-write
hcrypto/rand-unix.c: Ignore write(2) result harder
2013-06-18 21:23:56 -07:00
Jeffrey Hutzelman
db8f03740a hcrypto/rand-unix.c: Ignore write(2) result harder
unix_seed(), called by the add-seed-data op unix_add(), attempts to
write seed data to the random data device.  If this fails, the failure
is ignored, as it must be, since there is no way to inform the caller.

This change modifies the way in which the return value from write(2)
is ignored, to avoid compiler warnings when building on Ubuntu 12.10,
with gcc 4.7.2 and eglibc 2.15-0ubuntu20.1.
2013-06-18 22:40:49 -04:00
Love Hornquist Astrand
92c6891c36 get the prototype right for yyparse, it returns an int 2013-06-17 09:29:54 -07:00
Love Hörnquist Åstrand
00a46a334c Merge pull request #30 from kaduk/max_path
Always provide a usable PATH_MAX
2013-06-14 13:58:27 -07:00
Ben Kaduk
c0328e1328 Always provide a usable PATH_MAX
If a program does not include limits.h (or includes it after roken.h),
it can end up with PATH_MAX defined to be MAX_PATH, but MAX_PATH
undefined.  This causes consumers of PATH_MAX to become unhappy.

Work around this case by only using MAX_PATH if it is available, and
a constant otherwise.
2013-06-14 13:31:42 -04:00
Nicolas Williams
647fad8295 Remove name canon rules from krb5.conf.5 2013-06-09 23:42:37 -05:00
Nicolas Williams
c76ec8ec6a Fix bug in KDC handling of enterprise principals 2013-06-08 19:17:33 -05:00
Love Hornquist Astrand
fdfe696821 if no db, don't check FAST 2013-06-05 20:33:29 -07:00
Love Hornquist Astrand
7c77f1842a generate .x files for template too 2013-06-05 20:28:56 -07:00
Love Hornquist Astrand
73e5a50a72 use random() if we don't have arc4random() 2013-06-05 20:21:11 -07:00
Love Hornquist Astrand
ac22078116 add missing files 2013-06-05 20:01:11 -07:00
Love Hornquist Astrand
5201dadb62 argh, add missing \t 2013-06-04 01:03:32 -07:00
Love Hornquist Astrand
c696439942 fix up some more 2013-06-04 00:59:41 -07:00
Love Hornquist Astrand
a3f21747aa move to new plugin system 2013-06-04 00:16:55 -07:00
Love Hornquist Astrand
f53e1e7876 switch to new plugin handler 2013-06-04 00:04:16 -07:00
Love Hornquist Astrand
4e44171a28 cast away enum warnings 2013-06-03 22:05:09 -07:00
Love Hornquist Astrand
80fe143874 remove deprected warnings until we can move to non deprecated api 2013-06-03 22:03:20 -07:00
Love Hornquist Astrand
ebe9b82b8d Fix warning (from Victor) 2013-06-03 21:56:34 -07:00
Love Hornquist Astrand
4227e45a58 Merge branch 'nico/gss_constify' 2013-06-03 21:51:10 -07:00
Love Hornquist Astrand
060474df16 quel 64bit warnings, fixup implicit encoding for template, fix spelling 2013-06-03 21:46:20 -07:00