summaryrefslogtreecommitdiff
path: root/plugin/auth_pam
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-01-29 16:41:04 +0200
committerMonty <monty@mariadb.org>2020-01-29 23:23:55 +0200
commit4d61f1247a1b6a86570cb03d3450930a78d689b3 (patch)
treee7b98495425ae73591c8c1f3cf81793196aca3ea /plugin/auth_pam
parentcd2c0e013ccb5f9b009743dfd7188585a539d9b5 (diff)
downloadmariadb-git-4d61f1247a1b6a86570cb03d3450930a78d689b3.tar.gz
Fixed compiler warnings from gcc 7.4.1
- Fixed possible error in rocksdb/rdb_datadic.cc
Diffstat (limited to 'plugin/auth_pam')
-rw-r--r--plugin/auth_pam/auth_pam_tool.c6
-rw-r--r--plugin/auth_pam/testing/pam_mariadb_mtr.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/plugin/auth_pam/auth_pam_tool.c b/plugin/auth_pam/auth_pam_tool.c
index 624b6880933..225f35a6624 100644
--- a/plugin/auth_pam/auth_pam_tool.c
+++ b/plugin/auth_pam/auth_pam_tool.c
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <unistd.h>
+#include <errno.h>
#include <mysql/plugin_auth_common.h>
struct param {
@@ -62,7 +63,7 @@ typedef struct st_mysql_server_auth_info
#include "auth_pam_base.c"
-int main(int argc, char **argv)
+int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
{
struct param param;
MYSQL_SERVER_AUTH_INFO info;
@@ -70,7 +71,8 @@ int main(int argc, char **argv)
int res;
char a_buf[MYSQL_USERNAME_LENGTH + 1 + 1024];
- (void) setreuid(0, 0);
+ if ((res= setreuid(0, 0)))
+ fprintf(stderr, "Got error %d from setreuid()\n", (int) errno);
if (read(0, &field, 1) < 1)
return -1;
diff --git a/plugin/auth_pam/testing/pam_mariadb_mtr.c b/plugin/auth_pam/testing/pam_mariadb_mtr.c
index c0e07232027..2075d5fdbf3 100644
--- a/plugin/auth_pam/testing/pam_mariadb_mtr.c
+++ b/plugin/auth_pam/testing/pam_mariadb_mtr.c
@@ -15,7 +15,7 @@
#define N 3
-int pam_sm_authenticate(pam_handle_t *pamh, int flags,
+int pam_sm_authenticate(pam_handle_t *pamh, int flags __attribute__((unused)),
int argc, const char *argv[])
{
struct pam_conv *conv;
@@ -72,8 +72,10 @@ ret:
return retval;
}
-int pam_sm_setcred(pam_handle_t *pamh, int flags,
- int argc, const char *argv[])
+int pam_sm_setcred(pam_handle_t *pamh __attribute__((unused)),
+ int flags __attribute__((unused)),
+ int argc __attribute__((unused)),
+ const char *argv[] __attribute__((unused)))
{
return PAM_SUCCESS;