26 lines
837 B
Diff
26 lines
837 B
Diff
From 8d6f3b5029b889e2865fc8ace4a2eacb56e5962a Mon Sep 17 00:00:00 2001
|
|
From: Juan RP <xtraeme@gmail.com>
|
|
Date: Sun, 17 Mar 2013 17:13:07 +0100
|
|
Subject: [PATCH] unpack: use lchown(2) to set proper uid/gid to symlinks.
|
|
|
|
---
|
|
lib/package_unpack.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/package_unpack.c b/lib/package_unpack.c
|
|
index fd19250..bf37690 100644
|
|
--- lib/package_unpack.c
|
|
+++ lib/package_unpack.c
|
|
@@ -408,7 +408,7 @@ unpack_archive(struct xbps_handle *xhp,
|
|
if ((!force && file_exists && skip_extract && (euid == 0)) &&
|
|
(((archive_entry_uid(entry) != st.st_uid)) ||
|
|
((archive_entry_gid(entry) != st.st_gid)))) {
|
|
- if (chown(entry_pname,
|
|
+ if (lchown(entry_pname,
|
|
archive_entry_uid(entry),
|
|
archive_entry_gid(entry)) != 0) {
|
|
xbps_dbg_printf(xhp,
|
|
--
|
|
1.8.1.3
|
|
|