mirror of
https://github.com/Yubico/yubico-pam.git
synced 2024-11-29 00:24:11 +01:00
Merge branch 'ci_github_actions'
This commit is contained in:
commit
ceb4c53efd
46
.github/workflows/build_and_test.yml
vendored
Normal file
46
.github/workflows/build_and_test.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
name: Build and Test
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
cc: gcc-10
|
||||
config_args: "--without-mysql"
|
||||
extra: "libldap2-dev libykpers-1-dev libnet-ldap-server-perl"
|
||||
- os: ubuntu-20.04
|
||||
cc: gcc-10
|
||||
config_args: "--without-ldap --without-mysql"
|
||||
extra: "libykpers-1-dev"
|
||||
- os: ubuntu-20.04
|
||||
cc: gcc-10
|
||||
config_args: "--without-cr --without-mysql"
|
||||
extra: "libldap2-dev libnet-ldap-server-perl"
|
||||
- os: ubuntu-20.04
|
||||
cc: gcc-10
|
||||
config_args: "--without-ldap --without-cr --without-mysql"
|
||||
extra: ""
|
||||
- os: ubuntu-20.04
|
||||
cc: gcc-10
|
||||
config_args: ""
|
||||
extra: "libldap2-dev libykpers-1-dev libnet-ldap-server-perl libmysqlclient-dev"
|
||||
- os: ubuntu-18.04
|
||||
cc: gcc-8
|
||||
config_args: ""
|
||||
extra: "libldap2-dev libykpers-1-dev libnet-ldap-server-perl libmysqlclient-dev"
|
||||
- os: ubuntu-16.04
|
||||
cc: gcc-5
|
||||
config_args: ""
|
||||
extra: "libldap2-dev libykpers-1-dev libnet-ldap-server-perl libmysqlclient-dev"
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build and test
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CONFIGURE_ARGS: ${{ matrix.config_args }}
|
||||
EXTRA: ${{ matrix.extra }}
|
||||
run: |
|
||||
tests/aux/build-and-test.sh
|
19
.travis.yml
19
.travis.yml
@ -1,19 +0,0 @@
|
||||
language: c
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
env:
|
||||
- CONFIGURE_ARGS="" EXTRA="libldap2-dev libykpers-1-dev libnet-ldap-server-perl libmysqlclient-dev"
|
||||
- CONFIGURE_ARGS="--without-ldap" EXTRA="libykpers-1-dev libmysqlclient-dev"
|
||||
- CONFIGURE_ARGS="--without-cr" EXTRA="libldap2-dev libnet-ldap-server-perl libmysqlclient-dev"
|
||||
- CONFIGURE_ARGS="--without-ldap --without-cr" EXTRA="libmysqlclient-dev"
|
||||
script: tests/aux/build-and-test.sh
|
||||
jobs:
|
||||
install: travis_wait 30 mvn install
|
||||
include:
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
env: COVERAGE="--enable-coverage" EXTRA="libldap2-dev libykpers-1-dev libnet-ldap-server-perl lcov libmysqlclient-dev"
|
8
util.c
8
util.c
@ -136,8 +136,6 @@ check_user_token_mysql(const char *mysql_server,
|
||||
long unsigned int length;
|
||||
int int_data;
|
||||
int row_count;
|
||||
my_bool is_null;
|
||||
my_bool error;
|
||||
|
||||
if(mysql_library_init(0, NULL, NULL)){
|
||||
if(verbose){
|
||||
@ -195,7 +193,6 @@ check_user_token_mysql(const char *mysql_server,
|
||||
ps_params[0].buffer = (char *)username;
|
||||
ps_params[0].buffer_length = str_username;
|
||||
ps_params[0].length = &str_username;
|
||||
ps_params[0].is_null = 0;
|
||||
|
||||
if(otp_id != NULL)
|
||||
{
|
||||
@ -204,7 +201,6 @@ check_user_token_mysql(const char *mysql_server,
|
||||
ps_params[1].buffer = (char *)otp_id;
|
||||
ps_params[1].buffer_length = str_otp;
|
||||
ps_params[1].length = &str_otp;
|
||||
ps_params[1].is_null = 0;
|
||||
}
|
||||
|
||||
if(mysql_stmt_bind_param(stmt, ps_params))
|
||||
@ -225,8 +221,6 @@ check_user_token_mysql(const char *mysql_server,
|
||||
bind[0].buffer_type = MYSQL_TYPE_LONG;
|
||||
bind[0].buffer = (char *)&int_data;
|
||||
bind[0].length = &length;
|
||||
bind[0].is_null = &is_null;
|
||||
bind[0].error = &error;
|
||||
|
||||
if(mysql_stmt_bind_result(stmt, bind))
|
||||
{
|
||||
@ -243,7 +237,7 @@ check_user_token_mysql(const char *mysql_server,
|
||||
|
||||
while(!mysql_stmt_fetch(stmt))
|
||||
{
|
||||
if(is_null)
|
||||
if(bind[0].is_null_value)
|
||||
{
|
||||
D (debug_file, "mysql_stmt_fetch() failed");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user