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
This commit is contained in:
11
NEWS
11
NEWS
@@ -6,6 +6,17 @@ Release Notes - Heimdal - Version Heimdal 1.4
|
|||||||
- KCM is polished up and now used in production
|
- KCM is polished up and now used in production
|
||||||
- NTLM first class citizen, credentials stored in KCM
|
- NTLM first class citizen, credentials stored in KCM
|
||||||
- Table driven ASN.1 compiler, smaller!, not enabled by default
|
- Table driven ASN.1 compiler, smaller!, not enabled by default
|
||||||
|
- Native Windows client support
|
||||||
|
|
||||||
|
Release Notes - Heimdal - Version Heimdal 1.3.2
|
||||||
|
|
||||||
|
Bug fixes
|
||||||
|
|
||||||
|
- Don't cache /dev/*random file descriptor, it doesn't get unloaded
|
||||||
|
- Make C++ safe
|
||||||
|
- Misc warnings
|
||||||
|
|
||||||
|
Release Notes - Heimdal - Version Heimdal 1.3.1
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
|
|
||||||
|
@@ -190,6 +190,7 @@ AC_CHECK_FUNCS([ \
|
|||||||
setprogname \
|
setprogname \
|
||||||
setstate \
|
setstate \
|
||||||
strsvis \
|
strsvis \
|
||||||
|
strsvisx \
|
||||||
strunvis \
|
strunvis \
|
||||||
strvis \
|
strvis \
|
||||||
strvisx \
|
strvisx \
|
||||||
@@ -388,7 +389,7 @@ AM_CONDITIONAL(have_fnmatch_h,
|
|||||||
AC_FOREACH([rk_func], [strndup strsep strtok_r],
|
AC_FOREACH([rk_func], [strndup strsep strtok_r],
|
||||||
[AC_NEED_PROTO([#include <string.h>], rk_func)])
|
[AC_NEED_PROTO([#include <string.h>], rk_func)])
|
||||||
|
|
||||||
AC_FOREACH([rk_func], [strsvis strunvis strvis strvisx svis unvis vis],
|
AC_FOREACH([rk_func], [strsvis strsvisx strunvis strvis strvisx svis unvis vis],
|
||||||
[AC_NEED_PROTO([#ifdef HAVE_VIS_H
|
[AC_NEED_PROTO([#ifdef HAVE_VIS_H
|
||||||
#include <vis.h>
|
#include <vis.h>
|
||||||
#endif], rk_func)])
|
#endif], rk_func)])
|
||||||
|
@@ -37,6 +37,7 @@ The @code{pkcs11.h} headerfile was written by the Scute project.
|
|||||||
Bugfixes, documentation, encouragement, and code has been contributed by:
|
Bugfixes, documentation, encouragement, and code has been contributed by:
|
||||||
@table @asis
|
@table @asis
|
||||||
@item Alexander Boström
|
@item Alexander Boström
|
||||||
|
@item Allan McRae
|
||||||
@item Andrew Bartlett
|
@item Andrew Bartlett
|
||||||
@item Andrew Cobaugh
|
@item Andrew Cobaugh
|
||||||
@item Anton Lundin
|
@item Anton Lundin
|
||||||
@@ -64,8 +65,8 @@ Bugfixes, documentation, encouragement, and code has been contributed by:
|
|||||||
@item Marc Horowitz
|
@item Marc Horowitz
|
||||||
@item Mario Strasser
|
@item Mario Strasser
|
||||||
@item Mark Eichin
|
@item Mark Eichin
|
||||||
@item Mattias Amnefelt
|
|
||||||
@item Martin von Gagern
|
@item Martin von Gagern
|
||||||
|
@item Mattias Amnefelt
|
||||||
@item Michael B Allen
|
@item Michael B Allen
|
||||||
@item Michael Fromberger
|
@item Michael Fromberger
|
||||||
@item Michal Vocu
|
@item Michal Vocu
|
||||||
@@ -76,10 +77,11 @@ Bugfixes, documentation, encouragement, and code has been contributed by:
|
|||||||
@item Phil Fisher
|
@item Phil Fisher
|
||||||
@item Rafal Malinowski
|
@item Rafal Malinowski
|
||||||
@item Rainer Toebbicke
|
@item Rainer Toebbicke
|
||||||
@item Roman Divacky
|
|
||||||
@item Richard Nyberg
|
@item Richard Nyberg
|
||||||
|
@item Roman Divacky
|
||||||
@item Sho Hosoda, 細田 将
|
@item Sho Hosoda, 細田 将
|
||||||
@item Stefan Metzmacher
|
@item Stefan Metzmacher
|
||||||
|
@item Victor Guerra
|
||||||
@item Zeqing Xia
|
@item Zeqing Xia
|
||||||
@item Åke Sandgren
|
@item Åke Sandgren
|
||||||
@item and we hope that those not mentioned here will forgive us.
|
@item and we hope that those not mentioned here will forgive us.
|
||||||
|
@@ -42,9 +42,6 @@
|
|||||||
|
|
||||||
#include "randi.h"
|
#include "randi.h"
|
||||||
|
|
||||||
static int random_fd = -1;
|
|
||||||
static HEIMDAL_MUTEX random_mutex = HEIMDAL_MUTEX_INITIALIZER;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unix /dev/random
|
* Unix /dev/random
|
||||||
*/
|
*/
|
||||||
@@ -93,44 +90,29 @@ static int
|
|||||||
unix_bytes(unsigned char *outdata, int size)
|
unix_bytes(unsigned char *outdata, int size)
|
||||||
{
|
{
|
||||||
ssize_t count;
|
ssize_t count;
|
||||||
int once = 0;
|
int fd;
|
||||||
|
|
||||||
if (size < 0)
|
if (size < 0)
|
||||||
return 0;
|
return 0;
|
||||||
else if (size == 0)
|
else if (size == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
HEIMDAL_MUTEX_lock(&random_mutex);
|
fd = get_device_fd(O_RDONLY);
|
||||||
if (random_fd == -1) {
|
if (fd < 0)
|
||||||
retry:
|
|
||||||
random_fd = get_device_fd(O_RDONLY);
|
|
||||||
if (random_fd < 0) {
|
|
||||||
HEIMDAL_MUTEX_unlock(&random_mutex);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (size > 0) {
|
while (size > 0) {
|
||||||
HEIMDAL_MUTEX_unlock(&random_mutex);
|
count = read(fd, outdata, size);
|
||||||
count = read (random_fd, outdata, size);
|
if (count < 0 && errno == EINTR)
|
||||||
HEIMDAL_MUTEX_lock(&random_mutex);
|
|
||||||
if (random_fd < 0) {
|
|
||||||
if (errno == EINTR)
|
|
||||||
continue;
|
continue;
|
||||||
else if (errno == EBADF && once++ == 0) {
|
else if (count <= 0) {
|
||||||
close(random_fd);
|
close(fd);
|
||||||
random_fd = -1;
|
|
||||||
goto retry;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
} else if (count <= 0) {
|
|
||||||
HEIMDAL_MUTEX_unlock(&random_mutex);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
outdata += count;
|
outdata += count;
|
||||||
size -= count;
|
size -= count;
|
||||||
}
|
}
|
||||||
HEIMDAL_MUTEX_unlock(&random_mutex);
|
close(fd);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -955,6 +955,14 @@ ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
|
|||||||
strsvis(char *, const char *, int, const char *);
|
strsvis(char *, const char *, int, const char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRSVISX) || defined(NEED_STRSVISX_PROTO)
|
||||||
|
#ifndef HAVE_STRSVISX
|
||||||
|
#define strsvisx rk_strsvisx
|
||||||
|
#endif
|
||||||
|
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
|
||||||
|
strsvisx(char *, const char *, size_t, int, const char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_STRUNVIS) || defined(NEED_STRUNVIS_PROTO)
|
#if !defined(HAVE_STRUNVIS) || defined(NEED_STRUNVIS_PROTO)
|
||||||
#ifndef HAVE_STRUNVIS
|
#ifndef HAVE_STRUNVIS
|
||||||
#define strunvis rk_strunvis
|
#define strunvis rk_strunvis
|
||||||
|
Reference in New Issue
Block a user