Commit f85631f1 authored by Chad Barb's avatar Chad Barb

Fixed column width, changed key, small changes.

parent d817ca83
......@@ -26,24 +26,26 @@ if (!isset($node_id) ||
# XXX is MODIFYINFO the correct one to check? (probably)
$isadmin = ISADMIN($uid);
if (! $isadmin) {
if (! TBNodeAccessCheck($uid, $node_id, $TB_NODEACCESS_MODIFYINFO)) {
if (! TBNodeAccessCheck($uid, $node_id, $TB_NODEACCESS_READINFO)) {
USERERROR("You do not have permission to tip to node $node_id!", 1);
}
}
$query_result = DBQueryFatal("SELECT server, portnum, keylen, keydata FROM tiplines WHERE node_id='$node_id'" );
$query_result = DBQueryFatal("SELECT server, portnum, keylen, keydata " .
"FROM tiplines WHERE node_id='$node_id'" );
if (mysql_num_rows($query_result) == 0) {
USERERROR("The node $node_id does not exist, or appear to have a tipline!", 1);
USERERROR("The node $node_id does not exist, or seem to have a tipline!", 1);
}
$filename = $node_id . ".acl";
header("Content-Type: text/testbed-acl");
header("Content-Disposition: attachment; filename=$filename;");
header("Content-Description: an ACL file which will allow access to a testbed node serial port");
header("Content-Description: ACL key file for a testbed node serial port");
# XXX, should handle multiple tip lines gracefully somehow, but not important for now.
# XXX, should handle multiple tip lines gracefully somehow,
# but not important for now.
$row = mysql_fetch_array($query_result);
$server = $row[server];
......@@ -52,24 +54,11 @@ $keylen = $row[keylen];
$keydata = $row[keydata];
# XXX fix me!!!
$certhash = "fc3749f14c074589342cd1fef8bb33169e7b3724";
$certhash = "7161bb44818e7be5a5bcd58506163e1583e6aa1c";
echo "host: $server\n";
echo "port: $portnum\n";
echo "keylen: $keylen\n";
echo "key: $keydata\n";
echo "ssl-server-cert: $certhash\n";
#
# Spit out acl with a content header.
#
#if ($fp = popen("$TBSUEXEC_PATH $uid $gid webvistopology $detailstring -z $zoom $pid $eid", "r")) {
# header("Content-type: text/testbed-acl");
# fpassthru($fp);
#}
#
# No Footer!
#
?>
\ No newline at end of file
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