s4-auth: fixed crash in krb5 auth
[kai/samba.git] / source4 / heimdal_build / roken.h
1 /*
2   a wrapper to override some of the defines that the heimdal roken system looks at
3  */
4 #ifndef _ROKEN_H_
5 #define _ROKEN_H_
6
7 /* Support 'weak' keys for now, it can't be worse than NTLM and we don't want to hard-code the behaviour at this point */
8 #define HEIM_WEAK_CRYPTO 1
9
10 /* path to sysconf - should we force this to samba LIBDIR ? */
11 #define SYSCONFDIR "/etc"
12
13 #define rk_PATH_DELIM '/'
14
15 #define HEIMDAL_LOCALEDIR "/usr/heimdal/locale"
16
17 /* Maximum values on all known systems */
18 #define MaxHostNameLen (64+4)
19 #define MaxPathLen (1024+4)
20
21 /* We want PKINIT */
22 #define PKINIT 1
23
24 #define ROKEN_LIB_FUNCTION
25 #define ROKEN_LIB_CALL
26 #define GETHOSTBYADDR_PROTO_COMPATIBLE
27 #define GETSERVBYNAME_PROTO_COMPATIBLE
28 #define OPENLOG_PROTO_COMPATIBLE
29 #define GETSOCKNAME_PROTO_COMPATIBLE
30
31 /* even if we do have dlopen, we don't want heimdal using it */
32 #undef HAVE_DLOPEN
33
34 /* we need to tell roken about the functions that Samba replaces in lib/replace */
35 #ifndef HAVE_SETEUID
36 #define HAVE_SETEUID 1
37 #endif
38
39 #ifndef HAVE_STRNLEN
40 #define HAVE_STRNLEN
41 #endif
42
43 #ifndef HAVE_STRNDUP
44 #define HAVE_STRNDUP
45 #endif
46
47 #ifndef HAVE_STRLCPY
48 #define HAVE_STRLCPY
49 #endif
50
51 #ifndef HAVE_STRLCAT
52 #define HAVE_STRLCAT
53 #endif
54
55 #ifndef HAVE_STRCASECMP
56 #define HAVE_STRCASECMP
57 #endif
58
59 #ifndef HAVE_ASPRINTF
60 #define HAVE_ASPRINTF
61 #endif
62
63 #ifndef HAVE_VASPRINTF
64 #define HAVE_VASPRINTF
65 #endif
66
67 #ifndef HAVE_MKSTEMP
68 #define HAVE_MKSTEMP
69 #endif
70
71 #ifndef HAVE_SETENV
72 #define HAVE_SETENV
73 #endif
74
75 #ifndef HAVE_UNSETENV
76 #define HAVE_UNSETENV
77 #endif
78
79 #ifndef HAVE_VSYSLOG
80 #define HAVE_VSYSLOG
81 #endif
82
83 #ifndef HAVE_SSIZE_T
84 #define HAVE_SSIZE_T
85 #endif
86
87 #ifndef HAVE_STRPTIME
88 #define HAVE_STRPTIME
89 #endif
90
91 #ifndef HAVE_TIMEGM
92 #define HAVE_TIMEGM
93 #endif
94
95 #ifndef HAVE_INNETGR
96 #define HAVE_INNETGR
97 #endif
98
99 #ifndef HAVE_INET_ATON
100 #define HAVE_INET_ATON
101 #endif
102
103 #ifndef HAVE_INET_NTOP
104 #define HAVE_INET_NTOP
105 #endif
106
107 #ifndef HAVE_INET_PTON
108 #define HAVE_INET_PTON
109 #endif
110
111 #ifndef HAVE_GETTIMEOFDAY
112 #define HAVE_GETTIMEOFDAY
113 #endif
114
115 #ifndef HAVE_SETEGID
116 #define HAVE_SETEGID
117 #endif
118
119 #ifndef HAVE_SETEUID
120 #define HAVE_SETEUID
121 #endif
122
123 /* force the use of the libreplace strerror_r */
124 #ifndef HAVE_STRERROR_R
125 #define HAVE_STRERROR_R
126 #endif
127 #ifndef STRERROR_R_PROTO_COMPATIBLE
128 #define STRERROR_R_PROTO_COMPATIBLE
129 #endif
130
131 #ifndef HAVE_DIRFD
132 #ifdef HAVE_DIR_DD_FD
133 #define dirfd(x) ((x)->dd_fd)
134 #else
135 #define dirfd(d) (-1)
136 #endif
137 #define HAVE_DIRFD 1
138 #endif
139
140
141 /* we lie about having pidfile() so that NetBSD5 can compile. Nothing
142    in the parts of heimdal we use actually uses pidfile(), and we
143    don't use it in Samba, so this works, although its ugly */
144 #ifndef HAVE_PIDFILE
145 #define HAVE_PIDFILE
146 #endif
147
148 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
149 #ifndef HAVE___ATTRIBUTE__
150 #define HAVE___ATTRIBUTE__
151 #endif
152 #endif
153
154 #include "system/network.h"
155
156 /*
157  * we don't want that roken.h.in includes socket_wrapper
158  * we include socket_wrapper via "system/network.h"
159  */
160 #undef SOCKET_WRAPPER_REPLACE
161 #include "heimdal/lib/roken/roken.h.in"
162
163 extern const char *heimdal_version;
164 extern const char *heimdal_long_version;
165
166 /* we do not want any __APPLE__ magic */
167 #ifdef __APPLE__
168 #undef __APPLE__
169 #endif
170
171 #endif