Commit Graph

16488 Commits

Author SHA1 Message Date
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
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
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
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
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
Love Hornquist Astrand
b301e47fb8 rename heim_serialize to heim_copy_serialize to follow create/copy/get semantics 2013-06-03 21:46:20 -07:00
Nicolas Williams
a53f3a49e2 Fix unused variable warnings 2013-06-02 15:52:41 -05:00
Nicolas Williams
774f166e31 First attempt s/\<const gss_.*_t/gss_const_.*_t/g 2013-06-02 15:30:58 -05:00
Viktor Dukhovni
2433496ea6 Simplify user_realm support by removing krb5_parse_name_flags_realm()
and setting the realm as necessary in the caller.
2013-05-16 23:15:00 -04:00
Viktor Dukhovni
203e2beedd The DIR ccache code and tests don't quite work yet. 2013-05-16 00:34:36 -04:00
Viktor Dukhovni
4ce879c938 Fix: double free 2013-05-16 00:34:24 -04:00
Viktor Dukhovni
4fcad71a3a Two new flags for krb5_parse_name_flags_realm():
- KRB5_PRINCIPAL_PARSE_IGNORE_REALM: MIT compatible

    - KRB5_PRINCIPAL_PARSE_NO_DEF_REALM: Don't default the realm

The first ignores the realm if present.

The second does not impute the default realm if no realm is given and
leaves the realm NULL.  This will be used in kinit to determine whether
the user provided a realm or not, and if not we may use the user_realm,
or find the realm via the keytab.
2013-05-16 00:32:08 -04:00
Viktor Dukhovni
a2127d091d New krb5_parse_name_flags_realm supports explicit default realm.
Set the realm argument to NULL to get the usual default realm.

The krb5_parse_name_flags() function is now a wrapper around
krb5_parse_name_flags_realm().
2013-05-16 00:32:08 -04:00
Viktor Dukhovni
01fff2ca9c Allow krb5_principal_set_realm to set the realm to NULL. 2013-05-16 00:32:06 -04:00
Ben Kaduk
402e7ba08d Update URL for Kerberos FAQ
Submitted by Trix Farrar <trix@basement.net> as FreeBSD PR 178417.
2013-05-08 12:10:24 -04:00
Love Hornquist Astrand
b2ff260e15 klist --json support 2013-05-07 16:47:45 -07:00
Love Hornquist Astrand
ed6c3921e6 make krb5_cc_get_lifetime sane 2013-05-07 13:10:22 -07:00
Love Hornquist Astrand
55e5bfdfe0 add krb5_principal_is_root_krbtgt 2013-05-07 13:10:02 -07:00
Love Hornquist Astrand
71c2303eb8 make compile 2013-05-07 13:09:33 -07:00
Viktor Dukhovni
bf40b8cc63 Comment wordsmithing 2013-05-02 01:31:01 -04:00
Love Hornquist Astrand
bb089a75a9 undef rk_getpwnam_r to make sure we get the real prototype and not the rewrite #define 2013-05-01 14:00:31 -07:00
Love Hornquist Astrand
dfaedb7847 plug a memory leak, don't use strcpy/strcat 2013-05-01 13:55:21 -07:00
Patrik Lundin
0ff637618e add version print 2013-05-01 13:46:35 -07:00
Love Hornquist Astrand
c8cc2378f6 first go at dcc_get_cache_first 2013-04-30 11:01:12 -07:00
Love Hornquist Astrand
de61953108 handle creation of DIR caches 2013-04-29 22:54:11 -07:00
Love Hornquist Astrand
4256823e58 memset right size 2013-04-29 21:59:11 -07:00
Love Hornquist Astrand
a7e86affd8 add basic DIR support for file caches 2013-04-29 12:30:21 -07:00
Love Hornquist Astrand
e91bd34275 add rsa_keygen initializer 2013-04-29 12:03:42 -07:00
Love Hornquist Astrand
e8317b955f allow optional q in DH DomainParameters 2013-04-29 11:37:39 -07:00