Commit Graph

191 Commits

Author SHA1 Message Date
Roland C. Dowdeswell
f0f07ff408 Use krb5_enomem() more consistently in lib/krb5. 2013-02-13 16:15:00 +08:00
Love Hörnquist Åstrand
7b411b3993 fixup logic for prompting for password 2012-03-10 09:59:34 -08:00
Roland C. Dowdeswell
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
Russ Allbery
911c993757 Fix reauthentication after password change in init_creds_password
When retrying authentication after a password change of an expired
password, use the new password instead of the original one.  Also,
pass in the correct length for the new password buffer to
change_password and zero the buffer that holds the new password on
function exit.

Signed-off-by: Russ Allbery <rra@stanford.edu>
Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2011-12-22 14:53:08 -06:00
Love Hornquist Astrand
477738a80d try w/o FAST if the KDC doesnt seem to handle it 2011-12-14 08:46:05 -08:00
Nicolas Williams
81293d9334 krb5_get_init_creds*() should not krb5_cc_close() the FAST ccache! 2011-11-22 17:04:35 -06:00
Love Hornquist Astrand
118f99e308 tell if keytab is missing principal 2011-11-22 11:00:51 -08:00
Nicolas Williams
3bebbe5323 Fixes to make Heimdal -Wall -Werror clean
These fixes make developer mode build, at least on Ubuntu.
2011-11-02 21:42:08 -05:00
Love Hörnquist Åstrand
b6fc70019e better error message 2011-07-24 22:33:39 -07:00
Love Hornquist Astrand
242d7e1602 comment 2011-07-24 20:24:39 -07:00
Love Hornquist Astrand
5d1ae998f9 "better" error codes 2011-07-24 20:24:39 -07:00
Love Hornquist Astrand
067072f81e complete KrbFastFinished message work 2011-07-24 20:24:39 -07:00
Love Hornquist Astrand
b6d5637b61 fill in more bits 2011-07-24 20:24:39 -07:00
Love Hornquist Astrand
04c7dd7cee start completion of KrbFastFinished 2011-07-24 20:24:38 -07:00
Love Hornquist Astrand
b73d402a47 export process last request 2011-07-24 20:24:38 -07:00
Love Hornquist Astrand
7b398263da Partial FAST 2011-07-24 20:24:38 -07:00
Love Hornquist Astrand
7c55029060 Add fast armor bits 2011-07-24 20:24:37 -07:00
Love Hornquist Astrand
16d16588d2 move back init_as_req when building packet 2011-07-24 20:24:36 -07:00
Love Hornquist Astrand
c148c2b432 unused key 2011-07-24 20:24:35 -07:00
Love Hörnquist Åstrand
1879af9e43 Break out fast state, shuffle around state so that as-req is inited earlier 2011-07-24 20:24:34 -07:00
Love Hörnquist Åstrand
04128ac081 Use reply_key from fast layer. 2011-07-24 20:24:34 -07:00
Love Hörnquist Åstrand
fd7c870550 add reply reply_key 2011-07-24 20:24:34 -07:00
Love Hörnquist Åstrand
a5e342f8ba Add fast_state. 2011-07-24 20:24:34 -07:00
Love Hörnquist Åstrand
8060a561db switch to KRB5_ENCTYPE 2011-07-24 16:02:22 -07:00
Love Hörnquist Åstrand
f60ec15834 partly unify enctype/keytype since there is only enctypes 2011-07-24 14:03:08 -07:00
Love Hörnquist Åstrand
0f489b7b28 unexport krb5_init_etype, remove duplicate code 2011-06-14 21:08:52 -07:00
Nicolas Williams
2fbad6432b Initial support for default_{as, tgs}_etypes.
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2011-06-14 20:35:19 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Jeffrey Altman
6850d6a65f avoid uninit variable and unreachable code warnings
most of these warnings are not problems because of ample
use of abort() calls.  However, the large number of warnings
makes it difficult to identify real problems.  Initialize
the variables to shut up the compilers.

Change-Id: I8477c11b17c7b6a7d9074c721fdd2d7303b186a8
2011-05-17 12:02:16 -04: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
Love Hornquist Astrand
6beb058640 Handle picky windows RODC servers 2010-10-01 17:49:05 -07:00
Asanka Herath
5dcc605f6b Fix calling conventions for Windows 2010-08-20 13:14:10 -04:00
Love Hornquist Astrand
788189805c catch error from as.*printf 2010-05-30 13:28:49 -07:00
Love Hornquist Astrand
aa371571f9 insert _FLAG into the name 2010-03-29 19:08:00 -07:00
Love Hornquist Astrand
cf35620ecf name flag 1 as KRB5_INIT_CREDS_STEP_CONTINUE 2010-03-29 18:55:41 -07:00
Matthias Dieter Wallnöfer
69ea9b38e9 heimdal - fix overlapped identifiers in the "krb5" library
heimdal - fix overlapped identifiers in the "krb5" library

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-03-16 10:05:35 -07:00
Love Hornquist Astrand
50990d61cf free always "ctx->password" when it isn't needed anymore
Patch originally from Matthias Dieter Wallnöfer, changed by me to keep
clearing the password from memory.
2010-03-16 10:04:20 -07:00
Love Hornquist Astrand
687db64c56 Patch from Secure Endpoints/Asanka Herath for windows support 2009-12-21 08:45:28 +01:00
Andrew Tridgell
a92eef4668 s4-heimdal: fixed a use-after-free heimdal bug
s4-heimdal: fixed a use-after-free heimdal bug

This caused samba4kinit to segfault on some systems

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-12-07 20:50:31 -08:00
Love Hornquist Astrand
b6ac1e61ff more logging, try harder to not loop 2009-11-22 12:23:48 -08:00
Love Hornquist Astrand
d6f5c959d6 remember the saltings we used in preauth in case the kdc doesn't sent
it back with the ticket.
2009-11-22 09:32:23 -08:00
Love Hornquist Astrand
b7bae0b201 make sure there are splace for storing ETYPE_NULL att the end of the array 2009-09-20 21:57:20 -07:00
Love Hornquist Astrand
20001366aa Better support for kinit -k when client have subset of enctypes compared to KDC
Get the list of enctypes and use that to calculate the list of client supported
enctypes when talking to the KDC, this to make sure that KDC doesn't send
pw-challanges to the client for enctypes that the client software support
but there is no entry in the keytab.
2009-08-30 13:25:38 -07:00
Love Hörnquist Åstrand
d104f3b9d6 Fix logic error when we do client referrals.
Author: andrew bartlett <abartlet@samba.org>

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25283 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-12 18:10:28 +00:00
Love Hörnquist Åstrand
83af77c271 remove code for unsupported option
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25180 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-06 19:01:26 +00: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
488c6c5fbe Don't bother asking for password if there is no prompter.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25121 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-16 08:19:08 +00:00
Love Hörnquist Åstrand
1804a4b104 plug memory leak
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25089 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-04 17:10:02 +00:00
Love Hörnquist Åstrand
db74868de6 plug memory leak
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25088 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-04 17:09:51 +00:00
Love Hörnquist Åstrand
3bbe9c48e1 Adapt to time skew in KRB-ERROR.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24909 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-22 17:21:40 +00:00