From 2b4e67ff8e8de8f91d38f54b17a1a69db81aa297 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 18 Feb 2008 15:53:33 +0000 Subject: [PATCH] Substitute in comment characters for lines partaining to login.conf, BSD auth and SELinux and only enable them if pertinent. --- sudoers.man.pl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sudoers.man.pl diff --git a/sudoers.man.pl b/sudoers.man.pl new file mode 100644 index 000000000..5eacb5b2d --- /dev/null +++ b/sudoers.man.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl -p + +BEGIN { + $t = undef; +} + +if (/^\./) { + if (/^\.I[PX].*use_loginclass/) { + $t = '@LCMAN@'; + } elsif (/^\.I[PX].*(role|type)/) { + $t = '@SEMAN@'; + } else { + $t = undef; + } +} + +# Fix up broken pod2man formatting of F<@foo@/bar> +s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g; + +# Comment out Compile-time-specific lines in DESCRIPTION +if ($t) { + $_ = $t . $_; +}