mirror of
https://github.com/bstansell/conserver.git
synced 2025-02-02 08:47:57 +00:00
Merge pull request #25 from sthen/master
support SO_PEERCRED as well as ucred
This commit is contained in:
commit
2561311abb
34
configure.ac
34
configure.ac
@ -416,14 +416,14 @@ AC_ARG_WITH(uds,
|
|||||||
AC_TRY_COMPILE([#include <sys/types.h>
|
AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
#include <sys/socket.h>],
|
#include <sys/socket.h>],
|
||||||
[
|
[
|
||||||
struct ucred u;
|
struct sockpeercred u;
|
||||||
u.uid = 0;
|
u.uid = 0;
|
||||||
#if !defined(SO_PEERCRED)
|
#if !defined(SO_PEERCRED)
|
||||||
#error "no SO_PEERCRED defined"
|
#error "no SO_PEERCRED defined"
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[AC_MSG_RESULT(yes)
|
[AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(UDS_CRED_STYPE, ucred, [Defined to UDS credential structure name])
|
AC_DEFINE(UDS_CRED_STYPE, sockpeercred, [Defined to UDS credential structure name])
|
||||||
AC_DEFINE(UDS_CRED_UID, uid, [Defined to UDS credential structure uid field])
|
AC_DEFINE(UDS_CRED_UID, uid, [Defined to UDS credential structure uid field])
|
||||||
AC_DEFINE(UDS_CRED_SO, SO_PEERCRED, [Defined to UDS credential socket option])
|
AC_DEFINE(UDS_CRED_SO, SO_PEERCRED, [Defined to UDS credential socket option])
|
||||||
AC_DEFINE(TRUST_UDS_CRED)],
|
AC_DEFINE(TRUST_UDS_CRED)],
|
||||||
@ -431,18 +431,34 @@ u.uid = 0;
|
|||||||
AC_TRY_COMPILE([#include <sys/types.h>
|
AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
#include <sys/socket.h>],
|
#include <sys/socket.h>],
|
||||||
[
|
[
|
||||||
|
struct ucred u;
|
||||||
|
u.euid = 0;
|
||||||
|
#if !defined(SO_PEERCRED)
|
||||||
|
#error "no SO_PEERCRED defined"
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(UDS_CRED_STYPE, ucred, [Defined to UDS credential structure name])
|
||||||
|
AC_DEFINE(UDS_CRED_UID, uid, [Defined to UDS credential structure uid field])
|
||||||
|
AC_DEFINE(UDS_CRED_SO, SO_PEERCRED, [Defined to UDS credential socket option])
|
||||||
|
AC_DEFINE(TRUST_UDS_CRED)],
|
||||||
|
[
|
||||||
|
AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>],
|
||||||
|
[
|
||||||
struct peercred_struct u;
|
struct peercred_struct u;
|
||||||
u.euid = 0;
|
u.euid = 0;
|
||||||
#if !defined(SO_PEERID)
|
#if !defined(SO_PEERID)
|
||||||
#error "no SO_PEERID defined"
|
#error "no SO_PEERID defined"
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[AC_MSG_RESULT(yes)
|
[AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(UDS_CRED_STYPE, peercred_struct, [Defined to UDS credential structure name])
|
AC_DEFINE(UDS_CRED_STYPE, peercred_struct, [Defined to UDS credential structure name])
|
||||||
AC_DEFINE(UDS_CRED_UID, euid, [Defined to UDS credential structure uid field])
|
AC_DEFINE(UDS_CRED_UID, euid, [Defined to UDS credential structure uid field])
|
||||||
AC_DEFINE(UDS_CRED_SO, SO_PEERID, [Defined to UDS credential socket option])
|
AC_DEFINE(UDS_CRED_SO, SO_PEERID, [Defined to UDS credential socket option])
|
||||||
AC_DEFINE(TRUST_UDS_CRED)],
|
AC_DEFINE(TRUST_UDS_CRED)],
|
||||||
[AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(no)]),
|
||||||
|
])
|
||||||
])
|
])
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user