Commit Graph

842 Commits

Author SHA1 Message Date
Nicolas Williams
e75f790fe6 Use getauxval() for issuid() on Linux 2015-03-24 11:50:00 -05:00
Nicolas Williams
b48bed5f42 Daemons detach atomically to avoid having to wait
Tests that start daemons have to "wait" for them to start.

This commit makes Heimdal daemons prep to detach (when requested) by
forking early, then having the child signal readiness to the parent when
the child really is ready.  The parent exits only which the child is
ready.  This means that tests will no longer need to wait for daemons.

However, tests will still need a pidfile or such so they can stop the
daemons.

Note that the --detach options should not be used on OS X from launchd,
only from tests.
2015-03-24 11:49:59 -05:00
Simon Wilkinson
8485250989 roken: Add memset_s implementation
Add an implementation of memset_s to roken.

Some optimising compilers may remove the memset() instruction when it
is used immediately before a free, which defeats its purpose if the
intention is to zero memory before returning it to the heap or stack.

C11 added memset_s, provide a fallback in roken so that memset_s can
be used on all platforms.
2015-03-05 17:06:20 +00:00
Viktor Dukhovni
08c628b240 BN_is_negative is no longer a macro in OpenSSL master 2015-03-04 19:49:40 -05:00
Viktor Dukhovni
529f17bbec OpenSSL master requires more explicit #includes 2015-03-04 19:46:54 -05:00
Love Hörnquist Åstrand
f05236b202 hush autoconf 2014-08-22 21:52:27 -07:00
Love Hörnquist Åstrand
e6ed2bc9df use LT_INIT only, fixes #95 2014-08-22 21:52:10 -07:00
Love Hörnquist Åstrand
c93db5aa52 check for sys/errno.h 2014-07-18 17:46:25 +02:00
Nicolas Williams
816e8fcfa9 Use thread-safe errno on Solaris 2014-05-05 00:00:46 -05:00
Love Hörnquist Åstrand
f074a81c0c code sign all binaries when we can 2014-02-16 11:35:19 -08:00
Love Hörnquist Åstrand
bc0109489e include noinst_HEADERS 2014-02-16 10:04:56 -08:00
James Le Cuirot
97f1e2efb5 Fix roken-h-process.pl 2014-02-01 22:04:10 +00:00
Gustavo Zacarias
f76e8d5710 roken-h-process: use Getopt::Std, getopts.pl is deprecated
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2014-01-31 08:33:39 +01:00
Nicolas Williams
3e74e2e3bb Fix some DLL hell: use dladdr() to find plugin dir
Normally one would dlopen() a shared object's basename, not its absolute
path.  However, lib/krb5/plugin.c, in an effort to be zero-conf-ish,
wants to readdir() to find plugins to load, and in the process it ends
up defeating the RTLD's search-the-caller's-rpath.

This commit partially addresses this by allowing the use of $ORIGIN in
plugin_dir values and using them for the default (except on OS X).

This allows multiple Heimdal versions installed on the same host, but
with different plugin ABIs, to co-exist.  A step forward for doing make
check on hosts where Heimdal is installed.

For now we hardcode $ORIGIN/../lib/plugin/krb5 (linux, Solaris, *BSD),
or $ORIGIN (Windows; for assemblies objects need to be in the same
directory) and we eval $ORIGIN by using dladdr() (Linux, Solaris) or
GetModuleHandleEx() (Win32, via a dladdr() wrapper in libroken) to find
the path to libkrb5 whose dirname to use as $ORIGIN.  For Windows,
because we need the plugins to be in the same directory as libkrb5, we
require a prefix on plugin DLLs ("plugin_krb5_") to distinguish them
from other objects.

We should add a special token to mean "look in $ORIGIN, sure, but
dlopen() the plugin basenames only (so the RTLD can search the rpath)".
2013-09-06 16:51:53 -05:00
Love Hornquist Astrand
ad824fcd6a remove bit that might make old perl fail 2013-07-19 14:40:37 +02:00
Love Hornquist Astrand
581f834b4e include db6/db.h 2013-07-18 14:58:54 +02:00
Love Hornquist Astrand
787d9ceec9 check for db6/db.h 2013-07-18 14:58:54 +02:00
Love Hornquist Astrand
644bbff26f better documentation 2013-07-18 14:58:54 +02:00
Love Hornquist Astrand
6d356ae74d remove debug printf's 2013-05-07 13:27:10 -07:00
Love Hornquist Astrand
c98d31d186 fixup 2013-05-07 13:25:07 -07:00
Love Hornquist Astrand
dca1de8dc8 add doxygen support and json export document support 2013-04-30 11:25:35 -07:00
Howard Chu
9f95207933 Add support for OpenLDAP libmdb 2012-10-07 16:47:45 -07:00
Stef Walter
b0b94a445a Add pkg-config files for krb5 libraries
* These can be used along side krb5-config

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-09-27 14:00:49 -07:00
Love Hornquist Astrand
8fb0c019ec use Getopt::Std, patch original from Leonardo <rnalrd@gmail.com>, updated by me 2012-09-23 10:41:34 -07:00
Nicolas Williams
98809e86ce Move base into lib
This involves reverting dd267e8fc3,
    but that gets lost in the move.

    This builds on Ubuntu and Windows at this time.
