mcrapet / plowshare

Command-line tool and engine for managing sharing websites
GNU General Public License v3.0
847 stars 89 forks source link

core: follow symlink for check of plowshare.conf #95

Closed jfrankenau closed 7 years ago

jfrankenau commented 7 years ago

When ~/.config/plowshare/plowshare.conf is a symbolic link in order to check file permissions, we have to dereference it. Otherwise the security check is errorneously made on on the symbolic link itself although only the permissions of the real file are of interest.

mcrapet commented 7 years ago

Greetings,

I don't know if having symbolic link is a good idea. Anyway, recreate your PR using -L (short option) it's BSD friendly. See issue #18 for more details.

Regards, Matthieu

jfrankenau commented 7 years ago

I have amended the pull request to make it work with BSD systems.

I like to have my dotfiles in version control and simply symlink them to their original locations during deployment. As this patch works with both regular files and files behind symlinks this shouldn't introduce any regressions.

mcrapet commented 7 years ago

Applied. Thanks.