Ideally I think it would be good if we can add it to the "official" repo, but if not I won't be too upset. In any case I'd appreciate if you could review and let me know if anything looks missing / wrong
@AndrewSavinykh That looks quite detailed. I'll do my best comparing it to my setup. The main server also uses Fedora 24 and everything is a bit different.
Yeah, I'll make an auto-setup script to deploy a second arena.
I seem to have more time for that than I thought though. I've been measuring the server load for the last 32 hours, and apart of a few spikes, it isn't as bad as I had feared.
@AndrewSavinykh SELINUX should be set to enforcing by the way. It can't do its job when set to permissive.
@Dennis Cool, thank you for the feedback, exactly what I'm after. Never in my life used selinux so would not know. I'll test with enforced and correct as appropriate. I'm sure stuff will break if/when I do this.
@Dennis, btw, do you pull the sites directly into the serving directories? Or do you pull and copy?
The latter I'm guessing more secure, but that's not what I did
@AndrewSavinykh The thing is, you're not exactly very restricted when you SSH into a server (doing stuff from Apache would be a whole different story). Iirc, the only change I had to make was to allow sandbox_t to access proc_t. Also, runner should not have write access to either /srv or /opt. (Not sure if that is what setfacl actually does.) It also shouldn't have write access to its home directory.
@AndrewSavinykh I actually push from those directories into the repo.
Yeah, the whole purpose of the runner user is not having the required rights to make any persistent changes to the system. Home isn't that big of a deal (sandbox creates a temporary home directory anyway), but /srv and /opt would be a problem.
It sounds like there is a value in me trying to get it up and running on Fedora instead Ubuntu, so that the setup notes are compatible with real life...
@Dennis I just pushed Grime. There's a new Bash script in the repo, rungrime, that compiles Grime if needed (the executable doesn't exist or a source file is newer than it) and calls the executable with the given arguments. Is that something you can use?
Also, errors and debug messages should go to STDERR now.
@Zgarb No, runner doesn't have permission to alter the interpreter. I could run it as root once, but simply compiling Grime "manually" is just as easy.
@Dennis feature-request Some of those octave packes that can be found here as they are available in standard matlab, for my most recent answer, it would be nice to have image.
@flawr My bad. I passed -f to the Octave interpreter assuming it meant file. It's actually a shorthand for --norc though (because that totally makes sense), so package auto-loading was disabled. It should work fine now.
@Dennis Ah, right. bin_t it is then. I was not sure what is the right label. Thank you so much, I'll try that.
Do you relable all the git repos each time you pull them?
@Mego not that I'm complaining, just in case you are interested: this sounds patronizing. I believe that a professional most of the time should know what they are doing, this includes software development. It is true, that modern software systems are incredibly complex so many developers cannot be bothered to learn better even the domain they are working in.
@Mego I see it all the time in other people code. Approach to change random things until something finally work no idea why is indeed prevalent. This is not a good thing. I always strive to know my domain well so I can weight if my decision are bad or good. As far as selinux goes I have no experience in this domain, so it's a must to vet the decisions with someone who does, Dennis in this case. This is ideally how software development should work.
@Mego sorry for the "lecture" ;)
Anonymous
7:00 PM
I think you took my lighthearted humor a bit too seriously
@Dennis: TIO request: Incident. (There are also two other languages which are being used in the polyglot challenge, and thus would be convenient on TIO, Modular SNUSP and Whirl, but they both seem fairly difficult to find TIO-usable interpreters for, so those are "if it turns out to be too hard, don't worry about it" requests.)
@Dennis I'd like to see Forth on TIO, but idk which version you'd use. repl.it/languages/Forth uses JS-Forth, but that lacks some helpful functions. Ideone has gforth-0.7.2, which is better.
Ideone's interpreter also allows float literals, unlike Repl.it
@AndrewSavinykh No, the interpreters reside in /opt. Everything in there is labeled usr_t and can also be executed.
Btw, in case you're using chcon, the proper way to relabel something is semanage fcontext, followed by restorecon if the file already existed. For example, I'm using semanage fcontext -a -t sandbox_file_t '/tmp/runner\...../.*' for the temporary directories. This applies to all current and future files that match the pattern.
@Mego I set up a page that displays this kind of stats automatically. I'm quite curious myself.
@ais523 I'll look into Incident and SNUSP asap. Luckily, Fedora has darcs in its repos. My desktop distro does not.
@mbomb007 I'll use whichever interpreter you think is better. Fedora has gforth 0.7.3 in its repos.
@Dennis Yep, I already figured out the part about semanage and fcontextbut was not sure if you can do it on top level once and then copy or not. Thank you for explaining this, and providing your command, that really helps. I'll make sure to use it
@Dennis Too bad you can't have a union of the two. If choosing just one, I'd prefer gforth 0.7.3. It's almost always better. One of the only things I remember being better about JS-Forth is that it has >> and << as aliases for rshift and lshift.