From 9d0eb248fd7965df843665dbd179bb6493f8d9c3 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Mon, 29 Jun 2009 11:29:52 -0400 Subject: resolve symlinks when checking path permissions Thanks to Silvio Rhatto for the patch. This should close MS bug #917 --- src/share/common | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/share') diff --git a/src/share/common b/src/share/common index 11e7969..bd887d3 100644 --- a/src/share/common +++ b/src/share/common @@ -425,6 +425,12 @@ check_key_file_permissions() { log debug "checking path permission '$path'..." + # rewrite path if it points to a symlink + if [ -h "$path" ] ; then + path=$(readlink -f "$path") + log debug "checking path symlink '$path'..." + fi + # return 255 if cannot stat file if ! stat=$(ls -ld "$path" 2>/dev/null) ; then log error "could not stat path '$path'." -- cgit v1.2.3