Commit Graph

1780 Commits

Author SHA1 Message Date
Love Hornquist Astrand
f6e0d19cc0 make rk_SOCK_EXIT a statment to avoid warnings 2010-01-08 13:08:24 +01:00
Love Hornquist Astrand
95888d4ad3 rk_cloexec_dir uses dirfd that is not available on windows
All unixes have something like it, roken provides macro if not available.
2009-12-23 19:38:21 +01:00
Love Hornquist Astrand
3a09421025 no dirent.h, use dirent.hin instead 2009-12-23 19:29:40 +01:00
Love Hornquist Astrand
7a7061ac70 use strtol 2009-12-23 17:07:36 +01:00
Love Hornquist Astrand
be73fa4687 use krb5_socket_t 2009-12-23 14:12:38 +01:00
Asanka Herath
68cfbb7e19 Add rk_cloexec_dir() to lib/roken 2009-12-22 14:03:39 -05:00
Asanka Herath
27115dea15 Correct whitespace errors 2009-12-21 18:06:23 -05:00
Asanka Herath
a0ae9f5a0e Merge remote branch 'h-github/master' into win32-port2
* h-github/master: (64 commits)
  refix socket wrappers with rk_
  Patch from Secure Endpoints/Asanka Herath for windows support
  unset KRB5CCNAME
  its really just LIBADD more most of them
  correct quoting
  Use -lpthread for modern freebsd instead
  clean KRB5CCNAME and KRB5_CONFIG, require test to reset them
  more up ${env_setup}
  use PTHREADS_LIBADD for freebsd6 and newer
  add PTHREAD_LIBADD
  add PTHREAD_LIBADD
  add PTHREAD_LIBADD
  switch to PTHREADS_LIBADD
  log what the error string say too
  More debug logging
  sprinkle more 'echo "test failed"'
  sprinkle 'echo "test failed"'
  use calloc(), indent more prettier
  in sh, equal compare is really = for strings, not ==
  Check for duplicates, already loaded mechs
  ...

Conflicts (resolved):
	lib/krb5/auth_context.c
	lib/krb5/changepw.c
	lib/krb5/context.c
	lib/krb5/error_string.c
	lib/krb5/kuserok.c
	lib/krb5/libkrb5-exports.def.in
	lib/krb5/net_write.c
	lib/krb5/store_fd.c
	lib/krb5/test_cc.c
	lib/roken/strerror_r.c
2009-12-21 13:44:00 -05:00
Love Hornquist Astrand
77e382a2e0 handle that we always include strerror_r.c 2009-12-13 12:03:04 -08:00
Love Hornquist Astrand
5312f4de31 always include strerror_r.c 2009-12-13 12:02:46 -08:00
Love Hornquist Astrand
2f07a7d29d Try handle strerror_r more correct 2009-12-13 12:02:28 -08:00
Love Hornquist Astrand
74527a0bb2 if we have strerror_r, assume its the non standard strerror_r 2009-12-13 11:15:38 -08:00
Love Hornquist Astrand
85ad70e230 fix type for strerror_r 2009-12-13 11:02:46 -08:00
Ted Percival
c93cea7ea6 Fix roken getifaddrs for IPv4 & IPv6 on HP-UX & Solaris
HP-UX only returns IPv6 addresses using SIOCGLIFCONF,
SIOCGIFCONF has to be used for IPv4 addresses.
Solaris uses the same code as described in the comments, which
should correctly detect all addresses when running in a zone.

This adds the code that went missing from commit e20183da.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-12-07 18:40:46 -08:00
Ted Percival
e20183da23 Fix roken getifaddrs for IPv4 & IPv6 on HP-UX & Solaris
HP-UX only returns IPv6 addresses using SIOCGLIFCONF,
SIOCGIFCONF has to be used for IPv4 addresses.
Solaris uses the same code as described in the comments, which
should correctly detect all addresses when running in a zone.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-12-04 20:46:15 -08:00
Ted Percival
54817ef6f3 Revert "Try both v4 and v6 socket types"
It broke detection of IPv4 addresses on HP-UX machines with an IPv6
loopback address. Successful resolution of at least one IPv6 address
would then skip doing a separate IPv4 lookup as required by HP-UX.

This reverts commit 76afc31e9b.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-12-04 20:39:42 -08:00
Ted Percival
7fc0f55b89 Fix duplicate definition of rk_freeifaddrs
Introduced by incorrectly moving an ifdef in commit d00f998.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-12-04 20:07:42 -08:00
Asanka Herath
e5ee3e7d60 Merge commit 'lha/master' into win32-port2
* commit 'lha/master':
  glue for strsvisx
  add Allan McRae and Victor Guerra, sort
  Version Heimdal 1.3.2
  Remove fd caching since we don't have unload (deconstructor) support
