RDEV-1036
changes in Makefile in Vagrantfile building script changed to Makefile process (make, meke selinux, make install..)
This commit is contained in:
parent
ef39088830
commit
a7b57748ab
@ -5,11 +5,10 @@ selinux:
|
||||
semodule_package -o login_rublon.pp -m login_rublon.mod
|
||||
semodule -i login_rublon.pp
|
||||
install:
|
||||
install -d confirmMethod.py $(DESTDIR)/usr/share/rublon-ssh
|
||||
install -d confirmUser.py $(DESTDIR)/usr/share/rublon-ssh/
|
||||
install -d $(DESTDIR)/usr/share/rublon-ssh
|
||||
install -m 644 rublon.config $(DESTDIR)/etc
|
||||
install -m 755 $(DESTDIR)/usr/share/rublon-ssh/confirmMethod.py
|
||||
install -m 755 $(DESTDIR)/usr/share/rublon-ssh/confirmUser.py
|
||||
install -m 755 confirmMethod.py $(DESTDIR)/usr/share/rublon-ssh
|
||||
install -m 755 confirmUser.py $(DESTDIR)/usr/share/rublon-ssh
|
||||
ld -x --shared -o $(DESTDIR)/lib64/security/pam_rublon.so -lcurl rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o
|
||||
clean:
|
||||
rm rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o
|
||||
29
Vagrantfile
vendored
29
Vagrantfile
vendored
@ -82,28 +82,9 @@ Vagrant.configure("2") do |config|
|
||||
sed -i 's/ChallengeResponseAuthentication .*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
|
||||
|
||||
cd /home/vagrant/Rublon-Linux/SSH/PAM/
|
||||
./buildRublonPam.sh
|
||||
|
||||
touch /home/vagrant/login_rublon.te
|
||||
|
||||
cat > /home/vagrant/login_rublon.te << EOF
|
||||
module login_rublon 1.0;
|
||||
require {
|
||||
type http_port_t;
|
||||
type soundd_port_t;
|
||||
type http_cache_port_t;
|
||||
type sshd_t;
|
||||
type unreserved_port_t;
|
||||
class tcp_socket name_connect;
|
||||
class udp_socket name_bind;
|
||||
};
|
||||
allow sshd_t {http_port_t http_cache_port_t soundd_port_t}:tcp_socket name_connect;
|
||||
allow sshd_t {unreserved_port_t}:udp_socket name_bind;
|
||||
EOF
|
||||
|
||||
checkmodule -M -m -o /home/vagrant/login_rublon.mod /home/vagrant/login_rublon.te
|
||||
semodule_package -o /home/vagrant/login_rublon.pp -m /home/vagrant/login_rublon.mod
|
||||
semodule -i /home/vagrant/login_rublon.pp
|
||||
make
|
||||
make selinux
|
||||
make install
|
||||
|
||||
useradd -s /bin/bash -m kwa
|
||||
echo "kwa:kwa"|chpasswd
|
||||
@ -113,10 +94,6 @@ EOF
|
||||
grep -q -e 'auth required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aauth required pam_rublon.so' /etc/pam.d/sshd
|
||||
grep -q -e 'account required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aaccount required pam_rublon.so' /etc/pam.d/sshd
|
||||
|
||||
rm /home/vagrant/login_rublon.te
|
||||
rm /home/vagrant/login_rublon.mod
|
||||
rm /home/vagrant/login_rublon.pp
|
||||
|
||||
service sshd restart
|
||||
|
||||
#vagrant ssh -p -- -l kwa
|
||||
|
||||
Loading…
Reference in New Issue
Block a user