diff --git a/.gitignore b/.gitignore index 360057b..7c3af23 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,5 @@ -*.so .vs/ .vagrant/ /*.log SSH/RPM/rublonPam-1.0/ /.idea -/SSH/PAM/cJSON.o -/SSH/PAM/cfg_parse.o -/SSH/PAM/coreHandler.o -/SSH/PAM/pamApp.o -/SSH/PAM/qrcodegen.o -/SSH/PAM/rublonPam.o -/SSH/PAM/signatureWrapper.o diff --git a/SSH/.vscode/ipch/390ca3d2576525b3/QRCODEGEN.ipch b/SSH/.vscode/ipch/390ca3d2576525b3/QRCODEGEN.ipch deleted file mode 100644 index 02197e2..0000000 Binary files a/SSH/.vscode/ipch/390ca3d2576525b3/QRCODEGEN.ipch and /dev/null differ diff --git a/SSH/.vscode/ipch/390ca3d2576525b3/mmap_address.bin b/SSH/.vscode/ipch/390ca3d2576525b3/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/390ca3d2576525b3/mmap_address.bin and /dev/null differ diff --git a/SSH/.vscode/ipch/43186d2ecf0abc76/mmap_address.bin b/SSH/.vscode/ipch/43186d2ecf0abc76/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/43186d2ecf0abc76/mmap_address.bin and /dev/null differ diff --git a/SSH/.vscode/ipch/4ffc64a309b12bb8/CJSON.ipch b/SSH/.vscode/ipch/4ffc64a309b12bb8/CJSON.ipch deleted file mode 100644 index 8144f15..0000000 Binary files a/SSH/.vscode/ipch/4ffc64a309b12bb8/CJSON.ipch and /dev/null differ diff --git a/SSH/.vscode/ipch/4ffc64a309b12bb8/mmap_address.bin b/SSH/.vscode/ipch/4ffc64a309b12bb8/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/4ffc64a309b12bb8/mmap_address.bin and /dev/null differ diff --git a/SSH/.vscode/ipch/7512c20022b388e9/mmap_address.bin b/SSH/.vscode/ipch/7512c20022b388e9/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/7512c20022b388e9/mmap_address.bin and /dev/null differ diff --git a/SSH/.vscode/ipch/94a49a9e0628e1a1/CFG_PARSE.ipch b/SSH/.vscode/ipch/94a49a9e0628e1a1/CFG_PARSE.ipch deleted file mode 100644 index 1f78f36..0000000 Binary files a/SSH/.vscode/ipch/94a49a9e0628e1a1/CFG_PARSE.ipch and /dev/null differ diff --git a/SSH/.vscode/ipch/94a49a9e0628e1a1/mmap_address.bin b/SSH/.vscode/ipch/94a49a9e0628e1a1/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/94a49a9e0628e1a1/mmap_address.bin and /dev/null differ diff --git a/SSH/.vscode/ipch/abd48fb87277d4cd/mmap_address.bin b/SSH/.vscode/ipch/abd48fb87277d4cd/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/abd48fb87277d4cd/mmap_address.bin and /dev/null differ diff --git a/SSH/.vscode/ipch/b0827e1639cc663/mmap_address.bin b/SSH/.vscode/ipch/b0827e1639cc663/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/b0827e1639cc663/mmap_address.bin and /dev/null differ diff --git a/SSH/.vscode/ipch/bc9541924e868ed5/mmap_address.bin b/SSH/.vscode/ipch/bc9541924e868ed5/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/bc9541924e868ed5/mmap_address.bin and /dev/null differ diff --git a/SSH/.vscode/ipch/bc9546924e869754/mmap_address.bin b/SSH/.vscode/ipch/bc9546924e869754/mmap_address.bin deleted file mode 100644 index 862b842..0000000 Binary files a/SSH/.vscode/ipch/bc9546924e869754/mmap_address.bin and /dev/null differ diff --git a/SSH/PAM/.gitignore b/SSH/PAM/.gitignore index 5761abc..9d22eb4 100644 --- a/SSH/PAM/.gitignore +++ b/SSH/PAM/.gitignore @@ -1 +1,2 @@ *.o +*.so diff --git a/SSH/PAM/Makefile b/SSH/PAM/Makefile index b56cfdd..25b7614 100644 --- a/SSH/PAM/Makefile +++ b/SSH/PAM/Makefile @@ -1,12 +1,11 @@ make: - gcc -fPIC -fno-stack-protector -std=c99 -DOS_NAME="\"$(shell . /etc/os-release; echo $$PRETTY_NAME)\"" -I$(shell ./getPythonVersion.sh) -c rublonPam.c src/pamApp.c src/coreHandler.c src/signatureWrapper.c lib/cfg_parse.c lib/cJSON.c lib/qrcodegen.c + gcc -fPIC -fno-stack-protector -std=c99 -DOS_NAME="\"$(shell . /etc/os-release; echo $$PRETTY_NAME)\"" -I$(shell ./getPythonPath.sh) -c rublonPam.c src/pamApp.c src/coreHandler.c src/signatureWrapper.c lib/cfg_parse.c lib/cJSON.c lib/qrcodegen.c ld -x --shared -o pam_rublon.so -lcurl rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o selinux: checkmodule -M -m -o login_rublon.mod login_rublon.te semodule_package -o login_rublon.pp -m login_rublon.mod #semodule -i login_rublon.pp install: - install -d $(DESTDIR)/etc install -m 644 rublon.config $(DESTDIR)/etc install -d $(DESTDIR)/usr/share/rublon-ssh @@ -17,4 +16,4 @@ install: install -d $(DESTDIR)/usr/lib64/security install -m 644 pam_rublon.so $(DESTDIR)/usr/lib64/security/ clean: - rm rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o + rm pam_rublon.so rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o diff --git a/SSH/PAM/buildRublonPam.sh b/SSH/PAM/buildRublonPam.sh deleted file mode 100644 index 6b0ba72..0000000 --- a/SSH/PAM/buildRublonPam.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -gcc -fPIC -fno-stack-protector -std=c99 -I$(./getPythonVersion.sh) -c rublonPam.c src/pamApp.c src/coreHandler.c src/signatureWrapper.c lib/cfg_parse.c lib/cJSON.c lib/qrcodegen.c - -sudo mkdir -p /lib/x86_64-linux-gnu/security/ -sudo mkdir -p /usr/share/rublon-ssh - -sudo cp rublon.config /etc -sudo cp confirmMethod.py /usr/share/rublon-ssh -sudo cp confirmUser.py /usr/share/rublon-ssh - -sudo ld -x --shared -o /lib/x86_64-linux-gnu/security/pam_rublon.so -lcurl rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o - -rm rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o diff --git a/SSH/PAM/getPythonVersion.sh b/SSH/PAM/getPythonPath.sh similarity index 100% rename from SSH/PAM/getPythonVersion.sh rename to SSH/PAM/getPythonPath.sh diff --git a/SSH/PAM/hooks/installsemodule.sh b/SSH/PAM/hooks/installsemodule.sh index 184f1aa..7b49a89 100755 --- a/SSH/PAM/hooks/installsemodule.sh +++ b/SSH/PAM/hooks/installsemodule.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash semodule -i /usr/share/rublon-ssh/login_rublon.pp diff --git a/SSH/PAM/src/coreHandler.c b/SSH/PAM/src/coreHandler.c index f0dd5c7..87ab441 100644 --- a/SSH/PAM/src/coreHandler.c +++ b/SSH/PAM/src/coreHandler.c @@ -227,7 +227,7 @@ char *curlHandler(pam_handle_t *pamh, char *jsonObj, char *url, char *secretKey) curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunks); res = curl_easy_perform(curl); if(res != CURLE_OK) { - debugLog("No response from Rublon server", ""); + debugLog("No response from Rublon server (perform)", ""); return NULL; } long size; @@ -246,7 +246,7 @@ char *curlHandler(pam_handle_t *pamh, char *jsonObj, char *url, char *secretKey) return curlResponse; } else { - debugLog("No response from Rublon server", ""); + debugLog("No response from Rublon server (init)", ""); return NULL; } }