Opened 14 years ago

Closed 14 years ago

#113 closed defect (fixed)

Django auto-installs on a machine where USER != ATHENA_USER get wrong email address

Reported by: adehnert Owned by: adehnert
Priority: minor Milestone:
Component: autoinstallers Keywords:
Cc:

Description

Currently, the Django auto-installer bakes the username of the running user into settings.py as the email address in the ADMINS variable. On a debathena-standard machine where $USER and $ATHENA_USER don't match, this will result in mail relating to your autoinstall going to $USER@… instead of $ATHENA_USER@…. This seems unfortunate.

So far as I can tell, the semantics of the "human" argument to the onserver scripts is something like "Athena username". Assuming that's the case, I think the patch below will fix this bug, though I'm not actually sure how to test it, so I haven't.

Index: locker/deploy/bin/onathena
===================================================================
--- locker/deploy/bin/onathena	(revision 1454)
+++ locker/deploy/bin/onathena	(working copy)
@@ -256,7 +256,7 @@
 fi
 cd "$origdir"
 
-vsshrun "deploy$scriptsdev/bin/$deploy" "$sname" "$deploy" "$addrend" "$admin_username" "$requires_sql" "$scriptsdev" "$USER" || die "Unknown failure during configuration"
+vsshrun "deploy$scriptsdev/bin/$deploy" "$sname" "$deploy" "$addrend" "$admin_username" "$requires_sql" "$scriptsdev" "${ATHENA_USER:-$USER}" || die "Unknown failure during configuration"
 rm -f "$lroot/web_scripts/$addrend/.scripts-tmp"
 checkfailed

Change History (4)

comment:1 Changed 14 years ago by mitchb

  • Owner set to adehnert
  • Priority changed from major to minor

I believe that change is correct. I've added you to the scripts-dev list. You should test the change by applying it to the corresponding file in /mit/scripts/deploydev/bin, and then running installers like so:

athena% env scriptsdev=dev /mit/scripts/bindev/scripts-start

Make sure to test on Solaris and Linux Athena 9, and on Debathena both with and without $ATHENA_USER==$USER. If it works, you should check it in from that directory and it'll go into the locker-dev branch for someone to merge and deploy.

comment:2 Changed 14 years ago by adehnert

Shockingly enough, this effects other auto-installers. In particular, the Trac auto-installer grants TRAC_ADMIN to the user running the install... which means that if your local user matches a real Athena user, they'll end up with those bits instead of the person actually running the auto-installer.

Anyway, I'll probably fix this tomorrow at the hackathon.

comment:3 Changed 14 years ago by adehnert

Fixed in r1511.

comment:4 Changed 14 years ago by mitchb

  • Resolution set to fixed
  • Status changed from new to closed

Merged to trunk in r1513 and deployed to the locker.

Note: See TracTickets for help on using tickets.