From 9d0eb248fd7965df843665dbd179bb6493f8d9c3 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Mon, 29 Jun 2009 11:29:52 -0400 Subject: [PATCH] resolve symlinks when checking path permissions Thanks to Silvio Rhatto for the patch. This should close MS bug #917 --- packaging/debian/changelog | 5 +++-- src/share/common | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packaging/debian/changelog b/packaging/debian/changelog index e8e535a..aa279a6 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,4 +1,4 @@ -monkeysphere (0.25-1~pre) UNRELEASED; urgency=low +Monkeysphere (0.25-1~pre) UNRELEASED; urgency=low * New upstream release: - update/fix the marginal ui output @@ -12,9 +12,10 @@ monkeysphere (0.25-1~pre) UNRELEASED; urgency=low - some portability improvements - properly handle translation of keys with fingerprints with leading all-zero bytes. + - resolve symlinks when checking paths (thanks Silvio Rhatto) (closes MS #917) * update Standard-Version to 3.8.1 - -- Daniel Kahn Gillmor Thu, 21 May 2009 13:04:10 -0400 + -- Jameson Graef Rollins Mon, 29 Jun 2009 11:27:33 -0400 monkeysphere (0.24-1) unstable; urgency=low 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'." -- 2.26.2