Commit 7d5630ee authored by Leigh Stoller's avatar Leigh Stoller

tarfiles_setup is setuid root, but we should not enter the libarchive

code as root since it calls out to other scripts, and its not a good
idea to copy things into the archive as root anyway.
parent a0dfa4c7
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003, 2004, 2006 University of Utah and the Flux Group.
# Copyright (c) 2003, 2004, 2006, 2007 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -315,8 +315,11 @@ while (my ($URL, $localfile) = each %tofetch) {
# Now add to the archive.
#
while (my ($localfile, $ignored) = each %toarchive) {
# Lets not do this as root.
$EUID = $UID;
libArchive::TBExperimentArchiveAddFile($pid, $eid, $localfile) == 0 or
tbdie("Failed to add $localfile to the archive!");
$EUID = 0;
}
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment