Commit Graph

86 Commits

Author SHA1 Message Date
Roland C. Dowdeswell
65ffba10cc Fix memory leak in krb5_ret_data() on error/eof. 2012-05-28 15:10:09 +01:00
Roland C. Dowdeswell
df42274d96 Add krb5_storage_fsync().
We add a function to cause krb5_storage's to be sync'd to their backing
store.  For memory backed storages, this is a NOP.  For files, it calls
fsync on the file descriptor.
2012-05-28 13:14:55 +01:00
Love Hornquist Astrand
2daeea4feb handle error code from size_too_large more correct 2011-09-22 16:36:52 +02:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
bd2d4c2f79 ->max_alloc to krb5_storage and use it 2011-05-08 00:16:02 -07:00
Love Hornquist Astrand
f5f9014c90 Warning fixes from Christos Zoulas
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Simon Wilkinson
1d9072f026 krb5: reorganise crypto.c
lib/krb5/crypto.c was a large, monolithic block of code which made
it very difficult to selectively enable and disable particular
alogrithms.

Reorganise crypto.c into individual files for each encryption and
salt time, and place the structures which tie everything together
into their own file (crypto-algs.c)

Add a non-installed library (librfc3961) and test program
(test_rfc3961) which builds a minimal rfc3961 crypto library, and
checks that it is usable.
2010-11-03 11:12:24 +00:00
Love Hornquist Astrand
687db64c56 Patch from Secure Endpoints/Asanka Herath for windows support 2009-12-21 08:45:28 +01:00
Love Hornquist Astrand
850f9be110 fix docxygen errors 2009-08-19 16:35:14 -07:00
Love Hornquist Astrand
0b80f6e4ec document the rest of the storage functions 2009-08-18 10:46:10 -07:00
Love Hornquist Astrand
36440df0e6 document krb5_ret_{u,}int{32,16,8} 2009-08-18 19:05:57 +02:00
Love Hornquist Astrand
695c7e17e1 document krb5_storage_{set,clear}_flags 2009-08-18 19:03:09 +02:00
Love Hörnquist Åstrand
942a821fab remove RCSID
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25171 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-04 06:17:40 +00:00
Love Hörnquist Åstrand
08b3bcc294 catch error from krb5_store_int32
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24842 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-27 03:28:19 +00:00
Love Hörnquist Åstrand
f667d10608 less casting to make it work on LP64 platforms where off_t is signed.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24486 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 21:50:53 +00:00
Love Hörnquist Åstrand
b681891037 add krb5_storage_get_eof_code
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24314 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 22:02:40 +00:00
Love Hörnquist Åstrand
8d86547eba move xdr function to kadmin/rpc.c
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24312 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 22:02:19 +00:00
Love Hörnquist Åstrand
eb34718a0b clean up krb5_store_data_xdr
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24239 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:41:52 +00:00
Love Hörnquist Åstrand
3502a87a6c doxygen, fix seeking on non file fds
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24238 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:41:42 +00:00
Love Hörnquist Åstrand
77d0314d51 fixup krb5_storage_truncate return value, add krb5_{store,ret}_data_xdr, doxygen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24234 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:41:04 +00:00
Love Hörnquist Åstrand
2331b4edf5 start doxygen
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24224 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:39:20 +00:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
5fed824f37 its vs it\'s etc. From Bjorn Sandell
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22071 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-14 20:04:50 +00:00
Love Hörnquist Åstrand
9ff76dfc2e (krb5_store_creds_tag): use session.keytype to determine if to send
the session-key, for the second place in the function.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20529 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-22 14:28:19 +00:00
Love Hörnquist Åstrand
24fb3ec44b (krb5_store_creds_tag): use session.keytype to determine if to send
the session-key.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20498 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-21 21:44:44 +00:00
Love Hörnquist Åstrand
782482710f (krb5_ret_principal): Fix a bug in the malloc failure part, noticed by
Arnaud Lacombe in NetBSD coverity scan.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19394 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-17 22:49:37 +00:00
Love Hörnquist Åstrand
2d2f459f74 Add krb5_{ret,store}_stringnl functions, stores/retrieves a \n
terminated string.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17883 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-08-18 08:39:13 +00:00
Love Hörnquist Åstrand
809f1eef77 Rewrite the krb5_ret_u as proposed by Johan.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17438 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-05 07:15:18 +00:00
Johan Danielsson
9823db8f2a change some casts from unsigned to signed types
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17433 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-04 11:46:45 +00:00
Johan Danielsson
a0be47c4ec (krb5_store_uint16): change parameter to match function name
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17432 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-04 11:45:00 +00:00
Johan Danielsson
c9a10c7d6a replace u_intN_t with uintN_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17431 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-04 11:42:50 +00:00
Love Hörnquist Åstrand
1d230f8bae (krb5_ret_uint32): fix typecast
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17425 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-04 09:16:51 +00:00
Love Hörnquist Åstrand
3da792b3fa Add ret and store function for the unsigned fixed size integer types.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17424 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-04 09:16:08 +00:00
Love Hörnquist Åstrand
294a6cc6e0 (krb5_store_principal): make it take a krb5_const_principal, indent
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17422 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-03 18:58:04 +00:00
Love Hörnquist Åstrand
4466bd867f (krb5_ret_principal): fix memory leak
Coverity, NetBSD CID#1695


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17018 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-07 22:23:20 +00:00
Love Hörnquist Åstrand
4a78962ece unconst argument to krb5_store (XXX this should be fixed, krb5_store
doesn't need to modify its argument)


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15473 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-17 04:36:33 +00:00
Love Hörnquist Åstrand
c31ebc73a1 If we are allocating 0 entires, avoid failing if ALLOC returns NULL
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15331 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-01 10:40:05 +00:00
Luke Howard
c276c9537e add krb5_store_creds_tag, krb5_ret_creds_tag
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14535 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-02-02 07:32:59 +00:00
Love Hörnquist Åstrand
91351971f7 add KRB5_LIB_FUNCTION to all exported functions
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13863 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-05-25 21:46:46 +00:00
Johan Danielsson
26457b7135 replace krb5_free_creds_contents by krb5_free_cred_contents
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13790 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-25 19:25:35 +00:00
Johan Danielsson
8791dd6c6e (krb5_store_creds): set is_skey flag if length of second ticket is > 0
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13779 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-25 14:54:44 +00:00
Johan Danielsson
9125cb5647 Fix the cache flags bitorder issue with a storage flag instead of a
separate function.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13767 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-24 21:17:02 +00:00
Love Hörnquist Åstrand
a73db09513 add _krb5_store_creds_heimdal_0_7 and
_krb5_store_creds_heimdal_pre_0_7 that store the creds in just that format
make krb5_store_creds default to mit format


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13485 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-09 17:34:59 +00:00
Love Hörnquist Åstrand
9107f84073 (krb5_ret_creds): Runtime detect the what is the higher bits of the
bitfield


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13483 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-09 17:13:23 +00:00
Love Hörnquist Åstrand
4ccc9ed53b (krb5_store_creds): add disabled code that store the ticket flags in
reverse order
(bitswap32): new function


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13481 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-08 19:27:42 +00:00
Love Hörnquist Åstrand
ac134c6bf0 (krb5_ret_creds): if the higher ticket flags are set, its a mit cache,
reverse the bits, bug pointed out by Sergio Gelato <Sergio.Gelato@astro.su.se>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13480 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-08 18:49:12 +00:00
Love Hörnquist Åstrand
e7eaae52ff handle memory allocate errors
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13391 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-02-19 21:24:14 +00:00
Johan Danielsson
1eedc8c8b0 more krb5_ssize_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11186 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-21 12:21:57 +00:00
Johan Danielsson
d62c06839a ssize_t -> krb5_ssize_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11182 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-21 09:08:07 +00:00