/macosx-10.9.5/ncurses-42/ncurses/ncurses/ |
H A D | SigAction.h | 44 #ifndef HAVE_SIGACTION 45 #define HAVE_SIGACTION 0 macro 52 #if HAVE_SIGACTION 58 #else /* !HAVE_SIGACTION */ 108 #endif /* HAVE_SIGACTION */
|
/macosx-10.9.5/tcpdump-56/tcpdump/ |
H A D | setsignal.c | 34 #ifdef HAVE_SIGACTION 76 #ifdef HAVE_SIGACTION
|
H A D | config.h | 179 #define HAVE_SIGACTION 1 macro
|
/macosx-10.9.5/BerkeleyDB-21/db/common/ |
H A D | util_sig.c | 25 #ifndef HAVE_SIGACTION 44 #ifdef HAVE_SIGACTION
|
/macosx-10.9.5/OpenLDAP-491.1/OpenLDAP/libraries/liblutil/ |
H A D | signal.c | 18 #ifdef HAVE_SIGACTION
|
/macosx-10.9.5/Heimdal-323.92.1/lib/kadm5/ |
H A D | ipropd_common.c | 48 #ifdef HAVE_SIGACTION
|
/macosx-10.9.5/uucp-11/uucp/unix/ |
H A D | signal.c | 55 #if HAVE_SIGSET && ! HAVE_SIGACTION && ! HAVE_SIGVEC 77 #if ! HAVE_SIGACTION && ! HAVE_SIGVEC && ! HAVE_SIGSET 123 #if HAVE_SIGACTION 151 #else /* ! HAVE_SIGACTION */ 197 #endif /* ! HAVE_SIGACTION */
|
/macosx-10.9.5/OpenLDAP-491.1/OpenLDAP/include/ac/ |
H A D | signal.h | 24 #if defined( HAVE_SIGACTION )
|
/macosx-10.9.5/OpenSSH-186/openssh/openbsd-compat/ |
H A D | sigact.h | 48 #if !defined(HAVE_SIGACTION) && defined(HAVE_SIGVEC) 88 #endif /* !defined(HAVE_SIGACTION) && defined(HAVE_SIGVEC) */
|
H A D | sigact.c | 46 #if !HAVE_SIGACTION && HAVE_SIGVEC
|
/macosx-10.9.5/cups-372.4/cups/backend/ |
H A D | usb.c | 146 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) 148 #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ 163 #elif defined(HAVE_SIGACTION)
|
/macosx-10.9.5/Heimdal-323.92.1/lib/roken/ |
H A D | test-mem.c | 57 #ifdef HAVE_SIGACTION 160 #ifdef HAVE_SIGACTION 207 #ifdef HAVE_SIGACTION
|
/macosx-10.9.5/Heimdal-323.92.1/lib/asn1/ |
H A D | check-common.c | 208 #ifdef HAVE_SIGACTION 221 #ifdef HAVE_SIGACTION 333 #ifdef HAVE_SIGACTION 361 #ifdef HAVE_SIGACTION 374 #ifdef HAVE_SIGACTION 412 #ifdef HAVE_SIGACTION
|
/macosx-10.9.5/Heimdal-323.92.1/lib/hcrypto/ |
H A D | rand-timer.c | 58 #ifndef HAVE_SIGACTION 80 #ifdef HAVE_SIGACTION
|
/macosx-10.9.5/Heimdal-323.92.1/kcm/ |
H A D | main.c | 85 #ifdef HAVE_SIGACTION
|
/macosx-10.9.5/curl-78.94.1/curl/lib/ |
H A D | config-mac.h | 68 #define HAVE_SIGACTION 1 macro
|
H A D | config-dos.h | 161 #define HAVE_SIGACTION 1 macro
|
H A D | config-tpf.h | 416 #define HAVE_SIGACTION 1 macro
|
/macosx-10.9.5/ntp-88/libntp/ |
H A D | iosignal.c | 49 # if defined(HAVE_SIGACTION) 318 # if defined(HAVE_SIGACTION) 326 # if defined(HAVE_SIGACTION) 338 # ifdef HAVE_SIGACTION 477 # else /* !HAVE_SIGACTION */ 554 # endif /* HAVE_SIGACTION */
|
H A D | syssignal.c | 12 #ifdef HAVE_SIGACTION
|
/macosx-10.9.5/passwordserver_sasl-170/cyrus_sasl/mac/libdes/src/ |
H A D | rnd_keys.c | 185 /*
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska H�gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the Kungliga Tekniska
* H�gskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
RCSID("$Id: rnd_keys.c,v 1.4 2005/01/10 19:09:07 snsimon Exp $");
#endif
#include <des.h>
#include <des_locl.h>
#ifdef KRB5
#include <krb5-types.h>
#elif defined(KRB4)
#include <ktypes.h>
#endif
#include <string.h>
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#elif defined(HAVE_SYS_TIME_H)
#include <sys/time.h>
#else
#include <time.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_IO_H
#include <io.h>
#endif
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
/*
* Generate "random" data by checksumming a file.
*
* Returns -1 if there were any problems with permissions or I/O
* errors.
*/
static
int
sumFile (const char *name, int len, void *res)
{
u_int32_t sum[2];
u_int32_t buf[1024*2];
int fd, i;
fd = open (name, 0);
if (fd < 0)
return -1;
while (len > 0)
{
int n = read(fd, buf, sizeof(buf));
if (n < 0)
{
close(fd);
return n;
}
for (i = 0; i < (n/sizeof(buf[0])); i++)
{
sum[0] += buf[i];
i++;
sum[1] += buf[i];
}
len -= n;
}
close (fd);
memcpy (res, &sum, sizeof(sum));
return 0;
}
#if 0
static
int
md5sumFile (const char *name, int len, int32_t sum[4])
{
int32_t buf[1024*2];
int fd, cnt;
struct md5 md5;
fd = open (name, 0);
if (fd < 0)
return -1;
md5_init(&md5);
while (len > 0)
{
int n = read(fd, buf, sizeof(buf));
if (n < 0)
{
close(fd);
return n;
}
md5_update(&md5, buf, n);
len -= n;
}
md5_finito(&md5, (unsigned char *)sum);
close (fd);
return 0;
}
#endif
/*
* Create a sequence of random 64 bit blocks.
* The sequence is indexed with a long long and
* based on an initial des key used as a seed.
*/
static des_key_schedule sequence_seed;
static u_int32_t sequence_index[2];
/*
* Random number generator based on ideas from truerand in cryptolib
* as described on page 424 in Applied Cryptography 2 ed. by Bruce
* Schneier.
*/
static volatile int counter;
static volatile unsigned char *gdata; /* Global data */
static volatile int igdata; /* Index into global data */
static int gsize;
#if !defined(WIN32) && !defined(__EMX__) && !defined(__OS2__) && !defined(__CYGWIN32__)
/* Visual C++ 4.0 (Windows95/NT) */
static
RETSIGTYPE
sigALRM(int sig)
{
if (igdata < gsize)
gdata[igdata++] ^= counter & 0xff;
#ifndef HAVE_SIGACTION
signal(SIGALRM, sigALRM); /* Reinstall SysV signal handler */
#endif
SIGRETURN(0);
}
#endif
#if !defined(HAVE_RANDOM) && defined(HAVE_RAND)
#ifndef srandom
#define srandom srand
#endif
#ifndef random
#define random rand
#endif
#endif
static void
des_not_rand_data(unsigned char *data, int size)
{
int i;
srandom (time (NULL));
for(i = 0; i < size; ++i)
data[i] ^= random() % 0x100;
}
#if !defined(WIN32) && !defined(__EMX__) && !defined(__OS2__) && !defined(__CYGWIN32__)
#ifndef HAVE_SETITIMER
static void
pacemaker(struct timeval *tv)
{
fd_set fds;
pid_t pid;
pid = getppid();
while(1){
FD_ZERO(&fds);
FD_SET(0, &fds);
select(1, &fds, NULL, NULL, tv);
kill(pid, SIGALRM);
}
}
#endif
/*
* Generate size bytes of "random" data using timed interrupts.
* It takes about 40ms/byte random data.
* It's not neccessary to be root to run it.
*/
void
des_rand_data(unsigned char *data, int size)
{
struct itimerval tv, otv;
#ifdef HAVE_SIGACTION
struct sigaction sa, osa;
#else
RETSIGTYPE (*osa)(int);
#endif
int i, j;
#ifndef HAVE_SETITIMER
pid_t pid;
#endif
char *rnd_devices[] = {"/dev/random",
"/dev/srandom",
"/dev/urandom",
NULL};
char **p;
for(p = rnd_devices; *p; p++) {
int fd = open(*p, O_RDONLY | O_NDELAY);
if(fd >= 0 && read(fd, data, size) == size) {
close(fd);
return;
}
close(fd);
}
/* Paranoia? Initialize data from /dev/mem if we can read it. */
if (size >= 8)
sumFile("/dev/mem", (1024*1024*2), data);
gdata = data;
gsize = size;
igdata = 0;
#ifdef HAVE_SIGACTION
/* Setup signal handler */
sa.sa_handler = sigALRM;
sa.sa_flags = 0;
sigemptyset(&sa.sa_mask);
sigaction(SIGALRM, &sa, &osa);
#else
osa = signal(SIGALRM, sigALRM);
#endif
/* Start timer */
tv.it_value.tv_sec = 0;
tv.it_value.tv_usec = 10 * 1000; /* 10 ms */
tv.it_interval = tv.it_value;
#ifdef HAVE_SETITIMER
setitimer(ITIMER_REAL, &tv, &otv);
#else
pid = fork();
if(pid == -1){
des_not_rand_data(data, size);
return;
}
if(pid == 0)
pacemaker(&tv.it_interval);
#endif
for(i = 0; i < 4; i++) {
for (igdata = 0; igdata < size;) /* igdata++ in sigALRM */
counter++;
for (j = 0; j < size; j++) /* Only use 2 bits each lap */
gdata[j] = (gdata[j]>>2) | (gdata[j]<<6);
}
#ifdef HAVE_SETITIMER
setitimer(ITIMER_REAL, &otv, 0);
#else
kill(pid, SIGKILL);
waitpid(pid, NULL, 0);
#endif
#ifdef HAVE_SIGACTION
sigaction(SIGALRM, &osa, 0);
#else
signal(SIGALRM, osa != SIG_ERR ? osa : SIG_DFL);
#endif (…)
|
/macosx-10.9.5/vim-53/src/auto/ |
H A D | config.h | 195 #define HAVE_SIGACTION 1 macro
|
/macosx-10.9.5/gnudiff-19/diffutils/ |
H A D | config.h | 252 #define HAVE_SIGACTION 1 macro
|
/macosx-10.9.5/libarchive-29/ |
H A D | config.h | 400 #define HAVE_SIGACTION 1 macro
|
/macosx-10.9.5/ncurses-42/ncurses/include/ |
H A D | ncurses_cfg.h | 143 #define HAVE_SIGACTION 1 macro
|