semodule install script
This commit is contained in:
parent
b250a07760
commit
50383f0c22
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -32,15 +32,17 @@ pipeline {
|
||||
--url https://rublon.com/ \
|
||||
-n rublon-ssh -v 1.0 \
|
||||
--iteration ${currentBuild.number}.el7 \
|
||||
--depends python \
|
||||
--depends python-pip \
|
||||
--depends epel-release \
|
||||
--depends python3 \
|
||||
--depends python3-pip \
|
||||
--depends openssh-server \
|
||||
--description \"Rublon SSH\" \
|
||||
--after-install /usr/src/SSH/PAM/installsemodule.sh \
|
||||
/etc/rublon.config=/etc/rublon.config \
|
||||
/usr/share/rublon-ssh/confirmMethod.py=/usr/share/rublon-ssh/confirmMethod.py \
|
||||
/usr/share/rublon-ssh/confirmUser.py=/usr/share/rublon-ssh/confirmUser.py \
|
||||
/usr/lib64/security/pam_rublon.so=/usr/lib64/security/pam_rublon.so"
|
||||
/usr/lib64/security/pam_rublon.so=/usr/lib64/security/pam_rublon.so \
|
||||
/usr/share/rublon-ssh/login_rublon.pp=/usr/share/rublon-ssh/login_rublon.pp"
|
||||
archiveArtifacts artifacts: '*.rpm', fingerprint: true
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ install:
|
||||
install -d $(DESTDIR)/usr/share/rublon-ssh
|
||||
install -m 755 confirmMethod.py $(DESTDIR)/usr/share/rublon-ssh
|
||||
install -m 755 confirmUser.py $(DESTDIR)/usr/share/rublon-ssh
|
||||
install -m 644 login_rublon.pp $(DESTDIR)/usr/share/rublon-ssh
|
||||
|
||||
install -d $(DESTDIR)/usr/lib64/security
|
||||
install -m 644 pam_rublon.so $(DESTDIR)/usr/lib64/security/
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
semodule -i login_rublon.pp
|
||||
semodule -i /usr/share/rublon-ssh/login_rublon.pp
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include <curl/curl.h>
|
||||
#include <security/pam_appl.h>
|
||||
#include <security/pam_modules.h>
|
||||
#include <python2.7/Python.h>
|
||||
#include <python3.6m/Python.h>
|
||||
#include <pthread.h>
|
||||
|
||||
struct args {
|
||||
@ -28,7 +28,7 @@ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
void* usersThread(void* input) {
|
||||
int out = -1;
|
||||
char *script;
|
||||
asprintf(&script,"python /usr/share/rublon-ssh/confirmUser.py %s %s",((struct args*)input)->rublonApiServer ,((struct args*)input)->transactionId);
|
||||
asprintf(&script,"python3 /usr/share/rublon-ssh/confirmUser.py %s %s",((struct args*)input)->rublonApiServer ,((struct args*)input)->transactionId);
|
||||
out = system(script);
|
||||
if(out != -1) {
|
||||
if(out == 256)
|
||||
@ -47,7 +47,7 @@ void* methodsThread(void* input) {
|
||||
|
||||
int out = -1;
|
||||
char *script;
|
||||
asprintf(&script,"python /usr/share/rublon-ssh/confirmMethod.py %s %s",((struct args*)input)->rublonApiServer ,((struct args*)input)->transactionId);
|
||||
asprintf(&script,"python3 /usr/share/rublon-ssh/confirmMethod.py %s %s",((struct args*)input)->rublonApiServer ,((struct args*)input)->transactionId);
|
||||
out = system(script);
|
||||
if(out != -1) {
|
||||
if(out == 256)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user