summaryrefslogtreecommitdiff
path: root/lib/Archive/Archive.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-04-21 17:49:57 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-04-21 17:49:57 +0000
commit8e827e866176621a60f11340fd44401a0d594de7 (patch)
tree8e60f61a92f35045a3e4601eead50b3d7c6f0b95 /lib/Archive/Archive.cpp
parentcb2d1a2dc29f32a30a64cad048127c1077a83099 (diff)
Use the actual uid/gid for defaulting the fields in the archive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive/Archive.cpp')
-rw-r--r--lib/Archive/Archive.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index aa2db413852..cb8bd2dbfdd 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -14,6 +14,7 @@
#include "ArchiveInternals.h"
#include "llvm/ModuleProvider.h"
+#include "llvm/System/Process.h"
using namespace llvm;
@@ -40,8 +41,8 @@ ArchiveMember::getMemberSize() const {
ArchiveMember::ArchiveMember()
: next(0), prev(0), parent(0), path("<invalid>"), flags(0), data(0)
{
- info.user = 1000;
- info.group = 1000;
+ info.user = sys::Process::GetCurrentUserId();
+ info.group = sys::Process::GetCurrentGroupId();
info.mode = 0777;
info.fileSize = 0;
info.modTime = sys::TimeValue::now();