18 Commits

Author SHA1 Message Date
d1564ce6e9 kcm: Fix coverity issues 2022-01-20 12:41:39 -06:00
2f0c985b47 Revert "KCM wrong size memcmp"
'uuid' is seen as an 'unsigned char*', thus '*uuid' is an 'unsigned char' where size is 1.

This solves a problem where two KCM ccaches's uuid have the same first byte hides each other.

What we observe:
  * A user cannot discover tickets with (klist -l) but can access it with it's name
  * The 'rpc.gssd' daemon is doing the same kind of pattern but using GSS calls (gss_acquire_cred)

Whet GDB told us:
  * The 'kcm_ccache_get_uuids' is okay, all ccache are really present
  * The 'kcm_ccache_resolve_by_uuid' is buggy, it only compare the first byte of each uuid.
    Which may be the same as the one we're seeking. Selected ccache that will be, most probably, filtered-out afterward with a call to 'kcm_access'.
    This leads to 'KRB5_FCC_NOFILE' errors while the uuid is correct.

Similar calls may be present.

This reverts commit 936017e4d6,
2021-11-29 10:26:19 -05:00
9f58896af9 Add missing initialization of kdc_offset in kcm
In KCM, when allocating new kcm_ccache struct, there is missing inicialization
of kdc_offset.  It is getting random values in my case and stored tickets are
unusable, last time I got this value to "klist -v": KDC time offset: 61 years
11 months 2 weeks 3 days 5 hours 28 minutes 32 seconds This commit seems to
correct it.
2018-12-14 17:05:37 -06:00
936017e4d6 KCM wrong size memcmp
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
6d783560e4 fix sizeof(uuid) 2012-11-17 14:13:54 -08:00
cc47c8fa7b Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
We turn on a few extra warnings and fix the fallout that occurs
when building with --enable-developer.  Note that we get different
warnings on different machines and so this will be a work in
progress.  So far, we have built on NetBSD/amd64 5.99.64 (which
uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3).

Notably, we fixed

	1.  a lot of missing structure initialisers,

	2.  unchecked return values for functions that glibc
	    marks as __attribute__((warn-unused-result)),

	3.  made minor modifications to slc and asn1_compile
	    which can generate code which generates warnings,
	    and

	4.  a few stragglers here and there.

We turned off the extended warnings for many programs in appl/ as
they are nearing the end of their useful lifetime, e.g.  rsh, rcp,
popper, ftp and telnet.

Interestingly, glibc's strncmp() macro needed to be worked around
whereas the function calls did not.

We have not yet tried this on 32 bit platforms, so there will be
a few more warnings when we do.
2012-02-20 19:45:41 +00:00
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
c50d442375 release cred too 2010-10-06 23:47:37 -07:00
fe2dfe83a8 clean up and make work, require libheim-ipcs 2009-11-21 23:54:00 -08:00
0c539be609 Cast uid_t to long for printing 2009-08-14 11:15:45 +02:00
dfa2b7030c use calloc and by that way avoid NULL de-ref, cid#31
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24133 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:05:21 +00:00
1f82ad5700 read dead code, cid#5
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24132 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:05:11 +00:00
eceed3b5e2 switch to kcmuuid_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24018 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-11-02 07:17:03 +00:00
58b9d9cd60 cursor is dead
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24003 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-11-02 07:05:18 +00:00
86f16fb48d add kcm_ccache_find_cred_uuid
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24001 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-11-02 07:04:57 +00:00
6bb5d8d86f kcm_ccache_remove_cred_internal, call kcm_cursor_update to move cursor
forward if it was stepping on to be removed entry.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23951 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-19 20:30:24 +00:00
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
cd8bcb8404 Initial version of KCM daemon
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14544 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-02-03 08:20:00 +00:00