Commit Graph

38 Commits

Author SHA1 Message Date
Love Hornquist Astrand
1d84562886 add HDBGET: that only supports get, iteration doesnt really make sense for the HDB keytab except when dumping 2013-10-15 12:40:39 +02:00
Jeffrey Altman
50381859a0 hdb: fix parsing of mkey db string
The use of the wrong value for the length of ":mkey=" was identified
by Brian May and reported via github:

  https://github.com/heimdal/heimdal/issues/40

Change-Id: I0aed86a5bb0359b7a266369076fde5e62f23b5fe
2013-10-13 19:59:48 -04: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
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -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
Love Hornquist Astrand
6c6726d76c drop hdb_fetch 2010-11-28 11:46:46 -08:00
Andrew Bartlett
f469fc6d49 heimdal Add support for extracting a particular KVNO from the database
This should allow master key rollover.

(but the real reason is to allow multiple krbtgt accounts, as used by
Active Directory to implement RODC support)

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-11-28 09:52:54 -08:00
Asanka Herath
5dcc605f6b Fix calling conventions for Windows 2010-08-20 13:14:10 -04:00
Andrew Bartlett
6243038c9f s4:heimdal A real fix for bug 6801
The issue was that we would free the entry after the database, not
knowing that the entry was a talloc child of the database.

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-10-13 21:44:22 -07:00
Love Hornquist Astrand
8e8c155c50 Make example sane and make LDAP style backends work (slight better)
Fix the format example, parse the string backward to take of the
master key before passing the database name down into the HDB backend
layer.
2009-09-12 17:26:10 -07:00
Love Hornquist Astrand
36ea29599d there is no database 2009-09-12 16:48:51 -07:00
Love Hornquist Astrand
e6c2a70678 Indent some more 2009-08-03 12:10:07 +02:00
Love Hornquist Astrand
b2129c0751 Indent the patch from Andrew and make it compile again 2009-08-03 10:54:44 +02:00
Love Hornquist Astrand
ada7c73176 Indent the patch from Andrew and make it compile again 2009-08-03 10:50:50 +02:00
Love Hornquist Astrand
788480d28a heimdal Extend the 'hdb as a keytab' code [HEIMDAL-600]
This extends the hdb_keytab code to allow enumeration of all the keys.

The plan is to allow ktutil's copy command to copy from Samba4's
hdb_samba4 into a file-based keytab used in wireshark.

From Andrew Bartlett
2009-08-03 10:43:22 +02:00
Love Hörnquist Åstrand
6a24e13678 Use hdb_get_dbinfo() to find the realms.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25326 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-07-15 22:17:30 +00:00
Love Hörnquist Åstrand
5a9dd54e95 drop RCSID
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25319 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-07-05 05:09:16 +00:00
Love Hörnquist Åstrand
cc988ffd4b use krb5_principal_get_realm
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25115 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-16 08:08:24 +00:00
Love Hörnquist Åstrand
62f5e43dff add destroy
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24432 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:43:05 +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
7fcd266fdd use krb5_set_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23316 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 04:32:32 +00:00
Love Hörnquist Åstrand
03aa2121f3 Change || to |, From metze.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18380 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-09 12:36:40 +00:00
Love Hörnquist Åstrand
a79515bd51 Add back :file to sample format.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18374 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-09 11:22:59 +00:00
Love Hörnquist Åstrand
8c8b418934 Add more HDB_F flags to hdb_fetch. Pointed out by Andrew Bartlet.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18368 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-09 09:44:51 +00:00
Love Hörnquist Åstrand
87a81b3b0d (hdb_get_entry): close and destroy the database later, the
hdb_entry_ex might still contain links to the database that it expects
to use.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18267 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-06 16:53:11 +00:00
Love Hörnquist Åstrand
38b3c68c13 (hdb_get_entry): memset ent before passing it into ->hdb_fetch().
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18234 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-05 07:52:27 +00:00
Love Hörnquist Åstrand
d176572cbc (hdb_get_entry): Break out the that we request from principal from the
entry and pass it in as a seprate argument.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17307 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-27 11:01:30 +00:00
Love Hörnquist Åstrand
72a5513806 Remove a delta from last revision that should have gone in later.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16966 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-02 20:20:45 +00:00
Love Hörnquist Åstrand
4c3ff70933 (hdb_resolve): off by one, found by IBM checker.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16931 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-02 00:48:26 +00:00
Love Hörnquist Åstrand
0c2369acd0 Wrap hdb_entry with hdb_entry_ex, patch originally from Andrew Bartlet
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16378 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-12-12 12:40:12 +00:00
Love Hörnquist Åstrand
0927e1235b const poison, add a unconst where needed
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15480 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-17 05:08:46 +00:00
Love Hörnquist Åstrand
0540f13b86 prefix all struct HDB elements with hdb_
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12880 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-09-19 00:25:35 +00:00
Assar Westerlund
46cc72d9f5 (find_db): const-correctness in parameters to krb5_config_get_next
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11230 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-26 13:28:11 +00:00
Assar Westerlund
c7562eda65 add some more error strings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10338 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-13 06:30:42 +00:00
Assar Westerlund
36d4a902d5 re-write to delay the opening of the database till it's known which
principal is being sought, thereby allowing the usage of multiple
databases, however they need to be specified in /etc/krb5.conf since
all the programs using this keytab do not read kdc.conf


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9008 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-27 04:31:42 +00:00
Johan Danielsson
c1f10df5f7 (hdb_get_entry): give some more useful return codes
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6874 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-08-26 13:24:05 +00:00
Johan Danielsson
799b01fd88 HDB keytab backend
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6871 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-08-26 13:07:30 +00:00