Commit Graph

186 Commits

Author SHA1 Message Date
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
Love Hornquist Astrand
a66a23bb45 Apply old patch from me that handles client's behind NAT
Tested by Harald Barth and bugfix by Ragnar Sundblad
2011-12-15 22:00:00 -08:00
Love Hornquist Astrand
c4d97ae93e encode result code with right length, pointed out by Rangar Sundblad, thanks! 2011-12-11 18:22:29 -08:00
Love Hornquist Astrand
2eb0d6ec82 dont entrust sprintf to encode binary packets 2011-12-11 18:08:05 -08:00
Nicolas Williams
a5e77c578e Deferred hostname canon using name canon rules 2011-10-22 14:54:13 -05:00
Nicolas Williams
e16360e2db Add --keepold option to cpw. 2011-07-22 16:07:05 -05:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Thomas Klausner
3772533acd Convert to UTF-8.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:21 -07:00
Thomas Klausner
db8e287e41 Use "Fl Fl" for long options.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:14 -07:00
Love Hornquist Astrand
b1909b2daa Fixes from NetBSD via Thomas Klausner and Roland C. Dowdeswell 2011-05-04 21:31:10 -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
Asanka C. Herath
cb712170ff Windows: Build and install kpasswd 2010-11-24 15:33:00 -05:00
Andrew Bartlett
d9f4d53dda s4:heimdal Use correct variable to advance past -- options in kpasswd
This bug was introduced when kpasswd was migrated to a local getarg()
call, in Heimdal commit 7dd146072c

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-03-27 01:20:52 -07:00
Russ Allbery
97648fc257 Disable kpasswdd error replies to completely malformed requests
Only send an error reply if the request passes basic verification.
Otherwise, kpasswdd would reply to every UDP packet, allowing an
attacker to set up a ping-pong DoS attack via a spoofed UDP packet with
a source address of another UDP service that also replies to every
packet.

Also suppress the error reply if ap_req_len is 0, since this indicates
an error packet.  An error packet may be the result of a ping-pong
attacker pointing us at another kpasswdd.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-03-16 11:50:22 -07:00
Love Hornquist Astrand
c867fd3e2e Make libtool pull in the depenency on libldap
Put in explicy depenency on libdap so that libtool
might to the right thing for us.

Patch from Jan Rekorajski
2009-12-08 00:15:10 -08:00
Love Hornquist Astrand
c6bbdb545b First drop of Windows build infrastructure from Secure Endpoints 2009-11-24 12:12:53 -08:00
Love Hornquist Astrand
7dd146072c switch to getarg directly 2009-11-23 07:36:34 -08:00
Love Hornquist Astrand
01ae59fb03 Copyright (c) 1997, 2000 - 2005 Kungliga Tekniska Högskolan 2009-10-24 14:18:05 -07:00
Love Hornquist Astrand
290255ee0b Drop optind variable since its only set (and -Wshadow libsystem)
From Matthias Dieter Wallnöfer
2009-10-16 08:26:43 -07:00
Love Hörnquist Åstrand
aa5b66d1e8 plug a memory leak.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25324 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-07-15 22:16:49 +00:00
Love Hörnquist Åstrand
b77ee0c2f8 Close f, from cppcheck
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25277 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-08 20:33:22 +00:00
Love Hörnquist Åstrand
5c0fc04d81 use krb5_cc_new_unique, use constants for cache types
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25050 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-03 04:05:48 +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
979ac09247 return exit_value
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23508 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-11 10:00:39 +00:00
Love Hörnquist Åstrand
07482fe5ad Switch to krb5_set_password.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23398 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-07-26 18:28:07 +00:00
Love Hörnquist Åstrand
185e54925d use krb5_free_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23321 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-24 23:49:06 +00:00
Love Hörnquist Åstrand
d26d184367 Use hdb_db_dir().
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22252 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-12-09 05:59:34 +00:00
Love Hörnquist Åstrand
2cfc283d68 Fix pointer vs strict alias rules.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21511 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-12 12:43:46 +00:00
Love Hörnquist Åstrand
cc4333b758 remove cvs ignore files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21026 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-09 03:09:59 +00:00
Love Hörnquist Åstrand
7ba2b2006c rename des to hcrypto
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20466 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-20 08:29:05 +00:00
Love Hörnquist Åstrand
3154e1056e Use strcspn to remove \n from string returned by fgets.
From Björn Sandell


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19233 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-06 08:04:05 +00:00
Love Hörnquist Åstrand
ece5f9603e Make krb5_get_init_creds_opt_free take a context argument.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19078 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-20 18:12:41 +00:00
Love Hörnquist Åstrand
b311b858ff x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18654 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-20 15:53:39 +00:00
Love Hörnquist Åstrand
99cfea62c1 (change): select the realm based on the target principal
From Gabor Gombas


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17571 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-13 18:51:41 +00:00
Love Hörnquist Åstrand
652da91adb Rename u_intXX_t to uintXX_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17447 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-05 10:52:01 +00:00
Love Hörnquist Åstrand
135a36efb2 (doit): when done, close all fd in the sockets array and free it.
Coverity NetBSD CID#1916


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17024 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-09 17:45:44 +00:00
Love Hörnquist Åstrand
b866404406 (read_words): catch empty file case, will cause PBE (division by zero)
later. From Tobias Stoeckmann.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17001 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-04 14:19:13 +00:00
Love Hörnquist Åstrand
44370849ea Send back a better error-message to the client in case the password
change was rejected.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16698 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-03 12:54:28 +00:00
Love Hörnquist Åstrand
d9e04327fb (doit): krb5_addr2sockaddr takes a krb5_socklen_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15684 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-20 08:46:02 +00:00
Love Hörnquist Åstrand
f4cf20b4df Support multi-realms databases, requires that all the realms are
configured on the KDC in krb5.conf with [libdefaults]default_realm
stanzas.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14884 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-22 11:03:11 +00:00
Love Hörnquist Åstrand
5921574969 add verifier libraries with kadm5_add_passwd_quality_verifier
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14803 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-15 11:16:32 +00:00
Love Hörnquist Åstrand
028094a426 document --addresses, controls what addresses kpasswd should listen too
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14481 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-05 18:07:44 +00:00
Love Hörnquist Åstrand
0ae2572c5c add --addresses, controls what addresses kpasswd should listen too
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14480 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-05 18:07:22 +00:00
Love Hörnquist Åstrand
ef82bfdf9a document -c
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14478 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-05 16:08:58 +00:00
Love Hörnquist Åstrand
8e0cc6db4d allow specifying a credential cache to use for the admin principal
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14477 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-05 16:08:03 +00:00
Love Hörnquist Åstrand
8e99ff463e use .
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14373 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-12-08 17:36:48 +00:00
Love Hörnquist Åstrand
42a68b1326 use keeps around options, from OpenBSD
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14372 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-12-08 17:36:18 +00:00
Johan Danielsson
0624b4457e replace INCLUDES with AM_CPPFLAGS
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14164 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-08-26 11:55:29 +00:00