Research whether we can deprecate Tom #72
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tom hosts the home directory websites.
The machine is physical and quite weak, so moving it shouldn't be a problem powerwise.However, there is a bunch of software installed on the machine, and we do not know anything about the assumptions made by users on their home websites. PHP sites or CGI scripts might assume software to be installed, or just exist in$PATH. We would need to do some research before being able to move this.EDIT:
This isn't actually a physical machine, it's a VM on Asgore. Reducing priority...
We'll need to make a tool to test how many websites we break, and try to figure out if it's only due to use of deprecated php or if it's our misconfiguration or missing software.
Maybe we should scan out every single php/cgi file in everyones home directories, and try to query them all, and see if the number of erroneous HTTP responses go up? It's not a perfect measurement, but it might make for a good indicator
Update: I created a new VM on
blossomnamedtemmie, see the nixos config repo.SLAGPLAN
Note that there is a custom script at
salt/web/apache-loggerwhich splits the logs into files in every user's homedir when such a file exists. Don't forget to add this as well.Note, there are quite a few cgi scripts with shebangs like
#!/store/bin/perl. Maybe ensure thatbinis present in/storeas wellEDIT: grepping around, seeing all of the following prefixes:
/store/bin/store/gnu/bin/usr/bin/usr/local/bin/local/bin/opt/bin/opt/local/bin/sbin/usr/sbin/usr/local/sbin/opt/sbinThese ones are kinda sus:
/var/qmail/bin(for sendmail? used surprisingly often...)/usr/drwho/local/bin/usr/local/mlog3/bin/usr/local/flite/bin/opt/flite/bin/opt/csw/bin/sw/bin/usr/sfw/bin/perl/bin/usr/local/php/bin/usr/X11R6/binThese should cover the vast majority of paths used in shebangs and cgi invocations
Looking at some of the scripts, it seems essential that the directories are read-write. There is a lot of self-modifying stuff here, and code that generates pdfs and html and whatnot
Ran the following commands to get an idea of what kinds of programs are being used in cgi scripts. Note that this is not a complete overview, there are likely many instances of dynamic concatenation of prefix + program as well as just running a program from
$PATH. There are likely also false positives, either stuff from comments, from urls (e.g.https://example.com//opt/bin/something), or whatever else. (however I dropped/binto avoid too many url mismatches).We get the following list:
Big list
Maybe it would be nice to use the chance to generate a plaintext list of all binaries present, as well as perl, php and python libraries?
There is now an initial version up and running at https://temmie.pvv.ntnu.no.
Remaining tasks are:
Performant rendering
Fill out missing packages
Other (somewhat mandatory imo tbh)
PreExecStartof httpd with a private user namespace, and share said namespace with the rendering units).salt/web/apache-loggerscript to add logs back into people's home directories (maybe don't activate it before tom is dead)sendmailbinarysendmailing that is being done from this postfix instance. (I do not trust that none of the hundreds of websites have a buggy websites that lets outsiders get unfettered access tosendmail, this could absolutely tank our mail server reputation)Optional or future plans
mod_lispfor fun and profit (very optional).We should probably consider setting up a path filter for directories such as
RCS/.git/.svn/.hg, etc