On Fri, 2021-10-15 at 10:15 +0200, Michael wrote:
> everything seems to be fine. but since i don't like warnings and i
> like my './' in front of filenames, i dared to investigate, and
> looking at '/etc/postfix/postfix-script' i see:
> 
> find $todo -type l | while read f; do \
>   readlink "$f" | grep -q / && $WARN symlink leaves directory: "$f";
> \
> done; \
> 
> maybe an additional
> 
>   sed 's/^.\///'
> 
> would do the trick?

Wholesale suppression of warnings is generally a bad idea. Especially
when they are security-related. Better to suppress your irritation :-)

Alternatively, maybe change the check to something like:

   X=`readlink "$f"`
   echo "$X" |                             \
      grep "SYMLINK_OK" ||                 \
      echo "$X" grep -q / && $WARN [...]

Then put a comment line with "SYMLINK_OK" in any file you don't want to
be bugged about. That's off the top of my head so may be wrong (in
particular check precedence, I think and binds tighter than or?) but
you get the idea. 

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (ka...@biplane.com.au)
http://www.biplane.com.au/kauer

GPG fingerprint: 61A0 99A9 8823 3A75 871E 5D90 BADB B237 260C 9C58
Old fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170



Reply via email to