Commit 94d33158 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Changes for new tbacct script and command line usage. Other minor

changes to the mail notification.
parent 4ec35f3f
......@@ -126,19 +126,16 @@ TBMAIL("$targuid_name <$targuid_email>",
"Thanks,\n".
"Testbed Operations\n",
"From: $uid_name <$uid_email>\n".
"Cc: $TBMAIL_AUDIT\n".
"Bcc: $TBMAIL_AUDIT\n".
"Errors-To: $TBMAIL_WWW");
DBQueryFatal("delete from user_pubkeys ".
"where uid='$target_uid' and comment='$key'");
DBQueryFatal("update users set usr_modified=now() ".
"where uid='$target_uid'");
#
# mkacct updates the user pubkeys.
#
MKACCT($uid, "webmkacct $target_uid");
# update authkeys files and nodes.
#
ADDPUBKEY($uid, "webaddpubkey -w $addpubkeyargs");
header("Location: showpubkeys.php3?target_uid=$target_uid");
......
......@@ -127,19 +127,21 @@ TBMAIL("$targuid_name <$targuid_email>",
"Thanks,\n".
"Testbed Operations\n",
"From: $uid_name <$uid_email>\n".
"Cc: $TBMAIL_AUDIT\n".
"Bcc: $TBMAIL_AUDIT\n".
"Errors-To: $TBMAIL_WWW");
DBQueryFatal("delete from user_sfskeys ".
"where uid='$target_uid' and comment='$key'");
DBQueryFatal("update users set usr_modified=now() ".
"where uid='$target_uid'");
#
# mkacct updates the keys.
#
MKACCT($uid, "webmkacct -f $target_uid");
# update sfs_users files and nodes if appropriate.
#
if (HASREALACCOUNT($uid)) {
SUEXEC($uid, "nobody", "webaddsfskey -w $target_uid", 0);
}
else {
SUEXEC("nobody", "nobody", "webaddsfskey -w $target_uid", 0);
}
header("Location: showsfskeys.php3?target_uid=$target_uid");
......
......@@ -298,12 +298,10 @@ if (ADDPUBKEY($uid, "webaddpubkey -n $addpubkeyargs")) {
PAGEFOOTER();
return;
}
ADDPUBKEY($uid, "webaddpubkey $addpubkeyargs");
#
# mkacct updates the user pubkeys in ~ssh/authorized_keys.
# Insert key, update authkeys files and nodes if appropriate.
#
MKACCT($uid, "webmkacct $target_uid");
ADDPUBKEY($uid, "webaddpubkey $addpubkeyargs");
header("Location: showpubkeys.php3?target_uid=$target_uid&finished=1");
?>
......@@ -275,9 +275,6 @@ if (count($errors)) {
DBQueryFatal("replace into user_sfskeys ".
"values ('$target_uid', '$comment', '$usr_key', now())");
DBQueryFatal("update users set usr_modified=now() ".
"where uid='$target_uid'");
#
# Audit
#
......@@ -295,13 +292,18 @@ TBMAIL("$targuid_name <$targuid_email>",
"Thanks,\n".
"Testbed Operations\n",
"From: $uid_name <$uid_email>\n".
"Cc: $TBMAIL_AUDIT\n".
"Bcc: $TBMAIL_AUDIT\n".
"Errors-To: $TBMAIL_WWW");
#
# mkacct arranges for nodes to be updated.
# update sfs_users files and nodes if appropriate.
#
MKACCT($uid, "webmkacct -f $target_uid");
if (HASREALACCOUNT($uid)) {
SUEXEC($uid, "nobody", "webaddsfskey -w $target_uid", 0);
}
else {
SUEXEC("nobody", "nobody", "webaddsfskey -w $target_uid", 0);
}
header("Location: showsfskeys.php3?target_uid=$target_uid&finished=1");
?>
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