PBP: 045 Barewords

October 2nd, 2014

Perl supports “barewords”, which are strings that just sit naked in your program.  If it isn’t parsable code, it’s a bareword.  The PBP says: Don’t.  I agree, as does ‘use strict’, which I always use. Read the rest of this entry »

PBP: 044 Heredoc Quoters

September 29th, 2014

The PBP suggests that all heredocs be explicitly and deliberately quoted.  When I first read this, I didn’t know you could do that!  It’s a great idea. Read the rest of this entry »

systemd: Failed at step NAMESPACE spawning …: Operation not permitted

September 25th, 2014

If systemd refuses to start a service, and gives you a message like this:

Sep 25 17:22:11 mus systemd[1234]: Failed at step NAMESPACE spawning /usr/bin/whatever: Operation not permitted

… then you might have a symlink as your /var/tmp.  Make it a real directory, or mount -o bind /tmp onto it.  Then systemd can work.  (In /etc/fstab, add a line, “/tmp /var/tmp ext3 rbind defaults,rbind 0 3”, where the final 3 is a number higher than your /tmp and /var mount at.  I fully expect this to confuse SuSE’s upgrader later, but I can deal with that then.)

This only happens if something uses the

PrivateTmp=true

option in the service file.

SuSE’s exim does this.  Others do it for CUPS or httpd.

Once again, systemd comes along and screws up a working system, and provides no feedback about what or why or how.  This time searching the Internet wasn’t even useful.  I’m so glad I found this bug.

The author (in a post I can not now find) says, “I see no reason to support /var/tmp as a symlink.”  Lucky you!  I do!  What is the reason not to, and is it worth breaking Linux machines that have run for years this way?

Why, you ask, do you want a symlink for /var/tmp?

I don’t want to create a second /tmp partition.  I use a separate partition for /tmp, so I can set nodev,noexec,nosuid on it.  I’ve had security problems in the past from things executing a payload on /tmp – never again.  It’s saved me more than once now.

I want /var/tmp to get that same protection, so it’s a symlink.  Symlinks are standard Unix stuff, they’re well understood and work for simple things like this.

So, not only did you break a validly configured system because you’re a bunch of thoughtless, inexperienced jerks, you gave the world’s most useless error message in doing so!

I really want to like systemd.  I think it’s trying to do good things.  But the people around it, and the complete lack of availability of information it gives you are making that very, very hard.  OpenBSD is looking better and better.

PBP: 043 Heredoc Terminators

September 25th, 2014

Mr. Conway suggests making all heredoc terminators single uppercase identifiers which start with a standard prefix.  This is part of naming things regularly, and I support it. Read the rest of this entry »

Writing 2014-06-17

September 23rd, 2014

hw20140923-01.jpg Read the rest of this entry »

Writing 2014-06-16

September 23rd, 2014

hw20140922-01.jpg Read the rest of this entry »

Writing 2014-06-15

September 23rd, 2014

hw20140921-01.jpg Read the rest of this entry »

Writing 2014-06-14

September 23rd, 2014

hw20140920-01.jpg Read the rest of this entry »

Writing 2014-06-13

September 23rd, 2014

hw20140919-01.jpg Read the rest of this entry »

Writing 2014-06-12

September 23rd, 2014

hw20140918-01.jpg Read the rest of this entry »