fi
;;
sudoers.man.sed)
+ # Join tagged list line with the corresponding item and re-process
+ cat >>"$OUTFILE" <<-'EOF'
+ :again
+ /^\.TP 18n$/ {
+ N
+ bagain
+ }
+ EOF
+
# Subsections to remove (SELinux and Solaris are adjacent)
RM_SS=
if [ X"$PSMAN" != X"1" ]; then
# BSD login class
if [ X"$LCMAN" != X"1" ]; then
cat >>"$OUTFILE" <<-EOF
- /^On BSD systems/,/\.$/ {
- d
- }
- /^use_loginclass$/,/^\.TP 18n$/ {
- /^\.PD$/!d
- }
+ /^On BSD systems/,/\.$/d
+ /^\.TP 18n\nuse_loginclass$/,/^by default\./d
EOF
fi
N
d
}
- /^l*i*m*i*t*privs$/,/^\.TP 18n$/ {
- /^\.PD$/!d
- }
- /^On Solaris 10/,/^\.[sP][pP]/ {
- d
- }
+ /^\.TP 18n\n\(limit\)*privs$/,/^is built on Solaris 10 or higher\./d
+ /^On Solaris 10/,/^\.[sP][pP]/d
EOF
fi
N
d
}
- /^[rt][oy][lp]e$/,/^\.TP 18n$/ {
- /^\.PD$/!d
- }
+ /^\.TP 18n\n[rt][oy][lp]e$/,/^is built with SELinux support\.$/d
EOF
fi
;;
#!/bin/sh
#
-# Copyright (c) 2012-2013 Todd C. Miller <Todd.Miller@courtesan.com>
+# Copyright (c) 2012-2014 Todd C. Miller <Todd.Miller@courtesan.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
if [ X"$BAMAN" != X"1" ]; then
BA_FLAG='/^.*\n\.Op Fl a Ar type/{;N;/^.*\n\.Ek$/d;};'
cat >>"$OUTFILE" <<-'EOF'
- /^\.It Fl a Ar type/,/BSD authentication\.$/ {
- d
- }
+ /^\.It Fl a Ar type/,/BSD authentication\.$/d
EOF
fi
if [ X"$LCMAN" != X"1" ]; then
LC_FLAG='/^.*\n\.Op Fl c Ar class/{;N;/^.*\n\.Ek$/d;};'
cat >>"$OUTFILE" <<-'EOF'
- /^\.It Fl c Ar class/,/BSD login classes\.$/ {
- d
- }
+ /^\.It Fl c Ar class/,/BSD login classes\.$/d
/^\.Xr login_cap 3 ,$/d
/^BSD login class$/ {
N
if [ X"$SEMAN" != X"1" ]; then
SE_FLAG='/^.*\n\.Op Fl r Ar role/{;N;/^.*\n\.Ek$/d;};/^.*\n\.Op Fl t Ar type/{;N;/^.*\n\.Ek$/d;};'
cat >>"$OUTFILE" <<-'EOF'
- /^\.It Fl r Ar role/,/^\.Ar role \.$/ {
- d
- }
- /^\.It Fl t Ar type/,/derived from the role\.$/ {
- d
- }
+ /^\.It Fl r Ar role/,/^\.Ar role \.$/d
+ /^\.It Fl t Ar type/,/derived from the role\.$/d
/^SELinux role and type$/ {
N
/^SELinux role and type\n\.It$/d
# BSD login class
if [ X"$LCMAN" != X"1" ]; then
cat >>"$OUTFILE" <<-'EOF'
- /^On BSD systems/,/\.$/ {
- d
- }
- /^\.It use_loginclass$/,/^\.It/ {
- /^\.It [^u][^s][^e][^_][^l]/!d
- }
+ /^On BSD systems/,/\.$/d
+ /^\.It use_loginclass$/,/^by default\./d
EOF
fi
N
d
}
- /^\.It limitprivs$/,/^\.It/ {
- /^\.It [^l][^i][^m][^i][^t]/!d
- }
- /^\.It privs$/,/^\.It/ {
- /^\.It [^p][^r][^i][^v][^s]$/!d
- }
- /^On Solaris 10/,/^\.Pp/ {
- d
- }
+ /^\.It \(limit\)*privs$/,/is built on Solaris 10 or higher\.$/d
+ /^On Solaris 10/,/^\.Pp/d
EOF
fi
N
d
}
- /^\.It [rt][oy][lp]e$/,/^\.It/ {
- /^\.It [^rt][^oy][^lp][^e]$/!d
- }
+ /^\.It [rt][oy][lp]e$/,/is built with SELinux support\.$/d
EOF
fi
;;