added: rublon.config path to python script, and config file new makefile new path and names in buildRublonPam.sh
56 lines
1.7 KiB
RPMSpec
56 lines
1.7 KiB
RPMSpec
Summary: hello greets the world
|
|
Name: rublonPam
|
|
Version: 1.0
|
|
Release: 1
|
|
License: GPL
|
|
Group: Applications/Tutorials
|
|
Source: rublonPam.tar.gz
|
|
URL: https://www.rublon.net
|
|
Distribution: CENTOS Linux
|
|
Vendor: -
|
|
Packager: Thorsten Staerk
|
|
|
|
%description
|
|
hello greets the world
|
|
|
|
%prep
|
|
yum install -y curl-devel
|
|
yum install -y openssl-devel
|
|
yum install -y pam-devel
|
|
yum install -y policycoreutils-python
|
|
sed -i 's/UsePAM .*/UsePAM yes/' /etc/ssh/sshd_config
|
|
sed -i 's/ChallengeResponseAuthentication .*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
|
|
touch /home/vagrant/login_rublon.te
|
|
cat > /home/vagrant/login_rublon.te << EOF
|
|
module login_rublon 1.0;
|
|
require {
|
|
type http_port_t;
|
|
type http_cache_port_t;
|
|
type sshd_t;
|
|
class tcp_socket name_connect;
|
|
};
|
|
allow sshd_t {http_port_t http_cache_port_t}:tcp_socket name_connect;
|
|
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
|
|
grep -q -e '#auth substack password-auth' /etc/pam.d/sshd || sed -i -e 's/auth substack password-auth/#auth substack password-auth/g' /etc/pam.d/sshd
|
|
grep -q -e 'auth requisite pam_unix.so' /etc/pam.d/sshd || sed -i '\$aauth requisite pam_unix.so' /etc/pam.d/sshd
|
|
grep -q -e 'auth required rublonPam.so' /etc/pam.d/sshd || sed -i '\$aauth required rublonPam.so' /etc/pam.d/sshd
|
|
grep -q -e 'account required rublonPam.so' /etc/pam.d/sshd || sed -i '\$aaccount required rublonPam.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
|
|
|
|
%setup
|
|
|
|
%build
|
|
make
|
|
|
|
%install
|
|
make install
|
|
|
|
%files
|
|
%defattr(-, root, root)
|