Archive for June, 2008

US drink-driving nonsense

Monday, June 30th, 2008

So I saw a commercial yet again tonight advocating that “it’s easy to tell when you’ve had way too many, but what about one too many?”, and “buzz driving is drunk driving”, typical of the tendency in US society towards tolerance of drinking any alcohol before driving a vehicle.

You notice this quite quickly after living in the US for a while. Whereas in many parts of Europe the government warning messages will take a hard line that drinking and driving don’t mix (in the UK, these commercials (UK: “adverts”) can be very graphic in nature, showing actual car crash scenarios – complete with the reality of injury and death), here in the States, people will far more readily drink one or two beers before driving home/wherever. And government warnings follow this trend – they’ll advise you not to drink too much, not to be “over the limit”, but they won’t state Common Sense:

Any alcohol is too much alcohol when driving a vehicle.

I have a simple rule. It’s really very simple, and I wish more people would consider adhering to it also (though I’m not trying to preach to my friends, just the populous in general really). I don’t drink and drive. This means I don’t drink *any* alcohol before driving a vehicle (car or otherwise). Not “just one beer”, but “just no beer”. Yes, this often means that I don’t drink – in case you’ve ever been out with me and wondered why I tend to avoid drinking these days, it’s likely because I might be driving later on. Ordinarily, this means that I will only drink on the weekend, in town, on an evening after I’m done driving for the day. Sometimes, I’ll have a drink or two on a trip, if I’m staying at a hotel and taking some form of alternate transportation.

Now I’m perfectly aware that the configuration of many US towns outside of major urban areas doesn’t lend itself to this philosophy – in a town where the layout relies upon driving yourself home, you’re going to have to use a vehicle somewhere, but that’s what friends are for, and taxis, and liquor stores (UK: “off licenses”) for the purchasing of beverages intended for home consumption. There is no reason to drink a beer and drive home, although I see this happening all the time.

I wish the US would stop caring so much about carding (UK: “IDing”) – “we card because we care” – grandmothers and everyone under 35, stop frivolously wasting taxpayer money prosecuting and ruining the lives of people over 18 (who can legally serve in the army but not buy a beer), and instead focus efforts on educating people as to the dangers of drinking and driving, not “drinking too much and driving”. It’s really very simple to get this right, but will probably never happen.

Jon.

I love SELinux (part III)

Friday, June 27th, 2008

So today, I allowed my laptop to upgrade to the latest F9 packages. Shortly afterward, VPNC could no longer run its connection script to connect to my corporate VPN connection.

I looked for an AVC denial message in my GNOME notification area (it was only later that I’d be paranoid and check that the sealert and friends were actually being allowed to run, which they were), but there was none. And none of the system logs readily showed any SELinux problem, so I decided it wasn’t time to Just Blame SELinux. A half hour of hacking at the VPNC script later, and getting confused why the commands within that script would run via sudo but didn’t seem to be running when called by VPNC, and I had myself an answer. Obviously it must be SELinux at fault, somehow, somewhere, sometime.

Calling setenforce 0 before running VPNC results in no errors and the VPN comes up just fine, whereas turning SELinux back on immediately results in a failure to run the connection script. The RPM itself reports context information that is consistent with that on the actual files, and again, there are no denial messages being reported – running sealert manually would seem to confirm this, and there are no messages in obvious log files. So it comes down to this: something is broken in F9, I can’t yet determine where it is, but a simple update has resulted in SELinux causing yet more pain that it’s ever possibly worth.

I’ve almost learned my lesson. I listened to certain people when they suggested that using SELinux was a great idea, and that doing this on F9 is super cool because it wouldn’t get in the way, and that it’s all great because we can protect ourselves from ourselves and our own evil actions. But all these people have forgotten one minor point – SELinux policy is so complex and/that we get these random failures. This is a highly undesirable user experience for a desktop. I’m about ready, once again, to hurtle SELinux out of the window as far as humanly possible. Way too overly intrusive to be actually useful.

Yes, I’m sure there’s a BZ somewhere, and I could just wait for another set of package updates that I’m sure will resynchronize policy with package, but let’s please notice that in the meantime, Joe User has long since given up and gone out to play with Little Billy and his friends. I’m trying to write these entries here to convey the undesirable user experience, and not whether I personally know enough to work around it. The average Fedora/Linux user doesn’t have 14 years of experience at dealing with this kind of thing.

Time for some (decaf) coffee.

Jon.

