Commit Graph

99 Commits

Author SHA1 Message Date
Nicolas Williams
1ee136ce40 autoconf: look for unlinkat() 2019-10-03 13:09:18 -05:00
Nicolas Williams
8fae8a1826 Remove iruserok() 2018-12-25 22:11:19 -06:00
Nicolas Williams
3b8c762dd0 Remove lib/roken glob()
We no longer use it since removing ftp from appl/.

Note that expansion of ~username/ couldn't have been working because
k_getpwnam() was being called with an unsigned short * that was forcibly
cast to char *, but it really was shorts, not chars...  Anyone who ever
feels like reviving lib/roken/glob.[ch] will want to fix that...
2018-12-25 22:11:19 -06:00
Daria Phoebe Brashear
1da17c2f22 roken: test for auxv_t in whichever of auxv.h or sys/auxv.h we find
on solaris it's in sys/auxv.h; so a test for it only in auxv.h isn't
enough
2018-04-17 21:32:36 -04:00
David Mulder
2548b3b8aa Solaris 8 x86 uses ->d_fd not ->dd_fd or dirfd() 2017-09-25 18:26:35 -05:00
Nicolas Williams
cf4efe8de6 Add secure_getenv.c 2017-04-17 18:02:30 -04:00
Nicolas Williams
650ffdc964 Revamp lib/roken/getauxval.c 2017-04-17 18:02:30 -04:00
Nicolas Williams
097e96cbf4 Look for emalloc
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
0271b171e5 Add bswap64() 2016-02-16 20:49:33 -06:00
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
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
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
Love Hornquist Astrand
8e455dc774 dont use initstate/setstate 2011-09-21 17:38:21 +02:00
Love Hornquist Astrand
01f0a1f509 move tsearch.c to autodetection for libroken.la 2011-05-17 21:47:02 -07:00
Derrick Brashear
2a32bf67f0 Add tsearch and friends, and a test program
tsearch is missing from windows. use the netbsd version as it's
license-compatible.
2011-04-08 15:15:36 +01:00
Love Hornquist Astrand
fea82013eb Check for dd_fd in DIR not struct dirent
Pointed out by Ragnnar Sundblad in private mail
2010-03-21 08:58:33 -07:00
Love Hornquist Astrand
94a8d9c5e5 autoconf test for dirfd and dd_fd 2010-02-25 22:18:32 -08:00
Love Hornquist Astrand
6dcf1c947b Try handle strerror_r more correct 2009-12-13 12:01:31 -08:00
Brian May
87d30c0e23 glue for strsvisx 2009-11-29 21:47:29 -08:00
Love Hornquist Astrand
48d68a3815 define rk_PATH_DELIM 2009-11-25 02:02:10 +01:00
Love Hornquist Astrand
fb35ca4026 detect strerror_r and if not there, provide it 2009-10-12 09:01:55 -07:00
Love Hornquist Astrand
cfafa64f83 Maybe include <netdn.h>, maybe include <ws2tcpip.h> 2009-09-19 17:53:56 -07:00
Love Hornquist Astrand
cadd62466b Maybe include <sys/socket.h> 2009-09-19 17:45:42 -07:00
Love Hornquist Astrand
fb0fc045c9 check for winsock2 2009-09-19 17:35:53 -07:00
Love Hornquist Astrand
99a05b37ca Add missing ',' between parameters [HEIMDAL-599]
From Michael Hammer of Gentoo, make this work with autoconf-2.64
2009-08-03 09:52:17 +02:00
Love Hörnquist Åstrand
4148bd6c30 Darwin is weird, and in some senses not unix, launchd doesn't want
servers to use daemon(), so its deprecated.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24424 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:41:48 +00:00
Love Hörnquist Åstrand
fa99a3de21 <sys/bswap.h> cannot be included alone on NetBSD. From KAMADA Ken'ichi.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22774 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-03-25 09:30:56 +00:00
Love Hörnquist Åstrand
8c5e602fbd we have a fnmatch.h only if there is a working implementation and a
header file. If we do use roken, lets use our own headerfile that does
symbol renaming.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20639 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-10 17:22:58 +00:00
Love Hörnquist Åstrand
9d61957d2c drop test for broken getnameinfo, that old aix is no longer relevant.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20313 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-11 11:36:29 +00:00
Love Hörnquist Åstrand
3b154f0067 More headerfiles for iruserok prototype check.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19766 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-08 15:38:18 +00:00
Love Hörnquist Åstrand
ff1545ae44 Check if iruserok needs a prototype.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19651 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-03 23:27:11 +00:00
Love Hörnquist Åstrand
4cc35059ef Add check for timegm.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18611 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-19 16:34:07 +00:00
Love Hörnquist Åstrand
79ffbb5e17 Include sys/types.h for sys/socket.h and netdb.h.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18575 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-19 05:20:41 +00:00
Love Hörnquist Åstrand
6438583810 Add samba_SOCKET_WRAPPER fragment
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18096 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-16 17:31:39 +00:00
Love Hörnquist Åstrand
706620d8e1 Add check for fnmatch.h, its needed to be done for the automake
conditional below.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17154 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-22 06:54:43 +00:00
Love Hörnquist Åstrand
aa37b056a2 Check for <stdint.h> and uintptr_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16103 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-28 03:06:36 +00:00
Love Hörnquist Åstrand
e99499514c Resolver check moved to rk_RESOLV, from Andrew Bartlet <abartlet@samba.org>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16010 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-02 10:20:58 +00:00
Love Hörnquist Åstrand
4d4bf3ed94 Check for res_ndestroy.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15944 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-08-22 19:14:28 +00:00
Johan Danielsson
c78321491c am_conditional have_cgetent
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15153 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-17 08:50:23 +00:00
Love Hörnquist Åstrand
93a6e79201 Get daemon declared on Solaris (it's in unistd.h but masked by a
feature test), just to avoid a warning, since it has int args.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15128 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-11 13:00:45 +00:00
Love Hörnquist Åstrand
630a504232 Check for correct vis.h.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15005 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-29 10:56:39 +00:00
Love Hörnquist Åstrand
fe3cbd31f3 check for closefrom
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14779 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-13 08:02:35 +00:00
Love Hörnquist Åstrand
9a9e2f535c include <sys/socket.h> for <netinet6/in6_var.h>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14645 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-15 23:18:20 +00:00
Johan Danielsson
e4f79c6902 replace AC_CHECK_DECLARATION with standard AC_CHECK_DECL(S)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14171 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-08-26 15:12:17 +00:00
Love Hörnquist Åstrand
ddfca69195 rename AC_WFLAGS to rk_WFLAGS
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13340 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-02-12 14:23:09 +00:00