]> andersk Git - openssh.git/blame - includes.h
- (dtucker) [uidswap.c] Don't test dropping of gids for the root user or
[openssh.git] / includes.h
CommitLineData
5e96b616 1/* $OpenBSD: includes.h,v 1.18 2004/06/13 15:03:02 djm Exp $ */
23c2a7a5 2
8efc0c15 3/*
5260325f 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
5260325f 5 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6 * All rights reserved
5260325f 7 * This file includes most of the needed system headers.
6ae2364d 8 *
bcbf86ec 9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
5260325f 14 */
8efc0c15 15
16#ifndef INCLUDES_H
17#define INCLUDES_H
18
19#define RCSID(msg) \
20static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
21
793edc37 22#include "config.h"
23
8efc0c15 24#include <stdio.h>
25#include <ctype.h>
26#include <errno.h>
7b0737a4 27#include <fcntl.h> /* For O_NONBLOCK */
8efc0c15 28#include <signal.h>
8efc0c15 29#include <stdlib.h>
30#include <string.h>
31#include <stdarg.h>
32#include <pwd.h>
33#include <grp.h>
8efc0c15 34#include <time.h>
8efc0c15 35#include <dirent.h>
5e96b616 36#include <stddef.h>
2f125ca1 37
6f68f28a 38#ifdef HAVE_LIMITS_H
7b0737a4 39# include <limits.h> /* For PATH_MAX */
6f68f28a 40#endif
2f125ca1 41#ifdef HAVE_GETOPT_H
6f68f28a 42# include <getopt.h>
3c62e7eb 43#endif
d94aa2ae 44#ifdef HAVE_BSTRING_H
45# include <bstring.h>
2b87da3b 46#endif
40849fdb 47#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
48 defined(GLOB_HAS_GL_MATCHC)
84ceda19 49# include <glob.h>
50#endif
c75a1a66 51#ifdef HAVE_NETGROUP_H
52# include <netgroup.h>
2b87da3b 53#endif
4cca272e 54#ifdef HAVE_ENDIAN_H
55# include <endian.h>
56#endif
7b0737a4 57#ifdef HAVE_TTYENT_H
58# include <ttyent.h>
59#endif
60#ifdef HAVE_UTIME_H
61# include <utime.h>
62#endif
63#ifdef HAVE_MAILLOCK_H
64# include <maillock.h> /* For _PATH_MAILDIR */
65#endif
66#ifdef HAVE_NEXT
67# include <libc.h>
68#endif
688eed4a 69#define __USE_GNU /* before unistd.h, activate extra prototypes for glibc */
7b0737a4 70#include <unistd.h> /* For STDIN_FILENO, etc */
71#include <termios.h> /* Struct winsize */
72
73/*
74 *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
75 */
76#ifdef HAVE_STRINGS_H
77# include <strings.h>
78#endif
79#ifdef HAVE_LOGIN_H
80# include <login.h>
81#endif
82
83#ifdef HAVE_UTMP_H
84# include <utmp.h>
85#endif
86#ifdef HAVE_UTMPX_H
87# ifdef HAVE_TV_IN_UTMPX
88# include <sys/time.h>
89# endif
90# include <utmpx.h>
91#endif
92#ifdef HAVE_LASTLOG_H
93# include <lastlog.h>
94#endif
95#ifdef HAVE_PATHS_H
96# include <paths.h> /* For _PATH_XXX */
793edc37 97#endif
7b0737a4 98
99#include <sys/types.h>
100#include <sys/socket.h>
101#include <sys/ioctl.h>
102#include <sys/wait.h>
b09a984b 103#ifdef HAVE_SYS_TIME_H
7b0737a4 104# include <sys/time.h> /* For timersub */
105#endif
106#include <sys/resource.h>
107#ifdef HAVE_SYS_SELECT_H
108# include <sys/select.h>
b09a984b 109#endif
a7effaac 110#ifdef HAVE_SYS_BSDTTY_H
111# include <sys/bsdtty.h>
112#endif
7b0737a4 113#include <sys/param.h> /* For MAXPATHLEN and roundup() */
114#ifdef HAVE_SYS_UN_H
115# include <sys/un.h> /* For sockaddr_un */
dbaa2e87 116#endif
5749e709 117#ifdef HAVE_STDINT_H
118# include <stdint.h>
119#endif
7b0737a4 120#ifdef HAVE_SYS_BITYPES_H
121# include <sys/bitypes.h> /* For u_intXX_t */
122#endif
123#ifdef HAVE_SYS_CDEFS_H
124# include <sys/cdefs.h> /* For __P() */
125#endif
126#ifdef HAVE_SYS_STAT_H
127# include <sys/stat.h> /* For S_* constants and macros */
beb43d31 128#endif
20af321f 129#ifdef HAVE_SYS_SYSMACROS_H
7b0737a4 130# include <sys/sysmacros.h> /* For MIN, MAX, etc */
20af321f 131#endif
7b0737a4 132#ifdef HAVE_SYS_MMAN_H
133#include <sys/mman.h> /* for MAP_ANONYMOUS */
134#endif
321735c7 135#ifdef HAVE_SYS_STRTIO_H
136#include <sys/strtio.h> /* for TIOCCBRK on HP-UX */
137#endif
9e833a9b 138#if defined(HAVE_SYS_PTMS_H) && defined(HAVE_DEV_PTMX)
51693efd 139# if defined(HAVE_SYS_STREAM_H)
140# include <sys/stream.h> /* reqd for queue_t on Solaris 2.5.1 */
141# endif
9e833a9b 142#include <sys/ptms.h> /* for grantpt() and friends */
143#endif
7b0737a4 144
145#include <netinet/in_systm.h> /* For typedefs */
146#include <netinet/in.h> /* For IPv6 macros */
147#include <netinet/ip.h> /* For IPTOS macros */
148#include <netinet/tcp.h>
149#include <arpa/inet.h>
9f59c5a3 150#if defined(HAVE_NETDB_H)
151# include <netdb.h>
152#endif
7b0737a4 153#ifdef HAVE_RPC_TYPES_H
154# include <rpc/types.h> /* For INADDR_LOOPBACK */
155#endif
156#ifdef USE_PAM
2511d104 157#if defined(HAVE_SECURITY_PAM_APPL_H)
7b0737a4 158# include <security/pam_appl.h>
2511d104 159#elif defined (HAVE_PAM_PAM_APPL_H)
160# include <pam/pam_appl.h>
161#endif
89c7e31c 162#endif
75817f90 163#ifdef HAVE_READPASSPHRASE_H
164# include <readpassphrase.h>
165#endif
7b0737a4 166
ef51930f 167#ifdef HAVE_IA_H
168# include <ia.h>
169#endif
170
171#ifdef HAVE_TMPDIR_H
172# include <tmpdir.h>
173#endif
174
cacd2e7a 175#ifdef HAVE_LIBUTIL_H
176# include <libutil.h> /* Openpty on FreeBSD at least */
177#endif
178
bcfcc5f9 179#if defined(KRB5) && defined(USE_AFS)
309af4e5 180# include <krb5.h>
181# include <kafs.h>
182#endif
183
c3a4ce90 184/*
185 * On HP-UX 11.11, shadow.h and prot.h provide conflicting declarations
186 * of getspnam when _INCLUDE__STDC__ is defined, so we unset it here.
187 */
188#ifdef __hpux
189# ifdef _INCLUDE__STDC__
190# undef _INCLUDE__STDC__
191# endif
192#endif
193
7b0737a4 194#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
195
196#include "defines.h"
197
4cca272e 198#include "version.h"
84ceda19 199#include "openbsd-compat/openbsd-compat.h"
7b0737a4 200#include "openbsd-compat/bsd-nextstep.h"
35484284 201
7b0737a4 202#include "entropy.h"
23aa1237 203
2f125ca1 204#endif /* INCLUDES_H */
This page took 0.708708 seconds and 5 git commands to generate.