I love SELinux (part II)

Wednesday, June 25th, 2008

So yesterday’s post apparently got a little interest – mostly positive, insomuch as it’s realized that there are a few issues. But wait! There’s more! Call in the next 10 minutes and we’ll super extra double size your order!

Tonight, I decided to install a virtual machine containing a copy of the latest experimental Ubuntu (that’s known as “Ubuntu unstable”). To do this, I decided to install Hardy Heron via a CD image (bootstrap via ISO) and then perform an upgrade to the experimental release (dist-upgrade using apt). I downloaded a CD image from the MIT Media Lab using Firefox, then fed this into virt-manager. It failed, with a nice backtrace.

Now, this would seem to be the kind of activity that many people would want to undertake. Downloading images, booting them inside a virtual machine manager, and then using the resultant virtual machine image. But more than just that, what I wanted to do wasn’t exactly rocket science – skip the virtualization bit if that makes you think this is complex, I’m just talking about downloading a CD image and using it somehow.

The reason this activity failed was because of the SELinux configuration. The CD image Firefox had downloaded was in a temporary file download context, living in my Download directory, whereas virt-manager is not allowed to read from this kind of file until you’ve blessed it with a magical incantation of chcon. So, in this case, the “Microsoft Windows Vista” approach to security won out – get in the way so much that the user is quickly driven to distraction and inclined to turn it off. As I am, almost. After precisely one day of using SELinux in enforcing mode on a laptop (which has an encrypted disk and is only used by me) I’m about ready to throw it away…I’d hate to be an end user trying to manage this stuff.

No, this isn’t just like moving to UNIX permissions and groups. With the former, everything is well documented and widely understood already, but more importantly, there are nice tools to manage them. For example, right clicking on the file in the graphical file management application (nautilus) allows one to do many things, including viewing the SELinux context, but not actually changing this. I can’t find a nice pretty way for users to do this without having to grep through the policy files (to find out what the context should be) and then run other commands from the console. The point is, it’s a bit early in the game to have such complex policies with crazy numbers of contexts if users can’t easily manage this stuff. They need to be able to fix the problem too.

I tried to stop always blaming SELinux for everything by forcing myself to actually use it, but I’m beginning to regret this decision.

Jon.

On hitting cows, and credit card rental coverage

Tuesday, June 24th, 2008

So as you may know, I hit a cow back in May, on a remote back road in Arizona. Not exactly the plan du jour. Now comes the fallout, the dealing with credit card companies, rental car companies, and my auto insurance too.

I hit a cow. Big deal. It was big, bovine, and rather unhappy, but we were ok and so was the cow. The car, however, was not so happy. But the Sheriff’s deputy in Mohave County, Arizona was very helpful, we got on our way (the car was driveable), and Hertz were reasonably friendly about the situation. I called American Express immediately, as well as Hertz, and we had a nice little chat about getting the claims process in motion. All seemed to be well.

Fast forward a few weeks, I’m back in MA, it’s raining and I’m far away from the Best Coast. I’m also wondering what this unmarked check for $500 is when, a day or two later, a “final settlement letter” comes from AMEX. They’ve decided that, because I have auto insurance too, they’ll be super friendly and nice and only give me $500 towards the $2554.26 worth of damage. After all, I have auto insurance and why should they pay more than the deductible? I mean, this isn’t Europe (where trading standards would force them to more adequately disclose this fact), and I should be happy to take the $500 and call my auto insurance.

So I called my auto insurer just now and started the whole process again. Meanwhile I’m left wondering whether I should just have paid the out of pocket expense, vowed never to use the credit card coverage again, oh, and perhaps reminded readers of the following:

Credit card rental coverage only covers your deductible

There. Now, hopefully at least a few of you will suddenly wonder whether you’ve been misled and reconsider taking out the rental insurance next time they offer – do you really want your premium to get hit like a flying cow?

Jon.

I love SELinux

Tuesday, June 24th, 2008

So I just love SELinux these days. It’s so easy to use, clearly grandmothers everywhere should be using it to admin their systems.

I used to think SELinux was just a government inspired masturbatory exercise in protecting systems from themselves. Complex policies could be created (where, usually, only a minimal policy protecting actual likely attack vectors would suffice) and hours upon hours could be wasted figuring out the optimal number of possible context types to use on any given system.