2012-06-20 19:32:08 -05:00
Eray Aslan
06130cf7bf Fix broken qop.5 man page generation
$base should not include sub directories.  Filter them out.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-05-30 16:36:18 +02:00
Samuel Thibault
0ef0446645 Properly activate the pthread support on GNU/Hurd.
Originally submitted as a patch to the Debian Heimdal package:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=483281

Signed-Off-By: Jelmer Vernooij <jelmer@debian.org>

Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2012-04-05 22:55:01 -07:00
Love Hörnquist Åstrand
2a11d93bc0 define DEVELOPER_MODE when --enable-developer 2012-02-29 21:58:48 -08:00
Love Hörnquist Åstrand
053c44e100 Rename over old file, but only if it changed 2012-02-29 21:56:07 -08:00
Love Hörnquist Åstrand
b83452dd37 Wno-unused-result (not supported on gcc-4.2) 2012-02-29 08:31:58 -08:00
Roland C. Dowdeswell
e8779d5d4a Add -Wshadow and deal with the warnings. 2012-02-21 11:17:55 +00: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
Nicolas Williams
6dd66df594 Make master build on Windows
Add strtoll()/strtoull() to lib/roken
    Add stdint.h to lib/roken (Windows only)
    Add logic to detect whether to use lib/roken's stdint.h based on
        Visual Studio version
    Add include of stdint.h in generated ASN.1 code
    Export missing symbols for 64-bit integers in lib/asn1
    Export missing symbols for FAST
    Add missing sources to kdc/NTMakefile
    Fix issue in kuserok
    Fix bsearch issues
2012-01-17 12:10:14 -06:00
Nicolas Williams
8aa248370f Make the build system make and install section 7 manpages 2011-12-21 15:43:56 -06:00
Love Hörnquist Åstrand
376181632b handle &&, from Jaideep Padhye 2011-11-20 09:55:15 -08:00
Love Hörnquist Åstrand
660d996dbf set compile-et to no if its not found, try to not use it 2011-11-20 09:55:15 -08:00
Love Hörnquist Åstrand
d576ee3866 add glue for silent-rules 2011-11-13 10:01:40 -08:00
Love Hornquist Astrand
240b298e61 Simplify base/section rules, patch from David R Boldt 2011-09-29 13:52:06 +02:00
Nicolas Williams
1de3db5678 Make getpwnam_r() check work on Ubuntu
NULL is not defined w/o including stddefs.h, so the test program
    fails to compile.  A simple s/NULL/0/ fixes it.
2011-09-27 17:32:11 -05:00
Nicolas Williams
cdceea1b3e Revert "A simple (but wrong?) fix for Solaris build issues"
This reverts commit 6a7f2a5b2e.
2011-09-27 16:05:34 -05:00
Nicolas Williams
e927695a5d Better fix for the Solaris getpwnam_r() build issue 2011-09-27 16:05:03 -05:00
Nicolas Williams
6a7f2a5b2e A simple (but wrong?) fix for Solaris build issues 2011-09-27 01:59:44 -05:00
Love Hornquist Astrand
8e455dc774 dont use initstate/setstate 2011-09-21 17:38:21 +02:00
Love Hornquist Astrand
a2256e00d8 use __deprecated__ 2011-09-19 11:10:51 +02:00
Love Hornquist Astrand
57d468518f fix __has_extension macro to take an argument 2011-09-11 18:30:45 +02:00
Love Hornquist Astrand
4b0087fd4a use __has_extension(attribute_deprecated_with_message) if it exists 2011-09-09 14:16:48 +02:00
Love Hörnquist Åstrand
5c262dd3d3 set COMPILE_ET to the found binary at the end if we are using it 2011-08-28 16:19:19 -07:00
Love Hörnquist Åstrand
ee58c256f4 remove krb4 bits 2011-08-10 09:16:51 -07:00
Jelmer Vernooij
0b3c720c01 cf: Also enable pthreads on Linux 3.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-07-23 09:22:51 -07:00
Thomas Klausner
97df66c0a0 Put Nd argument after Nd macro.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:27 -07:00