mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Support of AIX for auth_socket plugin
This commit is contained in:
parent
2f5d372444
commit
77d7de8d47
2 changed files with 20 additions and 0 deletions
|
@ -83,6 +83,19 @@ IF (HAVE_GETPEERUCRED AND HAVE_GETPWUID_POSIX_FINAL)
|
||||||
SET(ok 1)
|
SET(ok 1)
|
||||||
ELSE()
|
ELSE()
|
||||||
|
|
||||||
|
# AIX also!
|
||||||
|
CHECK_CXX_SOURCE_COMPILES(
|
||||||
|
"#include <sys/socket.h>
|
||||||
|
int main() {
|
||||||
|
struct peercred_struct cred;
|
||||||
|
getsockopt(0, SOL_SOCKET, SO_PEERID, &cred, 0);
|
||||||
|
}" HAVE_PEERCRED_STRUCT)
|
||||||
|
|
||||||
|
IF (HAVE_PEERCRED_STRUCT)
|
||||||
|
ADD_DEFINITIONS(-DHAVE_PEERCRED_STRUCT)
|
||||||
|
SET(ok 1)
|
||||||
|
ELSE()
|
||||||
|
|
||||||
# Who else? Anyone?
|
# Who else? Anyone?
|
||||||
# C'mon, show your creativity, be different! ifdef's are fun, aren't they?
|
# C'mon, show your creativity, be different! ifdef's are fun, aren't they?
|
||||||
|
|
||||||
|
@ -90,6 +103,7 @@ ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(ok)
|
IF(ok)
|
||||||
MYSQL_ADD_PLUGIN(auth_socket auth_socket.c DEFAULT)
|
MYSQL_ADD_PLUGIN(auth_socket auth_socket.c DEFAULT)
|
||||||
|
|
|
@ -50,6 +50,12 @@
|
||||||
#elif defined HAVE_GETPEERUCRED
|
#elif defined HAVE_GETPEERUCRED
|
||||||
#include <ucred.h>
|
#include <ucred.h>
|
||||||
|
|
||||||
|
#elif defined HAVE_PEERCRED_STRUCT
|
||||||
|
#define level SOL_SOCKET
|
||||||
|
#define SO_PEERCRED SO_PEERID
|
||||||
|
#define uid euid
|
||||||
|
#define ucred peercred_struct
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error impossible
|
#error impossible
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue