Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
77d7de8d
Commit
77d7de8d
authored
Sep 11, 2020
by
Etienne Guesnet
Committed by
Daniel Black
Dec 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support of AIX for auth_socket plugin
parent
2f5d3724
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
plugin/auth_socket/CMakeLists.txt
plugin/auth_socket/CMakeLists.txt
+14
-0
plugin/auth_socket/auth_socket.c
plugin/auth_socket/auth_socket.c
+6
-0
No files found.
plugin/auth_socket/CMakeLists.txt
View file @
77d7de8d
...
...
@@ -83,6 +83,19 @@ IF (HAVE_GETPEERUCRED AND HAVE_GETPWUID_POSIX_FINAL)
SET
(
ok 1
)
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?
# C'mon, show your creativity, be different! ifdef's are fun, aren't they?
...
...
@@ -90,6 +103,7 @@ ENDIF()
ENDIF
()
ENDIF
()
ENDIF
()
ENDIF
()
IF
(
ok
)
MYSQL_ADD_PLUGIN
(
auth_socket auth_socket.c DEFAULT
)
...
...
plugin/auth_socket/auth_socket.c
View file @
77d7de8d
...
...
@@ -50,6 +50,12 @@
#elif defined HAVE_GETPEERUCRED
#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
#error impossible
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment