summaryrefslogtreecommitdiff
path: root/lib/libalpm/remove.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-04 18:02:25 -0600
committerDan McGee <dan@archlinux.org>2007-11-04 18:02:25 -0600
commitb55abdce7aebb142ce79da3aa3645afe7693a3c4 (patch)
treea19e1595cb92d4a3571a88acd76ad564fea0aead /lib/libalpm/remove.c
parent99f42d6bd2116b0bd8f75394fe92255ca1f4c80b (diff)
downloadpacman-b55abdce7aebb142ce79da3aa3645afe7693a3c4.tar.xz
libalpm: use an lstat wrapper so we never dereference dir symlinks
Linux lstat follows POSIX standards and dereferences a symlink pointing to a directory if there is a trailing slash. For purposes of libalpm, we don't want this so make a lstat wrapper that suppresses this behavior. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r--lib/libalpm/remove.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 2c8bdc49..6bbb4655 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -206,7 +206,7 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, pmtrans_t *trans)
}
}
- if(lstat(file, &buf)) {
+ if(_alpm_lstat(file, &buf)) {
_alpm_log(PM_LOG_DEBUG, "file %s does not exist\n", file);
return;
}