bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG: /proc/self/exe reports relative paths, should always return abs


From: Svante Signell
Subject: Re: BUG: /proc/self/exe reports relative paths, should always return absolute paths?
Date: Mon, 18 Sep 2017 19:45:39 +0200

On Sun, 2017-09-17 at 20:27 +0200, Samuel Thibault wrote:
> Hello,
> 
> Svante Signell, on ven. 15 sept. 2017 14:09:05 +0200, wrote:
> > Patch updated:
> 
> This looks good, I'll commit that, thanks!

Sadly I found a bug with the current implementation for shell scripts:

ls -l /usr/sbin/update-fmtutil 
lrwxr-xr-x 1 root root 26 Aug 17 07:38 /usr/sbin/update-fmtutil -> update-tl-
stacked-conffile

cat /usr/sbin/update-fmtutil
#!/bin/bash -e
...
progname=$(basename "$0")
echo $progname
...
if [ "$progname" = "update-updmap" ] ; then
...
elif [ "$progname" = "update-fmtutil" ] ; then
...
else
  echo "Please call me either as update-updmap or update-fmtutil!"
  exit 1
fi

sh -c /usr/sbin/update-fmtutil
 update-tl-stacked-conffile
Please call me either as update-updmap or update-fmtutil!

./test_readlink /usr/sbin/update-fmtutil
bufsize = 27
'/usr/sbin/update-fmtutil' points to 'update-tl-stacked-conffile'

In this case the link name should not be resolved. Any ideas?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]