2005-07-11 05:16:55 +04:00
/*
2008-10-27 13:35:07 +03:00
* Copyright ( c ) 1995 - 2005 Kungliga Tekniska Högskolan
2005-07-11 05:16:55 +04:00
* ( Royal Institute of Technology , Stockholm , Sweden ) .
* All rights reserved .
2008-10-27 13:35:07 +03:00
*
2005-07-11 05:16:55 +04:00
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
2008-10-27 13:35:07 +03:00
*
2005-07-11 05:16:55 +04:00
* 1. Redistributions of source code must retain the above copyright
* notice , this list of conditions and the following disclaimer .
2008-10-27 13:35:07 +03:00
*
2005-07-11 05:16:55 +04:00
* 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 .
2008-10-27 13:35:07 +03:00
*
2005-07-11 05:16:55 +04:00
* 3. 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 .
2008-10-27 13:35:07 +03:00
*
2005-07-11 05:16:55 +04:00
* 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 .
*/
2008-08-26 21:35:52 +04:00
/* $Id$ */
2005-07-11 05:16:55 +04:00
# ifndef __ROKEN_COMMON_H__
# define __ROKEN_COMMON_H__
# ifndef ROKEN_LIB_FUNCTION
# ifdef _WIN32
2010-01-12 10:16:45 +03:00
# define ROKEN_LIB_FUNCTION
# define ROKEN_LIB_CALL __cdecl
2005-07-11 05:16:55 +04:00
# else
# define ROKEN_LIB_FUNCTION
2010-01-12 10:16:45 +03:00
# define ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
# endif
# endif
# ifdef __cplusplus
# define ROKEN_CPP_START extern "C" {
# define ROKEN_CPP_END }
# else
# define ROKEN_CPP_START
# define ROKEN_CPP_END
# endif
# ifndef INADDR_NONE
# define INADDR_NONE 0xffffffff
# endif
# ifndef INADDR_LOOPBACK
# define INADDR_LOOPBACK 0x7f000001
# endif
# ifndef SOMAXCONN
# define SOMAXCONN 5
# endif
# ifndef STDIN_FILENO
# define STDIN_FILENO 0
# endif
# ifndef STDOUT_FILENO
# define STDOUT_FILENO 1
# endif
# ifndef STDERR_FILENO
# define STDERR_FILENO 2
# endif
# ifndef max
# define max(a,b) (((a)>(b))?(a):(b))
# endif
# ifndef min
# define min(a,b) (((a)<(b))?(a):(b))
# endif
# ifndef TRUE
# define TRUE 1
# endif
# ifndef FALSE
# define FALSE 0
# endif
# ifndef LOG_DAEMON
# define openlog(id,option,facility) openlog((id),(option))
# define LOG_DAEMON 0
# endif
# ifndef LOG_ODELAY
# define LOG_ODELAY 0
# endif
# ifndef LOG_NDELAY
# define LOG_NDELAY 0x08
# endif
# ifndef LOG_CONS
# define LOG_CONS 0
# endif
# ifndef LOG_AUTH
# define LOG_AUTH 0
# endif
# ifndef LOG_AUTHPRIV
# define LOG_AUTHPRIV LOG_AUTH
# endif
# ifndef F_OK
# define F_OK 0
# endif
# ifndef O_ACCMODE
# define O_ACCMODE 003
# endif
2010-01-12 10:16:45 +03:00
# ifndef _WIN32
2005-07-11 05:16:55 +04:00
# ifndef _PATH_DEV
# define _PATH_DEV " / dev / "
# endif
# ifndef _PATH_DEVNULL
# define _PATH_DEVNULL " / dev / null"
# endif
# ifndef _PATH_HEQUIV
# define _PATH_HEQUIV " / etc / hosts.equiv"
# endif
# ifndef _PATH_VARRUN
# define _PATH_VARRUN " / var / run / "
# endif
# ifndef _PATH_BSHELL
# define _PATH_BSHELL " / bin / sh"
# endif
# ifndef MAXPATHLEN
# define MAXPATHLEN (1024+4)
# endif
2011-01-31 07:59:06 +03:00
# endif /* !_WIN32 */
2010-12-11 01:39:34 +03:00
2010-01-12 10:16:45 +03:00
# ifndef PATH_MAX
# define PATH_MAX MAX_PATH
# endif
# ifndef RETSIGTYPE
# define RETSIGTYPE void
# endif
2005-07-11 05:16:55 +04:00
# ifndef SIG_ERR
# define SIG_ERR ((RETSIGTYPE (*)(int))-1)
# endif
/*
* error code for getipnodeby { name , addr }
*/
# ifndef HOST_NOT_FOUND
# define HOST_NOT_FOUND 1
# endif
# ifndef TRY_AGAIN
# define TRY_AGAIN 2
# endif
# ifndef NO_RECOVERY
# define NO_RECOVERY 3
# endif
# ifndef NO_DATA
# define NO_DATA 4
# endif
# ifndef NO_ADDRESS
# define NO_ADDRESS NO_DATA
# endif
/*
* error code for getaddrinfo
*/
# ifndef EAI_NOERROR
# define EAI_NOERROR 0 /* no error */
# endif
# ifndef EAI_NONAME
# define EAI_ADDRFAMILY 1 /* address family for nodename not supported */
# define EAI_AGAIN 2 /* temporary failure in name resolution */
# define EAI_BADFLAGS 3 /* invalid value for ai_flags */
# define EAI_FAIL 4 /* non-recoverable failure in name resolution */
# define EAI_FAMILY 5 /* ai_family not supported */
# define EAI_MEMORY 6 /* memory allocation failure */
# define EAI_NODATA 7 /* no address associated with nodename */
# define EAI_NONAME 8 /* nodename nor servname provided, or not known */
# define EAI_SERVICE 9 /* servname not supported for ai_socktype */
# define EAI_SOCKTYPE 10 /* ai_socktype not supported */
# define EAI_SYSTEM 11 /* system error returned in errno */
# endif /* EAI_NONAME */
/* flags for getaddrinfo() */
# ifndef AI_PASSIVE
# define AI_PASSIVE 0x01
# define AI_CANONNAME 0x02
# endif /* AI_PASSIVE */
# ifndef AI_NUMERICHOST
# define AI_NUMERICHOST 0x04
# endif
2010-11-29 03:24:08 +03:00
# ifndef AI_NUMERICSERV
# define AI_NUMERICSERV 0x08
# endif
2005-07-11 05:16:55 +04:00
/* flags for getnameinfo() */
# ifndef NI_DGRAM
# define NI_DGRAM 0x01
# define NI_NAMEREQD 0x02
# define NI_NOFQDN 0x04
# define NI_NUMERICHOST 0x08
# define NI_NUMERICSERV 0x10
# endif
/*
* constants for getnameinfo
*/
# ifndef NI_MAXHOST
# define NI_MAXHOST 1025
# define NI_MAXSERV 32
# endif
/*
* constants for inet_ntop
*/
# ifndef INET_ADDRSTRLEN
# define INET_ADDRSTRLEN 16
# endif
# ifndef INET6_ADDRSTRLEN
# define INET6_ADDRSTRLEN 46
# endif
/*
* for shutdown ( 2 )
*/
# ifndef SHUT_RD
# define SHUT_RD 0
# endif
# ifndef SHUT_WR
# define SHUT_WR 1
# endif
# ifndef SHUT_RDWR
# define SHUT_RDWR 2
# endif
# ifndef HAVE___ATTRIBUTE__
# define __attribute__(x)
# endif
ROKEN_CPP_START
# ifndef IRIX4 /* fix for compiler bug */
2010-01-12 10:16:45 +03:00
# ifndef _WIN32
2005-07-11 05:16:55 +04:00
# ifdef RETSIGTYPE
typedef RETSIGTYPE ( * SigAction ) ( int ) ;
SigAction signal ( int iSig , SigAction pAction ) ; /* BSD compatible */
# endif
# endif
2010-01-12 10:16:45 +03:00
# endif
# define SE_E_UNSPECIFIED (-1)
# define SE_E_FORKFAILED (-2)
# define SE_E_WAITPIDFAILED (-3)
# define SE_E_EXECTIMEOUT (-4)
# define SE_E_NOEXEC 126
# define SE_E_NOTFOUND 127
# define SE_PROCSTATUS(st) (((st) >= 0 && (st) < 126)? st: -1)
# define SE_PROCSIGNAL(st) (((st) >= 128)? (st) - 128: -1)
# define SE_IS_ERROR(st) ((st) < 0 || (st) >= 126)
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define simple_execve rk_simple_execve
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
simple_execve ( const char * , char * const [ ] , char * const [ ] ) ;
2009-06-08 13:06:16 +04:00
# define simple_execve_timed rk_simple_execve_timed
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2008-10-27 13:35:07 +03:00
simple_execve_timed ( const char * , char * const [ ] ,
char * const [ ] , time_t ( * ) ( void * ) ,
2005-07-11 05:16:55 +04:00
void * , time_t ) ;
2009-06-08 13:06:16 +04:00
# define simple_execvp rk_simple_execvp
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
simple_execvp ( const char * , char * const [ ] ) ;
2009-06-08 13:06:16 +04:00
# define simple_execvp_timed rk_simple_execvp_timed
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2008-10-27 13:35:07 +03:00
simple_execvp_timed ( const char * , char * const [ ] ,
2005-07-11 05:16:55 +04:00
time_t ( * ) ( void * ) , void * , time_t ) ;
2009-06-08 13:06:16 +04:00
# define simple_execlp rk_simple_execlp
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
simple_execlp ( const char * , . . . ) ;
2009-06-08 13:06:16 +04:00
# define simple_execle rk_simple_execle
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
simple_execle ( const char * , . . . ) ;
2009-06-08 13:06:16 +04:00
# define wait_for_process rk_wait_for_process
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
wait_for_process ( pid_t ) ;
2009-06-08 13:06:16 +04:00
# define wait_for_process_timed rk_wait_for_process_timed
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2008-10-27 13:35:07 +03:00
wait_for_process_timed ( pid_t , time_t ( * ) ( void * ) ,
2010-01-12 10:16:45 +03:00
void * , time_t ) ;
2009-06-08 13:06:16 +04:00
# define pipe_execv rk_pipe_execv
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
pipe_execv ( FILE * * , FILE * * , FILE * * , const char * , . . . ) ;
2009-06-08 13:06:16 +04:00
# define print_version rk_print_version
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
print_version ( const char * ) ;
2009-06-08 13:06:16 +04:00
# define eread rk_eread
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
eread ( int fd , void * buf , size_t nbytes ) ;
2009-06-08 13:06:16 +04:00
# define ewrite rk_ewrite
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
ewrite ( int fd , const void * buf , size_t nbytes ) ;
struct hostent ;
2009-06-08 13:06:16 +04:00
# define hostent_find_fqdn rk_hostent_find_fqdn
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
hostent_find_fqdn ( const struct hostent * ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define esetenv rk_esetenv
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
esetenv ( const char * , const char * , int ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_set_address_and_port rk_socket_set_address_and_port
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
socket_set_address_and_port ( struct sockaddr * , const void * , int ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_addr_size rk_socket_addr_size
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
socket_addr_size ( const struct sockaddr * ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_set_any rk_socket_set_any
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
socket_set_any ( struct sockaddr * , int ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_sockaddr_size rk_socket_sockaddr_size
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
socket_sockaddr_size ( const struct sockaddr * ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_get_address rk_socket_get_address
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
2009-06-08 13:06:16 +04:00
socket_get_address ( const struct sockaddr * ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_get_port rk_socket_get_port
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
socket_get_port ( const struct sockaddr * ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_set_port rk_socket_set_port
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
socket_set_port ( struct sockaddr * , int ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_set_portrange rk_socket_set_portrange
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
socket_set_portrange ( rk_socket_t , int , int ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_set_debug rk_socket_set_debug
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
socket_set_debug ( rk_socket_t ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_set_tos rk_socket_set_tos
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
socket_set_tos ( rk_socket_t , int ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define socket_set_reuseaddr rk_socket_set_reuseaddr
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
socket_set_reuseaddr ( rk_socket_t , int ) ;
r10066: This is the second in my patches to work on Samba4's kerberos support,
with an aim to make the code simpiler and more correct.
Gone is the old (since the very early Samba 3.0 krb5 days) 'iterate over
all keytypes)' code in gensec_krb5, we now follow the approach used in
gensec_gssapi, and use a keytab.
I have also done a lot of work in the GSSAPI code, to try and reduce
the diff between us and upstream heimdal. It was becoming hard to
track patches in this code, and I also want this patch (the DCE_STYLE
support) to be in a 'manageable' state for when lha considers it for
merging. (metze assures me it still has memory leak problems, but
I've started to address some of that).
This patch also includes a simple update of other code to current
heimdal, as well as changes we need for better PAC verification.
On the PAC side of things we now match windows member servers by
checking the name and authtime on an incoming PAC. Not generating these
right was the cause of the PAC pain, and so now both the main code and
torture test validate this behaviour.
One thing doesn't work with this patch:
- the sealing of RPC pipes with kerberos, Samba -> Samba seems
broken. I'm pretty sure this is related to AES, and the need to break
apart the gss_wrap interface.
Andrew Bartlett
(This used to be commit a3aba57c00a9c5318f4706db55d03f64e8bea60c)
2005-09-08 01:52:50 +04:00
2009-06-08 13:06:16 +04:00
# define socket_set_ipv6only rk_socket_set_ipv6only
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
socket_set_ipv6only ( rk_socket_t , int ) ;
# define socket_to_fd rk_socket_to_fd
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
socket_to_fd ( rk_socket_t , int ) ;
2005-07-11 05:16:55 +04:00
2009-06-08 13:06:16 +04:00
# define vstrcollect rk_vstrcollect
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION char * * ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
vstrcollect ( va_list * ap ) ;
2009-06-08 13:06:16 +04:00
# define strcollect rk_strcollect
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION char * * ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
strcollect ( char * first , . . . ) ;
2009-06-08 13:06:16 +04:00
# define timevalfix rk_timevalfix
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
timevalfix ( struct timeval * t1 ) ;
2009-06-08 13:06:16 +04:00
# define timevaladd rk_timevaladd
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
timevaladd ( struct timeval * t1 , const struct timeval * t2 ) ;
2009-06-08 13:06:16 +04:00
# define timevalsub rk_timevalsub
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
timevalsub ( struct timeval * t1 , const struct timeval * t2 ) ;
2009-06-08 13:06:16 +04:00
# define pid_file_write rk_pid_file_write
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
pid_file_write ( const char * progname ) ;
2009-06-08 13:06:16 +04:00
# define pid_file_delete rk_pid_file_delete
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
pid_file_delete ( char * * ) ;
2009-06-08 13:06:16 +04:00
# define read_environment rk_read_environment
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
read_environment ( const char * file , char * * * env ) ;
2009-06-08 13:06:16 +04:00
# define free_environment rk_free_environment
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2007-06-13 09:44:24 +04:00
free_environment ( char * * ) ;
2009-06-08 13:06:16 +04:00
# define warnerr rk_warnerr
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2009-06-08 13:06:16 +04:00
rk_warnerr ( int doerrno , const char * fmt , va_list ap )
2005-07-11 05:16:55 +04:00
__attribute__ ( ( format ( printf , 2 , 0 ) ) ) ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
rk_realloc ( void * , size_t ) ;
struct rk_strpool ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
rk_strpoolcollect ( struct rk_strpool * ) ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION struct rk_strpool * ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
rk_strpoolprintf ( struct rk_strpool * , const char * , . . . )
__attribute__ ( ( format ( printf , 2 , 3 ) ) ) ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2005-07-11 05:16:55 +04:00
rk_strpoolfree ( struct rk_strpool * ) ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2005-10-25 17:43:37 +04:00
rk_dumpdata ( const char * , const void * , size_t ) ;
2005-07-11 05:16:55 +04:00
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2008-08-01 09:08:51 +04:00
rk_undumpdata ( const char * , void * * , size_t * ) ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2008-08-01 09:08:51 +04:00
rk_xfree ( void * ) ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2008-08-01 09:08:51 +04:00
rk_cloexec ( int ) ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
2008-08-01 09:08:51 +04:00
rk_cloexec_file ( FILE * ) ;
2010-01-12 10:16:45 +03:00
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
rk_cloexec_dir ( DIR * ) ;
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
2009-09-21 10:18:34 +04:00
ct_memcmp ( const void * , const void * , size_t ) ;
2008-08-01 09:08:51 +04:00
2010-11-29 03:24:08 +03:00
void ROKEN_LIB_FUNCTION
rk_random_init ( void ) ;
2005-07-11 05:16:55 +04:00
ROKEN_CPP_END
# endif /* __ROKEN_COMMON_H__ */