Recently, I upgraded some machines to Fedora 9. And as part of that, I decided that I would, for once, run in enforcing mode by default. Rather than just be able to get on with whatever I wanted to do, I decided to protect myself from myself and my own actions. And this has already paid off. For example, tonight, I did the following:

*). Create a new filesystem.
*). Mount on /virt.
*). Just add KVM.

I ran virt-manager to create a new VM in /virt/Rawhide.img, which went ok until virt-manager repeatedly generated unpleasant backtraces. Why was it complaining that it couldn’t open the file it had just created? Then I noticed the AVC denials. My shiny new filesystem had no labels on it, which meant that files were being labelled with the default file_t, etc. A quick diversion into reading SELinux policy, brushing up on a half dozen tools, and it was obvious that all I was missing was the following:

sudo chcon -t virt_image_t /virt/Rawhide.img

All I had needed was a simple change of context to virt_image_t (because all virt images always obviously live in the same place, nobody could ever possibly want to do what I just did) and then a quick restart of virt-manager. I could also have helpfully followed the advice of the AVC tool, rebooted my system and instructed it to relabel. That’s not inconvenient advice at all, that’s just ease of use. Or so friends who’ve spent any time in Redmond, Washington might tell me.

Ok. Even I can’t take my own sarcasm any more in this post. So, let me just cut to the chase and say it. SELinux annoys me every bit as much as it did when I first tried it about a decade ago, and I refute the notion that Linux distributions should be inflicting complex policy upon unsuspecting users. SELinux should instead be used to protect specific system services that are likely to be used by remote attackers – web services, file servers, and the like.

To me, distributions should save complex policy for optional spins and products targeted at the “security paranoid types”. But I shall leave it turned on for now, because I want to understand just how “misguided” I’ve been all these years turning it off the very first chance I get.

Jon.

non-Best Coast Surfing – Part Deux

Sunday, June 15th, 2008

Photo: Jon Masters, living with East Coast waves.

So I went surfing again yesterday at Nauset Beach, on the Cape (Cod). It more or less worked, although the surf was hardly West Coast, but it was still fun nevertheless.

I advertised on Facebook in case anyone wanted to come along for the ride, and my friend Kara was interested, so we headed out around 9am. I had wanted to leave at 7:30, but was dragged to, shall we say “a venue” by some friends celebrating a bachelor party last night…and that went longer than planned. I didn’t drink (I’m not really drinking much alcohol at the moment), but I was tired first thing and didn’t want to be exhausted before I tried hitting the beach. In any case, we got the beach before lunch.

After dropping my friend off, I went over to Pump House to pick up a board for the afternoon. This time, I was able to simply stick it in the passenger seat, and strap the board in using a tie attached to the headrest. Thus I achieved my long-desired goal of driving around in my convertible with the top down, playing cheesy music, with a surf board sticking out of the passenger seat. As long as you don’t need the full range of the hand brake (US: park break) – and goodness knows nobody here ever uses that anyway – and drive carefully, it’s safer than attaching it to the soft top, and less noisy. It also looks cool.

Once changed into my swim shorts and full winter-safe Atlantic rated wetsuit, I discovered the water to be much more pleasant than the last time. Not warm exactly, but not really cold either, and the sun was out too. It was a nice afternoon to be on the Cape. There were waves, few and far between, and not as powerful as one would like. But I was able to catch quite a few and just about stand a few times. I’ve concluded that bodyboarding is pretty easy, but full-scale surfing on the Cape is a skill that I’m going to really have to work on. Some people were able to make a lot more of the waves than I, however, so I know it’s possible.

Jon.

America: It’s “a saving” not “a savings”

Sunday, June 15th, 2008

Dear America,

It is with regret that I must inform you that you have been using an incorrect spelling for some time now. The word is “saving”, not “savings”, “a savings” or other variances thereof.

People who know me know that I will generally defend Americanisms and Americani[sz]ation of the English language. After all, all languages undergo changes over time, and substituting a “z” for an “s” in every other word won’t actually result in the death of many kittens. But baby kittens do die every time someone talks about “a savings of 29.95″. It’s “a saving of” and “Daylight Saving Time”, not “a savings of” and never ever “Daylight Savings Time”. It is appropriate to use “a savings account” (since one has multiple savings in such a container), however, but don’t worry yourselves about that until you start persistently getting the first usage right in everyday situations.

I don’t expect the US to learn how to spell overnight, but if I see one more commercial today getting this wrong, I’m going to go nuts. The (commercial) TV has, therefore, been turned off for the evening.

Jon.