Skip to content

Commit

Permalink
Added /etc/profile.d/awk_sandboxing.sh
Browse files Browse the repository at this point in the history
Taken from 7f31767
  • Loading branch information
pyllyukko committed Jan 18, 2025
1 parent 2988dd2 commit 153745c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions newconfs/profile.d/awk_sandboxing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
################################################################################
# file: awk_sandboxing.sh
# created: 16-10-2011
################################################################################
AWK_VERSION=`awk 'BEGIN{split(PROCINFO["version"],versinfo,".");print versinfo[1]}'`
if mawk --version 2>/dev/null | grep -q '^GNU Awk' && [ -n "${AWK_VERSION}" ] && [ ${AWK_VERSION} -ge 4 ]
then
alias awk='/bin/gawk --sandbox'
fi
unset AWK_VERSION
3 changes: 2 additions & 1 deletion tasks/login_defs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
- expiry
# CIS Debian Linux 10 Benchmark v1.0.0 - 5.4.5 Ensure default user shell timeout is 900 seconds or less
# Guide to the Secure Configuration of Red Hat Enterprise Linux 5 Revision 4.1 - 2.3.5.5 Implement Inactivity Time-out for Login Shells
- name: Create /etc/profile.d/{tmout.sh,autologout.csh}
- name: Create /etc/profile.d/{{tmout,awk_sandboxing}.sh,autologout.csh}

Check failure on line 96 in tasks/login_defs.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

jinja[invalid]

template error while templating string: unexpected '}'. String: Create /etc/profile.d/{{tmout,awk_sandboxing}.sh,autologout.csh}. unexpected '}'
become: true
tags:
- configuration
Expand All @@ -107,6 +107,7 @@
with_items:
- tmout.sh
- autologout.csh
- awk_sandboxing.sh
# CIS Debian Linux 10 Benchmark v1.0.0 - 5.4.4 Ensure default user umask is 027 or more restrictive
# Slackware and CentOS have umask in /etc/profile
- name: Create /etc/profile.d/umask.sh (Debian)
Expand Down

0 comments on commit 153745c

Please sign in to comment.