mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 09:44:17 +01:00
fixing pam plugin to compile again
This commit is contained in:
parent
e4bfb6f161
commit
a2478a6c72
2 changed files with 5 additions and 6 deletions
plugin/auth_pam
|
@ -5,6 +5,9 @@ CHECK_INCLUDE_FILES (security/pam_appl.h HAVE_PAM_APPL_H)
|
|||
CHECK_FUNCTION_EXISTS (strndup HAVE_STRNDUP)
|
||||
|
||||
IF(HAVE_PAM_APPL_H)
|
||||
IF(HAVE_STRNDUP)
|
||||
ADD_DEFINITIONS(-DHAVE_STRNDUP)
|
||||
ENDIF(HAVE_STRNDUP)
|
||||
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
|
||||
ENDIF(HAVE_PAM_APPL_H)
|
||||
|
||||
|
|
|
@ -14,13 +14,10 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE /* For strndup() */
|
||||
#endif
|
||||
#define _GNU_SOURCE 1 /* for strndup */
|
||||
|
||||
#include <mysql/plugin_auth.h>
|
||||
#include <string.h>
|
||||
#include <my_config.h>
|
||||
#include <security/pam_appl.h>
|
||||
#include <security/pam_modules.h>
|
||||
|
||||
|
@ -123,8 +120,7 @@ static int pam_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
|
|||
const char *new_username;
|
||||
struct param param;
|
||||
/* The following is written in such a way to make also solaris happy */
|
||||
struct pam_conv pam_start_arg = { &conv, NULL };
|
||||
pam_start_arg.appdata_ptr= (char*) ¶m;
|
||||
struct pam_conv pam_start_arg = { &conv, (char*) ¶m };
|
||||
|
||||
/*
|
||||
get the service name, as specified in
|
||||
|
|
Loading…
Add table
Reference in a new issue