Minsoo Choo
aff90c322e
Fix spelling
2024-06-16 23:30:48 -04:00
Joseph Sutton
a4b4e982f3
krb5: Fix code spelling
...
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz >
2023-11-28 21:34:35 -05:00
Joseph Sutton
30e3921ad1
krb5: Fix error condition
...
‘ret’ can only ever be equal to zero.
Found by Coverity (Samba CID 1518754).
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz >
2023-11-02 20:19:54 -05:00
Nicolas Williams
d3b08638f9
krb5: Fix wrong cast in _krb5_store_data_at_offset()
2023-01-07 11:08:00 -06:00
Nicolas Williams
59e13ad299
krb5: Quiet static analyzer warning in store.c
2023-01-04 00:43:36 -06:00
Nicolas Williams
42b0702601
krb5: Better checking for storage EOF
2022-12-22 17:55:13 -06:00
Nicolas Williams
a26c30b230
krb5: Initialize krb5_ret_string() output param
2022-03-18 18:33:53 -05:00
Jeffrey Altman
468a06e612
lib/krb5: krb5_store_string*() input must be non-NULL
...
krb5_store_string, krb5_store_stringz, krb5_store_stringnl
If the input string is NULL, fail the call with EINVAL.
Do not pass the NULL pointer to strlen().
Change-Id: Id87d72e263dde798f300353ec4c1656b310d17a4
2022-01-25 12:42:09 -05:00
Nicolas Williams
fb553dde1d
krb5: Fix warnings
2022-01-14 17:10:16 -06:00
Luke Howard
e50033aec2
kdc: add canonical principal name to authz data
...
Use the UPN_DNS_INFO buffer of the PAC to include the canonical principal name.
Arguably we should use AD-LOGIN-ALIAS as defined in RFC6806, but we may not
always know all the principal's aliases, and this approach allows us to share
application service logic with Windows.
2021-12-22 10:36:26 +11:00
Luke Howard
0ab3b7b2dd
krb5: support for canonical name in PAC
...
If the UPN_DNS_INFO buffer in the Windows PAC contains a canonical principal
name, use it in lieu of the ticket client name to determine the GSS-API
initiator name.
2021-12-22 10:36:26 +11:00
Luke Howard
65651c8106
krb5: mask should be uint64_t, not size_t
...
size_t is not 64 bits on all platforms
2021-08-07 19:25:22 +10:00
Luke Howard
9d16808515
krb5: mask integers to avoid unnecessary expansion
...
Sign-extension would expand the encoding of packed negative integers to one
greater than required.
2021-08-07 19:18:42 +10:00
Roland C. Dowdeswell
81a8b5069e
krb5_storage: add a packed integer type as an endian.
2021-08-07 18:49:33 +10:00
Luke Howard
7188969371
krb5: add krb5_store_bytes()
...
Similar to krb5_storage_write(), but returns an error rather than the number of
bytes written.
2021-08-06 19:32:49 +10:00
Luke Howard
4e359bd5ce
krb5: add krb5_store_datalen()
...
Store a data blob to the storage. The data is stored with an int32 as
length plus the data (not padded). This function only differs from
krb5_store_data() insofar as it takes a void * and a length as parameters.
Patch from Roland C. Dowdeswell <elric@imrryr.org >
2021-08-06 19:22:15 +10:00
Nicolas Williams
1c81ddf4e2
Round #2 of scan-build warnings cleanup
2016-11-16 17:03:14 -06:00
Nicolas Williams
b3db07d5f0
krb5_storage_free(NULL) should work
2016-02-29 19:13:09 -06:00
Nicolas Williams
996d4c5db3
Add krb5_ret/store_[u]int64()
2016-02-26 00:55:30 -06:00
Volker Lendecke
02616866e5
heimdal: Fix the developer O3 build
...
Signed-off-by: Volker Lendecke <vl@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2015-06-17 17:41:26 -05:00
Love Hörnquist Åstrand
d1cee9a14b
now that use used up more then 16 flags and we have been using the right bit order for many years, lets stop dealing with broken bit fields from ticket flags
2014-08-23 18:48:34 -07:00
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