view ifndef_wrapper.sh @ 1732:2f5d797d9811

Don't choke on disabled authorized_keys(5) options As of 2020.79 X11 forwarding is disabled at build time, which could lock out users with authorized_keys(5) files containing ‘no-X11-forwarding’ options.
author Guilhem Moulin <guilhem@debian.org>
date Fri, 26 Jun 2020 20:56:03 +0800
parents 0196f4f83fee
children
line wrap: on
line source

#!/bin/sh

# Wrap all "#define X Y" with a #ifndef X...#endif"

sed 's/^\( *#define \([^ ][^ ]*\) .*\)/#ifndef \2\
\1\
#endif/'