2009-12-01 16:58:05 -05:00
Brian May
87d30c0e23 glue for strsvisx 2009-11-29 21:47:29 -08:00
Asanka Herath
62454211c0 (lib/roken) Add strerror_r() along with some missing symbols 2009-11-26 01:58:21 -05:00
Asanka Herath
405b7f530a (lib/roken) fk_flock() -> rk_flock() 2009-11-26 01:57:11 -05:00
Asanka Herath
eb3dc6fabd (lib/roken) Use strerror_s() to emulate strerror_r() on Windows 2009-11-26 01:56:50 -05:00
Asanka Herath
faa7dd7234 (lib/roken) Add ct.c to libroken on Windows 2009-11-25 12:43:16 -05:00
Love Hornquist Astrand
16a890a29c revert merged patches 2009-11-25 08:28:35 -08:00
Love Hornquist Astrand
86f4c66efd Merge branch 'master' into wip/win32-port2 2009-11-25 05:41:14 -08:00
Gabor Gombas
4c37844073 define KRB5_LIB_CALL in generated headers
glob.h did not define ROKEN_LIB_CALL and that caused havoc when it was
included before other roken headers, because those only check for the
existence of ROKEN_LIB_FUNCTION

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-25 05:14:46 -08:00
Asanka Herath
b191b1e12f Make kdc build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-24 22:19:37 -08:00
Love Hornquist Astrand
2204b852a7 Merge branch 'master' into wip/win32-port2 2009-11-24 21:46:10 -08:00
Asanka Herath
d00f9984a5 Make roken build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-24 21:42:02 -08:00
Love Hornquist Astrand
f1c0c1bba3 prefix SOCKET symbols with rk_ 2009-11-25 05:29:18 +01:00
Love Hornquist Astrand
c6bbdb545b First drop of Windows build infrastructure from Secure Endpoints 2009-11-24 12:12:53 -08:00
Asanka Herath
a87447f2b4 Use casts to reduce errors when converting sockaddr* to sockaddr_in or sockaddr_in6 2009-11-24 10:20:19 -08:00
Asanka Herath
7262cbab9c Comment for fd_from_socket() 2009-11-24 10:20:19 -08:00
Asanka Herath
f5b69e17f3 NTMakefile update for lib/roken to bulid additional modules and additional tests 2009-11-24 10:20:19 -08:00
Asanka Herath
db6994d1f5 Header file ordering 2009-11-24 10:20:18 -08:00
Asanka Herath
c0600f525c Add test for mini_inetd() 2009-11-24 10:20:18 -08:00
Asanka Herath
170e8158cb strcpy_s() and strcat_s() aren't drop-in replacements for strlcpy() and strlcat() 2009-11-24 10:20:18 -08:00
Asanka Herath
6c45d5614a Minor refactoring in simple_exec_w32.c 2009-11-24 10:20:18 -08:00
Asanka Herath
8e785a5750 Formatting changes and new mini_inetd() function signatures 2009-11-24 10:20:18 -08:00
Asanka Herath
e1932ec0fd If a recv() return EINTR on Windows, don't retry
EINTR (or WSAEINTR) is used to indicate that a blocking call was cancelled
using WSACancelBlockingCall().  Retrying wouldn't be the right thing to
do in this case.
2009-11-24 10:20:18 -08:00
Asanka Herath
a11386261d Change mini_inetd() to optionally return the connected socket
This is to support platforms where a socket is not an FD and can't
reliably be bound to the stdin and stdout file descriptors.
2009-11-24 10:20:18 -08:00
Asanka Herath
28023be15a Add setenv() to libroken 2009-11-24 10:17:50 -08:00
Asanka Herath
68e06566cc Use ROKEN_CPP_START and ROKEN_CPP_END instead of __BEGIN_DECLS/__END_DECLS 2009-11-24 10:17:49 -08:00
Asanka Herath
418dd986e5 Add bit-types to roken.h so that we don't need to include krb5-types.h everywhere 2009-11-24 10:17:18 -08:00
Asanka Herath
49b261efdc Formalize the simple_exec*() API 2009-11-24 10:17:18 -08:00
Asanka Herath
7ee1695f12 Add cloexec() and xfree() to libroken 2009-11-24 10:16:49 -08:00
Asanka Herath
dc0b2b8648 Missing foo_LIB_FUNCTION fixes 2009-11-24 10:11:15 -08:00
Asanka Herath
6ca5815e3d Socket functions should use SOCKET instead of int 2009-11-24 10:11:15 -08:00
Asanka Herath
59a4c6b369 Missing roken.h declarations for Visual C and Windows 2009-11-24 10:11:15 -08:00
Asanka Herath
483da4ae9b (mini_identd_addrinfo) Use closesocket() to close sockets
Also, set closed sockets to INVALID_SOCKET so that they won't be
closed again.
2009-11-24 10:11:15 -08:00