Changeset 239
- Timestamp:
- 08/15/08 14:15:10
(3 months ago)
- Author:
- slawrence
- Message:
Revert back to using cracklib for password control
Fix typo in tallylog3 installation location
Update INSTALL instructions
Update policy version number
Add pam and cracklib patch to the tree
Update build instructions with packages needed to build pam
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r238 |
r239 |
|
| 44 | 44 | The installation of RHEL 5.2 CLIP packages needs to occur in two phases, the second of which requires setting SELinux's enforcing mode to permissive. |
|---|
| 45 | 45 | |
|---|
| 46 | | First, install the CLIP RPM for your architecture found in the Userland Packages section of http://oss.tresys.com/projects/clip/wiki/DownloadRelease#RHEL5.2: |
|---|
| | 46 | First, install the PAM RPM for your architecture found in the Userland Packages section of http://oss.tresys.com/projects/clip/wiki/DownloadRelease#RHEL5.2. This rpm includes a patched cracklib module that allows password restrictions to be applied to the root user. |
|---|
| 47 | 47 | |
|---|
| 48 | | # rpm -ivh --force clip-2.0-1.$ARCH.rpm |
|---|
| | 48 | rpm -Uvh --force pam-0.99.6.2-3.27.$ARCH.rpm |
|---|
| 49 | 49 | |
|---|
| 50 | | The --force option is needed because a package installed in this step will overwrite files already installed by another package. During this step, some system configuration files will be backed up and replaced by files provided by CLIP. |
|---|
| | 50 | Next, install the CLIP RPM for your architecture found in the Userland Packages section of http://oss.tresys.com/projects/clip/wiki/DownloadRelease#RHEL5.2: |
|---|
| 51 | 51 | |
|---|
| 52 | | CLIP distributes an optionally installed IPTables package update that supports per packet labeling using SECMARK. A detailed description of SECMARK is available at: http://james-morris.livejournal.com/11010.html. The IPTables package is available at http://oss.tresys.com/projects/clip/wiki/DownloadRelease#RHEL5.2. |
|---|
| | 52 | rpm -ivh --force clip-2.0-1.$ARCH.rpm |
|---|
| | 53 | |
|---|
| | 54 | The --force option is needed because a package installed in this step will overwrite files already installed by another package. |
|---|
| | 55 | |
|---|
| | 56 | CLIP distributes an optionally installed IPTables package update that supports per packet labeling using SECMARK. A detailed description of SECMARK is available at: http://james-morris.livejournal.com/11010.html. The IPTables package is available at [wiki:DownloadRelease#RHEL5.1 DownloadRelease] |
|---|
| 53 | 57 | |
|---|
| 54 | 58 | To use the update first install the rpm: |
|---|
| 55 | 59 | |
|---|
| 56 | | # rpm -Uvh iptables-1.3.5-4.99.el5.$ARCH.rpm |
|---|
| | 60 | rpm -Uvh iptables-1.3.5-4.99.el5.$ARCH.rpm |
|---|
| 57 | 61 | |
|---|
| 58 | 62 | After installing the rpm you must turn off the compat_net option that is enabled by the clip kickstart file. You can enable this at runtime by using the command |
|---|
| 59 | 63 | |
|---|
| 60 | | # echo "0" > /selinux/compat_net |
|---|
| | 64 | echo "0" > /selinux/compat_net |
|---|
| 61 | 65 | |
|---|
| 62 | 66 | In order to make this change persistent across reboots edit the file /boot/grub/grub.conf and set selinux_compat_net=0 |
|---|
| … | … | |
| 64 | 68 | Finally packets can be labeled using rules such as: |
|---|
| 65 | 69 | |
|---|
| 66 | | # iptables -A INPUT -t mangle -p tcp --dport 21 -j SECMARK --selctx system_u:object_r:ftp_client_packet_t:s0 |
|---|
| 67 | | # iptables -A INPUT -t mangle -m state --state RELATED,ESTABLISHED -j CONNSECMARK --restore |
|---|
| | 70 | iptables -A INPUT -t mangle -p tcp --dport 21 -j SECMARK --selctx system_u:object_r:ftp_client_packet_t:s0 |
|---|
| | 71 | iptables -A INPUT -t mangle -m state --state RELATED,ESTABLISHED -j CONNSECMARK --restore |
|---|
| 68 | 72 | |
|---|
| 69 | 73 | The first rule will label all tcp packets received on port 21 system_u:object_r:ftp_client_packet_t:s0. The second rule ensures that all further packets that are part of initial connection will keep that label. All rules must be added to the mangle table. If a rule has an invalid context IPTables will return a very bad error code that is not descriptive. This problem exists because of the way that IPTables returns errors and was not easily solvable as part of our back port. |
|---|
| … | … | |
| 71 | 75 | Now download the updated SELinux toolchain and policy RPMs found in the SELinux Policy section of DownloadRelease. To install the new policy, it is necessary to temporarily force SELinux into permissive mode: |
|---|
| 72 | 76 | |
|---|
| 73 | | # setenforce 0 |
|---|
| 74 | | # rpm -Uvh libsepol-1.16.14-1.$ARCH.rpm |
|---|
| 75 | | # rpm -Uvh --force libselinux-1.34.15-1.$ARCH.rpm |
|---|
| 76 | | # rpm -Uvh libselinux-python-1.34.15-1.$ARCH.rpm |
|---|
| 77 | | # rpm -Uvh libsemanage-1.10.9-1.$ARCH.rpm |
|---|
| 78 | | # rpm -Uvh checkpolicy-1.34.7-1.$ARCH.rpm |
|---|
| 79 | | # rpm -Uvh policycoreutils-1.34.16-1.$ARCH.rpm policycoreutils-newrole-1.34.16-1.$ARCH.rpm |
|---|
| 80 | | # rpm -ivh selinux-policy-clip-2.0-3.noarch.rpm |
|---|
| | 77 | setenforce 0 |
|---|
| | 78 | rpm -Uvh libsepol-1.16.14-1.$ARCH.rpm |
|---|
| | 79 | rpm -Uvh --force libselinux-1.34.15-1.$ARCH.rpm |
|---|
| | 80 | rpm -Uvh libselinux-python-1.34.15-1.$ARCH.rpm |
|---|
| | 81 | rpm -Uvh libsemanage-1.10.9-1.$ARCH.rpm |
|---|
| | 82 | rpm -Uvh checkpolicy-1.34.7-1.$ARCH.rpm |
|---|
| | 83 | rpm -Uvh policycoreutils-1.34.16-1.$ARCH.rpm policycoreutils-newrole-1.34.16-1.$ARCH.rpm |
|---|
| | 84 | rpm -ivh selinux-policy-clip-3.0-1.noarch.rpm |
|---|
| 81 | 85 | |
|---|
| 82 | 86 | Note: Because the selinux-policy-clip rpm makes changes to class definitions, the policy will fail to load after installation. A reboot is require before the policy will load. |
|---|
| 83 | 87 | |
|---|
| 84 | | # reboot |
|---|
| | 88 | reboot |
|---|
| 85 | 89 | |
|---|
| 86 | 90 | After rebooting, login to the system with the 'clipuser' account and password. |
|---|
| r238 |
r239 |
|
| 8 | 8 | |
|---|
| 9 | 9 | - audit-libs-devel |
|---|
| | 10 | - autoconf |
|---|
| | 11 | - automake |
|---|
| 10 | 12 | - bison |
|---|
| 11 | 13 | - byacc |
|---|
| | 14 | - docbook-style-xsl |
|---|
| 12 | 15 | - flex |
|---|
| 13 | 16 | - gcc |
|---|
| 14 | 17 | - libcap-devel |
|---|
| | 18 | - libtool |
|---|
| | 19 | - linuxdoc-tools |
|---|
| 15 | 20 | - pam-devel |
|---|
| 16 | 21 | - python-devel |
|---|
| … | … | |
| 18 | 23 | - subversion |
|---|
| 19 | 24 | - swig |
|---|
| | 25 | - w3m |
|---|
| 20 | 26 | |
|---|
| 21 | 27 | To have yum install the packages from the RHEL5.2 installation cd, perform |
|---|
| r238 |
r239 |
|
| 41 | 41 | /%{_lib}/security/pam_tally3.so |
|---|
| 42 | 42 | /usr/share/doc/pam_tally3 |
|---|
| 43 | | /var/log/tally3 |
|---|
| | 43 | /var/log/tallylog3 |
|---|
| 44 | 44 | /sbin/pam_tally3 |
|---|
| 45 | 45 | /usr/sbin/xar |
|---|
| r217 |
r239 |
|
| 14 | 14 | account required pam_permit.so |
|---|
| 15 | 15 | |
|---|
| 16 | | password required pam_passwdqc.so min=disabled,disabled,disabled,disabled,14 max=40 passphrase=0 match=0 similar=deny random=0 enforce=everyone retry=3 |
|---|
| | 16 | password required pam_cracklib.so try_first_pass retry=3 minlen=12 difok=3 dcredit=-2 ucredit=-2 ocredit=-2 lcredit=-2 enforce_root |
|---|
| 17 | 17 | password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=12 |
|---|
| 18 | 18 | password required pam_deny.so |
|---|
| r233 |
r239 |
|
| 382 | 382 | account required pam_permit.so |
|---|
| 383 | 383 | |
|---|
| 384 | | password required pam_passwdqc.so min=disabled,disabled,disabled,disabled,14 max=40 passphrase=0 match=0 similar=deny random=0 enforce=everyone retry=3 |
|---|
| | 384 | password required pam_cracklib.so try_first_pass retry=3 minlen=12 difok=3 dcredit=-2 ucredit=-2 ocredit=-2 lcredit=-2 |
|---|
| 385 | 385 | password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=12 |
|---|
| 386 | 386 | password required pam_deny.so |
|---|
| r238 |
r239 |
|
| 41 | 41 | install -s -m755 $(APP) $(DESTDIR)$(SBIN) |
|---|
| 42 | 42 | install -m644 doc/* $(DESTDIR)$(DOC) |
|---|
| 43 | | touch $(DESTDIR)$(LOG)/tally3 |
|---|
| 44 | | chmod 640 $(DESTDIR)$(LOG)/tally3 |
|---|
| | 43 | touch $(DESTDIR)$(LOG)/tallylog3 |
|---|
| | 44 | chmod 640 $(DESTDIR)$(LOG)/tallylog3 |
|---|
| 45 | 45 | |
|---|
| 46 | 46 | installx86_64: |
|---|
| … | … | |
| 52 | 52 | install -s -m755 $(APP) $(DESTDIR)$(SBIN) |
|---|
| 53 | 53 | install -m644 doc/* $(DESTDIR)$(DOC) |
|---|
| 54 | | touch $(DESTDIR)$(LOG)/tally3 |
|---|
| 55 | | chmod 640 $(DESTDIR)$(LOG)/tally3 |
|---|
| | 54 | touch $(DESTDIR)$(LOG)/tallylog3 |
|---|
| | 55 | chmod 640 $(DESTDIR)$(LOG)/tallylog3 |
|---|
| r183 |
r239 |
|
| 23 | 23 | # This is the version number of the RPM that will be |
|---|
| 24 | 24 | # generated. Typically you bump this for delivery. |
|---|
| 25 | | VERSION ?= 2.0 |
|---|
| | 25 | VERSION ?= 3.0 |
|---|
| 26 | 26 | |
|---|
| 27 | 27 | # bump this if creating multiple releases from the same |
|---|
| 28 | 28 | # version (think about this... why are you doing this?) |
|---|
| 29 | | RELEASE ?= 3 |
|---|
| | 29 | RELEASE ?= 1 |
|---|
| 30 | 30 | |
|---|
| 31 | 31 | # The name of the Vendor |
|---|
| r237 |
r239 |
|
| 117 | 117 | do_relabel $i |
|---|
| 118 | 118 | done |
|---|
| 119 | | rm -f $statusfile $switchfile |
|---|
| | 119 | #rm -f $statusfile $switchfile |
|---|
| 120 | 120 | fi |
|---|
| 121 | 121 | fi |
|---|
| | 122 | |
|---|
| | 123 | #remove ourseleves from startup |
|---|
| | 124 | chkconfig --del selinux-relabel 2>/dev/null |
|---|
| | 125 | |
|---|
| 122 | 126 | rm -f $lockfile |
|---|
| 123 | 127 | } |
|---|
| r217 |
r239 |
|
| 24 | 24 | account required pam_permit.so |
|---|
| 25 | 25 | |
|---|
| 26 | | password required pam_passwdqc.so min=disabled,disabled,disabled,disabled,14 max=40 passphrase=0 match=0 similar=deny random=0 enforce=everyone retry=3 |
|---|
| | 26 | password required pam_cracklib.so try_first_pass retry=3 minlen=12 difok=3 dcredit=-2 ucredit=-2 ocredit=-2 lcredit=-2 |
|---|
| 27 | 27 | password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=12 |
|---|
| 28 | 28 | password required pam_deny.so |
|---|
Download in other formats:
* Generating other formats may take time.