Commit baba7478 authored by Mike Hibler's avatar Mike Hibler

Revert "Adjust the set of unix gids used for a download server."

This reverts commit fc89eb38.

Checked in a bunch of crap that was unrelated.
parent fc89eb38
...@@ -1076,7 +1076,6 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host, ...@@ -1076,7 +1076,6 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host,
" ORDER BY pid,gid,imagename", " ORDER BY pid,gid,imagename",
5, ei->pid, ei->gid); 5, ei->pid, ei->gid);
} }
assert(res != NULL);
/* Construct the list of "pid/imagename" imageids */ /* Construct the list of "pid/imagename" imageids */
nrows = mysql_num_rows(res); nrows = mysql_num_rows(res);
...@@ -1157,25 +1156,23 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host, ...@@ -1157,25 +1156,23 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host,
if (imageid != NULL) { if (imageid != NULL) {
/* Interested in a specific image */ /* Interested in a specific image */
res = mydb_query("SELECT pid,gid,imagename,path,imageid,pid_idx,gid_idx" res = mydb_query("SELECT pid,gid,imagename,path,imageid"
" FROM images" " FROM images"
" WHERE (global=1" " WHERE (global=1"
" OR (pid='%s' AND (gid='%s' OR shared=1)))" " OR (pid='%s' AND (gid='%s' OR shared=1)))"
" AND pid='%s' AND imagename='%s'" " AND pid='%s' AND imagename='%s'"
" ORDER BY pid,gid,imagename", " ORDER BY pid,gid,imagename",
7, ei->pid, ei->gid, 5, ei->pid, ei->gid,
wantpid, wantname); wantpid, wantname);
} else { } else {
/* Find all images that this pid/gid can GET */ /* Find all images that this pid/gid can GET */
res = mydb_query("SELECT pid,gid,imagename,path,imageid,pid_idx,gid_idx" res = mydb_query("SELECT pid,gid,imagename,path,imageid"
" FROM images" " FROM images"
" WHERE (global=1" " WHERE (global=1"
" OR (pid='%s' AND (gid='%s' OR shared=1)))" " OR (pid='%s' AND (gid='%s' OR shared=1)))"
" ORDER BY pid,gid,imagename", " ORDER BY pid,gid,imagename",
7, ei->pid, ei->gid); 5, ei->pid, ei->gid);
} }
assert(res != NULL);
/* Construct the list of "pid/imagename" imageids */ /* Construct the list of "pid/imagename" imageids */
nrows = mysql_num_rows(res); nrows = mysql_num_rows(res);
if (nrows) if (nrows)
...@@ -1188,7 +1185,6 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host, ...@@ -1188,7 +1185,6 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host,
struct config_imageinfo *ci; struct config_imageinfo *ci;
struct stat sb; struct stat sb;
char *iid; char *iid;
int igids[2];
row = mysql_fetch_row(res); row = mysql_fetch_row(res);
/* XXX ignore rows with null or empty info */ /* XXX ignore rows with null or empty info */
...@@ -1196,9 +1192,7 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host, ...@@ -1196,9 +1192,7 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host,
!row[1] || !row[1][0] || !row[1] || !row[1][0] ||
!row[2] || !row[2][0] || !row[2] || !row[2][0] ||
!row[3] || !row[3][0] || !row[3] || !row[3][0] ||
!row[4] || !row[4][0] || !row[4] || !row[4][0])
!row[5] || !row[5][0] ||
!row[6] || !row[6][0])
continue; continue;
iid = mymalloc(strlen(row[0]) + strlen(row[2]) + 2); iid = mymalloc(strlen(row[0]) + strlen(row[2]) + 2);
strcpy(iid, row[0]); strcpy(iid, row[0]);
...@@ -1217,61 +1211,14 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host, ...@@ -1217,61 +1211,14 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host,
} else } else
ci->sig = NULL; ci->sig = NULL;
ci->uid = ei->suid; ci->uid = ei->suid;
/* /*
* Find the unix gids to use for any server process. * XXX note that we don't really need all of the
* This includes the gid of the image's project and * swapper's GIDs here, we could just include the
* any subgroup gid if the image is associated with * project and any group GID for the image.
* one. If for any reason we don't come up with
* these gids, we use the gids for the swapper of
* the experiment.
*
* XXX we could probably combine the lookup of these
* gids with the query above, but it doesn't really
* seem worth it.
*/ */
igids[0] = igids[1] = -1; for (j = 0; j < ei->ngids; j++)
{ ci->gids[j] = ei->sgids[j];
MYSQL_RES *res2; ci->ngids = ei->ngids;
MYSQL_ROW row2;
int nrows2, pidx, gidx;
pidx = atoi(row[5]);
gidx = atoi(row[6]);
res2 = mydb_query("SELECT unix_gid"
" FROM groups"
" WHERE pid_idx=%d AND"
" (gid_idx=pid_idx OR"
" gid_idx=%d)",
1, pidx, gidx);
assert(res2 != NULL);
nrows2 = mysql_num_rows(res2);
if (nrows2 > 0) {
row2 = mysql_fetch_row(res2);
if (row2[0] && row2[0][0])
igids[0] = atoi(row2[0]);
if (nrows2 > 1) {
row2 = mysql_fetch_row(res2);
if (row2[0] && row2[0][0])
igids[1] =
atoi(row2[0]);
}
}
mysql_free_result(res2);
}
if (igids[0] > 0) {
ci->gids[0] = igids[0];
ci->ngids = 1;
if (igids[1] > 0) {
ci->gids[1] = igids[1];
ci->ngids++;
}
} else {
for (j = 0; j < ei->ngids; j++)
ci->gids[j] = ei->sgids[j];
ci->ngids = ei->ngids;
}
set_get_values(get, get->numimages); set_get_values(get, get->numimages);
ii = mymalloc(sizeof *ii); ii = mymalloc(sizeof *ii);
ii->DB_imageid = atoi(row[4]); ii->DB_imageid = atoi(row[4]);
......
...@@ -6,12 +6,6 @@ ...@@ -6,12 +6,6 @@
/* /*
* Network routines. * Network routines.
*
* WINDOWS specific hacks (according to
* http://support.microsoft.com/default.aspx?scid=kb;en-us;131978):
*
* - cannot disable local echo with IP_MULTICAST_LOOP
*
*/ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
......
...@@ -72,10 +72,10 @@ endif ...@@ -72,10 +72,10 @@ endif
# #
WITH_FFS = 1 WITH_FFS = 1
WITH_EXTFS = 1 WITH_EXTFS = 1
WITH_EXT4FS = 0
WITH_NTFS = @WINSUPPORT@ WITH_NTFS = @WINSUPPORT@
WITH_FAT = @WINSUPPORT@ WITH_FAT = @WINSUPPORT@
WITH_HASH = 0 WITH_HASH = 0
WITH_EXT4FS = 0
include $(OBJDIR)/Makeconf include $(OBJDIR)/Makeconf
...@@ -153,8 +153,7 @@ endif ...@@ -153,8 +153,7 @@ endif
# Once proven, switch to 2.0.0. # Once proven, switch to 2.0.0.
# #
ifndef NTFSVER ifndef NTFSVER
#NTFSVER = 1.7.1 NTFSVER = 1.7.1
NTFSVER = 2.0.0
endif endif
export NTFSVER export NTFSVER
......
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group. # Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -18,9 +18,9 @@ all: libext4fs.a ...@@ -18,9 +18,9 @@ all: libext4fs.a
include $(TESTBED_SRCDIR)/GNUmakerules include $(TESTBED_SRCDIR)/GNUmakerules
OBJS = extfs.o reloc_lilo.o OBJS = ext4fs.o reloc_lilo.o
extfs.o: $(MAINDIR)/sliceinfo.h $(MAINDIR)/global.h ext4fs.o: $(MAINDIR)/sliceinfo.h $(MAINDIR)/global.h
reloc_lilo.o: $(MAINDIR)/sliceinfo.h $(MAINDIR)/global.h $(MAINDIR)/imagehdr.h reloc_lilo.o: $(MAINDIR)/sliceinfo.h $(MAINDIR)/global.h $(MAINDIR)/imagehdr.h
libext4fs.a: $(OBJS) libext4fs.a: $(OBJS)
......
...@@ -65,7 +65,6 @@ int level = 4; ...@@ -65,7 +65,6 @@ int level = 4;
long dev_bsize = 1; long dev_bsize = 1;
uint32_t compat = 0; uint32_t compat = 0;
int frangesize= 64; /* 32k */ int frangesize= 64; /* 32k */
int zerofrange= 0;
int forcereads= 0; int forcereads= 0;
int badsectors= 0; int badsectors= 0;
int retrywrites= 1; int retrywrites= 1;
...@@ -404,7 +403,7 @@ main(int argc, char *argv[]) ...@@ -404,7 +403,7 @@ main(int argc, char *argv[])
memset(imageid, UUID_LENGTH, '\0'); memset(imageid, UUID_LENGTH, '\0');
gettimeofday(&sstamp, 0); gettimeofday(&sstamp, 0);
while ((ch = getopt(argc, argv, "vlbnNdihrs:c:z:ofI:13F:DR:S:XH:Me:k:u:a:Z")) != -1) while ((ch = getopt(argc, argv, "vlbnNdihrs:c:z:ofI:13F:DR:S:XH:Me:k:u:a:")) != -1)
switch(ch) { switch(ch) {
case 'v': case 'v':
version++; version++;
...@@ -472,9 +471,6 @@ main(int argc, char *argv[]) ...@@ -472,9 +471,6 @@ main(int argc, char *argv[])
if (frangesize < 0) if (frangesize < 0)
usage(); usage();
break; break;
case 'Z':
zerofrange = 1;
break;
case 'X': case 'X':
forcereads++; forcereads++;
break; break;
...@@ -1180,20 +1176,6 @@ dumpskips(int verbose) ...@@ -1180,20 +1176,6 @@ dumpskips(int verbose)
#undef DOHISTO #undef DOHISTO
/*
* Zero the data associated with a free range that is being included
* in the image because its size is less than frangesize.
*/
static void
zerofixup(void *bstart, off_t bsize, void *fdata)
{
if (debug > 1)
fprintf(stderr, "zerofixup: zeroing %llu@%p\n",
(unsigned long long)bsize, bstart);
memset(bstart, 0, bsize);
}
/* /*
* Sort and merge the list of skip blocks. * Sort and merge the list of skip blocks.
* This code also winnows out the free ranges smaller than frangesize. * This code also winnows out the free ranges smaller than frangesize.
...@@ -1227,12 +1209,6 @@ mergeskips(int verbose) ...@@ -1227,12 +1209,6 @@ mergeskips(int verbose)
"dropping range [%u-%u]\n", "dropping range [%u-%u]\n",
prange->start, prange->start,
prange->start+prange->size-1); prange->start+prange->size-1);
if (zerofrange)
addfixupfunc(zerofixup,
sectobytes(prange->start),
0,
sectobytes(prange->size),
NULL, 0, RELOC_NONE);
total += prange->size; total += prange->size;
#ifdef DOHISTO #ifdef DOHISTO
if (prange->size < 64) if (prange->size < 64)
......
rspec-geni @ 35408bf7
Subproject commit 2fddf0990a12a0b33b02752fb77b3a79427cabad Subproject commit 35408bf756041ab0664849993aeef02fd681e8c1
...@@ -32,6 +32,7 @@ use Carp; ...@@ -32,6 +32,7 @@ use Carp;
use POSIX; use POSIX;
use XML::LibXML; use XML::LibXML;
use XML::Simple; use XML::Simple;
use GeniHRN;
# Configure variables # Configure variables
my $TB = "@prefix@"; my $TB = "@prefix@";
...@@ -44,12 +45,7 @@ my $DELAYCAPACITY = @DELAYCAPACITY@; # Can be overridden by user. ...@@ -44,12 +45,7 @@ my $DELAYCAPACITY = @DELAYCAPACITY@; # Can be overridden by user.
my $DELAYTHRESH = @DELAYTHRESH@; my $DELAYTHRESH = @DELAYTHRESH@;
my $PGENISUPPORT = @PROTOGENI_SUPPORT@; my $PGENISUPPORT = @PROTOGENI_SUPPORT@;
my $OURDOMAIN = "@OURDOMAIN@"; my $OURDOMAIN = "@OURDOMAIN@";
my $mycmurn; my $mycmurn = GeniHRN::Generate("@OURDOMAIN@", "authority", "cm");
if ($PGENISUPPORT) {
require GeniHRN;
$mycmurn = GeniHRN::Generate("@OURDOMAIN@", "authority", "cm");
}
# Flags. # Flags.
$VTOP_FLAGS_VERBOSE = 0x01; $VTOP_FLAGS_VERBOSE = 0x01;
......
...@@ -286,7 +286,7 @@ if ($MAILMANSUPPORT && !$isnonlocal) { ...@@ -286,7 +286,7 @@ if ($MAILMANSUPPORT && !$isnonlocal) {
} }
# Skip if user was already an active user; lots of work avoided. # Skip if user was already an active user; lots of work avoided.
if (1 || !$wasactive) { if (!$wasactive) {
system("$MKACCT $leader_uid") == 0 or system("$MKACCT $leader_uid") == 0 or
fatal("$MKACCT $leader_uid failed!"); fatal("$MKACCT $leader_uid failed!");
} }
......
...@@ -371,6 +371,8 @@ if ($PGENISUPPORT) { ...@@ -371,6 +371,8 @@ if ($PGENISUPPORT) {
require GeniHRN; require GeniHRN;
} }
use GeniHRN;
sub usage() sub usage()
{ {
print("Usage: ptopgen [-v] [-s switch] [-p pid [-e eid]] [-m factor] " . print("Usage: ptopgen [-v] [-s switch] [-p pid [-e eid]] [-m factor] " .
......
#!/bin/sh #!/bin/sh
#
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2010-2011 University of Utah and the Flux Group. # Copyright (c) 2010 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
#
MP=`which modprobe` MP=`which modprobe`
KILLALL=`which killall` KILLALL=`which killall`
...@@ -13,35 +12,16 @@ TMCC=`which tmcc` ...@@ -13,35 +12,16 @@ TMCC=`which tmcc`
SLEEPTIME=1 SLEEPTIME=1
# Error check later # Error check later
echo "Doing TPM setup ..."
/etc/testbed/rc/rc.tpmsetup /etc/testbed/rc/rc.tpmsetup
${MP} tpm_tis ${MP} tpm_tis
${KILLALL} -9 tcsd; sleep ${SLEEPTIME} ${KILLALL} -9 tcsd; sleep ${SLEEPTIME}
${TCSD} ${TCSD}
echo "Requesting info for RELOADSETUP quote ..." SSCRUFT=`${TMCC} quoteprep RELOADSETUP | ${DOQ} RELOADSETUP`
QINFO=`${TMCC} quoteprep RELOADSETUP` ${TMCC} securestate ${SSCRUFT}
if [ -z "$QINFO" ]; then
echo "*** could not get RELOADSETUP quote info"
exit 1
fi
echo "Preparing RELOADSETUP quote ..."
SSCRUFT=`echo $QINFO | ${DOQ} RELOADSETUP`
if [ -z "$SSCRUFT" ]; then
echo "*** could not produce RELOADSETUP quote"
exit 1
fi
echo "Sending RELOADSETUP quote ..."
RC=`${TMCC} securestate ${SSCRUFT}`
if [ $? -ne 0 -o "$RC" = "FAILED" ]; then
echo "*** could not transition to RELOADSETUP"
exit 1
fi
${KILLALL} -9 tcsd; sleep ${SLEEPTIME} ${KILLALL} -9 tcsd; sleep ${SLEEPTIME}
${TCSD} ${TCSD}
${TMCC} -T imagekey > /tmp/secureloadinfo.out
exit 0
#!/bin/sh #!/bin/sh
#
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2010-2011 University of Utah and the Flux Group. # Copyright (c) 2010 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
#
KILLALL=`which killall` KILLALL=`which killall`
TCSD=`which tcsd` TCSD=`which tcsd`
...@@ -16,7 +15,6 @@ REBOOTPCR=15 ...@@ -16,7 +15,6 @@ REBOOTPCR=15
# Error check later # Error check later
echo "Setting sign-off PCR ..."
${KILLALL} -9 tcsd; sleep ${SLEEPTIME} ${KILLALL} -9 tcsd; sleep ${SLEEPTIME}
${TCSD} ${TCSD}
${TPMS} ${REBOOTPCR} ${TPMS} ${REBOOTPCR}
...@@ -24,25 +22,6 @@ ${TPMS} ${REBOOTPCR} ...@@ -24,25 +22,6 @@ ${TPMS} ${REBOOTPCR}
${KILLALL} -9 tcsd; sleep ${SLEEPTIME} ${KILLALL} -9 tcsd; sleep ${SLEEPTIME}
${TCSD} ${TCSD}
echo "Requesting info for TPMSIGNOFF quote ..." SSCRUFT=`${TMCC} quoteprep TPMSIGNOFF | ${DOQ} TPMSIGNOFF`
QINFO=`${TMCC} quoteprep TPMSIGNOFF` ${TMCC} securestate ${SSCRUFT}
if [ -z "$QINFO" ]; then
echo "*** could not get TPMSIGNOFF quote info"
exit 1
fi
echo "Preparing TPMSIGNOFF quote ..."
SSCRUFT=`echo $QINFO | ${DOQ} TPMSIGNOFF`
if [ -z "$SSCRUFT" ]; then
echo "*** could not produce TPMSIGNOFF quote"
exit 1
fi
echo "Sending TPMSIGNOFF quote ..."
RC=`${TMCC} securestate ${SSCRUFT}`
if [ $? -ne 0 -o "$RC" = "FAILED" ]; then
echo "*** could not transition to TPMSIGNOFF"
exit 1
fi
exit 0
...@@ -703,11 +703,6 @@ sub check_progress($$) ...@@ -703,11 +703,6 @@ sub check_progress($$)
{ {
my (undef, $statusp) = @_; my (undef, $statusp) = @_;
if ($runticks == 0) {
print "$node_id: started image capture, ".
"waiting up to " . int($maxwait/60) . " minutes\n";
}
# #
# XXX frisbee uploader uploads into a temporary file and then moves # XXX frisbee uploader uploads into a temporary file and then moves
# it into place. So track that tmp file here. # it into place. So track that tmp file here.
...@@ -722,7 +717,7 @@ sub check_progress($$) ...@@ -722,7 +717,7 @@ sub check_progress($$)
# #
if (defined($statusp) && $statusp->{$node_id} ne "none") { if (defined($statusp) && $statusp->{$node_id} ne "none") {
$result = $statusp->{$node_id}; $result = $statusp->{$node_id};
print "$node_id: image capture has completed: status='$result'\n"; print "$node_id: image capture has completed\n";
return 0; return 0;
} }
...@@ -732,7 +727,6 @@ sub check_progress($$) ...@@ -732,7 +727,6 @@ sub check_progress($$)
$runticks++; $runticks++;
if ($runticks >= $maxticks) { if ($runticks >= $maxticks) {
$result = "timeout"; $result = "timeout";
print "$node_id: image capture has completed: timeout\n";
return 0; return 0;
} }
...@@ -755,14 +749,12 @@ sub check_progress($$) ...@@ -755,14 +749,12 @@ sub check_progress($$)
} }
if ($cursize > $maximagesize) { if ($cursize > $maximagesize) {
$result = "toobig"; $result = "toobig";
print "$node_id: image capture has completed: image too big\n";
return 0; return 0;
} }
if ($cursize == $lastsize) { if ($cursize == $lastsize) {
$idleticks++; $idleticks++;
if ($idleticks >= $maxidleticks) { if ($idleticks >= $maxidleticks) {
$result = "timeout"; $result = "timeout";
print "$node_id: image capture has completed: idle timeout\n";
return 0; return 0;
} }
} else { } else {
...@@ -772,8 +764,7 @@ sub check_progress($$) ...@@ -772,8 +764,7 @@ sub check_progress($$)
if (($runticks % $reportticks) == 0) { if (($runticks % $reportticks) == 0) {
my $curtdiff = int($runticks * $checkwait / 60); my $curtdiff = int($runticks * $checkwait / 60);
print "$node_id: still waiting ...". print "Still waiting ... its been ". $curtdiff ." minutes.".
" it has been ". $curtdiff ." minutes.".
" Current image size: $cursize bytes.\n"; " Current image size: $cursize bytes.\n";
} }
......
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