Alastair’s Place

Software development, Cocoa, Objective-C, life. Stuff like that.

OS X 10.5 and VPNs

I was getting a weird problem where one machine could connect to an IPsec/L2TP VPN where another one was giving messages like

MPPE required but kernel has no support

on its console at the same time as the server was issuing messages such as

LCP terminated by peer (MPPE required but not available)

There wasn’t any obvious reason for the machines to behave differently (though one was Intel, one PowerPC, and the PowerPC one—which was where the VPN didn’t work—had been upgraded to Leopard with a VPN connection already set-up, though not the connection I was having this problem with).

Anyway, the solution is simple; edit the file /Library/Preferences/SystemConfiguration/preferences.plist. You need to look through the NetworkServices dictionary until you find the VPN connection you want to fix, then go into the PPP dictionary and change the CCPMPPEnnEnabled keys to 0.

This fixed it for me.

“affect”, “effect”, “infer” and “imply”

Over the past few months I’ve noticed a number of people misusing all four of these words. Since the dictionary definition is unlikely to be helpful in such cases, I thought I’d give some examples of correct usage in the hope that anyone who is confused will find this post and get it right.

Let’s deal with affect versus effect first:

Wrong: The position of the switch effects the light output of the lamp.
Right: The position of the switch affects the light output of the lamp.

Wrong: The lamp is effected by the position of the switch.
Right: The lamp is affected by the position of the switch.

Wrong: To effect the lamp, one can push the switch.
Right: To affect the lamp, one can push the switch.

Wrong: To affect a change in the lamp, one can push the switch.
Right: To effect a change in the lamp, one can push the switch.

Wrong: The affect of the switch is to change the light output of the lamp.
Right: The effect of the switch is to change the light output of the lamp.

Wrong: A change in the lamp may be affected by pushing the switch.
Right: A change in the lamp may be effected by pushing the switch.

Now infer versus imply (this is a little more complicated :-)):

Wrong: Mr. Smith implied from the e-mail that Mr. Jones did not like cats.
Right: Mr. Smith inferred from the e-mail that Mr. Jones did not like cats.

Wrong: “From the e-mail,” said Mr. Smith, “we must imply that Mr. Jones does not like cats.”
Right: “From the e-mail,” said Mr. Smith, “we must infer that Mr. Jones does not like cats.”

Wrong: The e-mail inferred that Mr. Jones did not like cats.
Right: The e-mail implied that Mr. Jones did not like cats.

Wrong: The inference of the e-mail was that Mr. Jones did not like cats.
Right: The implication of the e-mail was that Mr. Jones did not like cats.

Wrong: In the e-mail, Mr. Jones inferred that he did not like cats.1
Right: In the e-mail, Mr. Jones implied that he did not like cats.

Wrong: From the e-mail, Mr. Smith implied that Mr. Jones did not like cats.
Right: From the e-mail, Mr. Smith inferred that Mr. Jones did not like cats.

Right: “Are you inferring that I don’t like cats?” said Mr. Jones.2
But more likely: “Are you implying that I don’t like cats?” said Mr. Jones.

In case it’s still not clear:

  • You can effect a change on something. In which case you have affected it.
  • You can have an effect on something. In which case it is affected by you.
  • You can imply something. In which case others can infer something from your remark.
  • You can infer something from someone else’s remarks. In which case they may have implied it. (Note the word “may” here; inference is the act of reading between the lines, so it is possible to read something the author did not intend.)

Finally, you can read dictionary definitions of affect, effect, infer3 and imply.

Why does all this matter? Well, for one thing, if your English is sloppy and you are arguing a case for something, your argument may look less persuasive—indeed, less rational—than the counter argument. There is no reason to suppose that those arguing the opposite position will be sloppy in their use of English.

Poor use of English shows a lack of care and a lack of pride in your writing, not to mention a lack of respect for the reader—if you don’t care sufficiently about your writing, why should the reader bother reading it? Why did you bother to write it in the first place?

When written well, English is a wonderful, expressive language; irregular and awkward it may be, but it has a beauty both of sound and of meaning. Careless mistakes mar that beauty and reduce the enjoyment of the reader.

1 Unless you mean that Mr. Jones is being written about in an e-mail and in that e-mail he inferred that some other person—Mr. Smith, perhaps—did not like cats, in which case it would be right. Isn’t English wonderful? :-)

2 In the first case, Mr. Jones is asking if the other party has come to the conclusion that he—Mr. Jones—does not like cats. In the second, Mr. Jones is asking if the other party is stating indirectly that Mr. Jones does not like cat. The two have different meanings, but they are both correct. You are more likely to want the second meaning.

3 The author of the Usage Note from the Random House Unabridged Dictionary in my view misunderstands the sentence it quotes, “The next speaker criticized the proposal, inferring that it was made solely to embarrass the government.

There is nothing wrong with the sentence at all; it is the speaker who infers that the proposal was made to embarrass the government. It is not the proposal that does the inferring here, and so their claim that this sentence lends credence to the misuse of the word “infer” is incorrect.

Anonymity Versus Privacy (Again)

This c|net News article is titled “To be anonymous or not to be, that is the privacy question”.

As I’ve said before, anonymity and privacy are two very different things. Unless you habitually wander about in a Burqa, speaking only through a voice changer and wearing platform shoes, that is. But nobody does that, right?

MacForensicsLab on Malware

Disclosure: I run Coriolis Systems Limited, one of SubRosaSoft’s competitors (in the field of disk utility software, not security software, I might add). I will nevertheless endeavour to avoid any bias due to that fact.

MacForensicsLab, part of SubRosaSoft, has published a white paper on Mac malware (which it has the cheek to describe as an “academic white paper”; for the record it is clearly a commercial document not an academic one). The web version is uncredited, but the PDF (a whopping 50.2 MB!) appears to have been written by Marko Kostyrko, SubRosaSoft’s CEO.

The paper, broadly speaking, makes four key points, which you can find summarised at the bottom under the heading “For Apple, Inc.”. Of those four, controlling access to the address book is not a bad idea, nor is extending the sandbox system introduced in Mac OS X 10.5 (though it isn’t clear what the author means by including “code that is created locally”).

The other two points, arguably the most important, unfortunately don’t hold up to scrutiny:

1. Control the Bundle Architecture

Kostyrko says:
“Apple might consider implementing a mechanism whereby a bundle cannot contain more than one executable for any given “Contents” subfolder. This would reduce the ability of malware authors to piggyback their code inside an otherwise legitimate bundle.”
This idea is just plain ridiculous, especially for someone whose company sells utility software since utilities rely on the use of helper tools, which are auxiliary executables embedded in the application bundle that permit privileged operation. Furthermore, this restriction wouldn’t achieve anything (besides breaking a number of existing applications, that is). There’s nothing stopping a malware author from e.g. moving iTunes.app into /Library/Application Support and replacing it entirely, leaving only a single executable inside each bundle. Apple has already partially addressed the problem of maliciously altered applications by implementing support for code signing. If you attempt to modify a signed application as described earlier in the article, its signature will no longer match. It is true that Leopard presently does not inform the user if a signature is no longer valid. But it does restrict applications with invalid signatures in various ways, and, depending on the settings in the application’s Info.plist file, it can be configured to terminate applications that have been tampered with. If there is anything Apple needs to do here, it is to add a warning before launching a signed application with an invalid signature. Even then, it would only protect against modified apps, not against malicious apps dressed up as legitimate ones. The second part of this section says:
“Apple may also wish to discuss disallowing multiple extensions inside a .app bundle. This would reduce the ability of malware authors to disguise executable bundles as data files for their pro tools.”
I assume Kostyrko means that Apple should disallow application bundles with multiple extensions, since he believes that Mac OS X will hide the “.app” extension. (For reference, when writing an academic paper, it is a good idea to get your terminology right, which would have avoided any doubt here.) Well guess what? Apple has already addressed this. If, on OS X 10.5, you take an application and try to rename it to have two extensions, Finder will display both extensions, even if the bundle has its “hide extension” property set.

2. Control Write Access to the Applications Folder and Subfolders Found Therein

Apparently
“The programs (commonly known as Applications) that a user relies upon… are stored unprotected inside a folder called ‘/Applications’. Any program running on a Mac OS X system can write to this folder and to most of the contents therein”
and
“Apple may think about making it the default behavior for the system to require admin access to write to this very important folder. Furthermore Apple should make an interface that is easy, obvious, and non-technical to turn this access control on or off.”
Sorry Marko, yet again I have news for you. OS X already does this too, and the Applications folder is not as you erroneously claim “unprotected”. If you use a non-administrator user, you can’t modify the Applications folder, and furthermore, if you try, Finder will offer an authentication dialog so that you can make changes if you know an administrative username/password. A lot of users of existing OS X use administrative users day-to-day, certainly, because that’s what the OS X installer creates for you automatically. But there’s nothing stopping you from going to System Preferences and making an additional, non-administrative user for day-to-day use. Indeed, if you’re reading this and you haven’t already done so, I encourage you to do just this. Helpfully, most OS X software works just fine from a normal user account, unlike the situation on Windows where there was and probably still is plenty that requires you to be logged-in as an admin user just to run it. Update (2008-03-07): Stéphane Sudre just pointed out that a lot of apps install into /Applications with the wrong permissions, either because of broken installers or because they’ve been installed using drag & drop. This is a fair point, though looking on my system I can only see a small number with suspect permission settings. I’d be interested to know what the exact deal is with drag & drop install and permissions; I’m not sure I know OTOH exactly how that works and I probably should :-)

Not only is the paper inaccurate, it is full of needless scaremongering, with sections titled “Macs Are Vulnerable” and “Complacency” as if to emphasise the author’s opinions and quotes from analysts about how “most Mac users take security too lightly”. Some of these sections are even written in the present tense, as if there is a significant amount of malware already in the wild. Thankfully there is not.

I find the entire thing particularly irritating, to be frank. The methods of product promotion used by the security software industry have often been criticised in the past, but dressing this lightweight marketing exercise up as an “academic” paper? Even without the inaccuracies and the needless scaremongering, this wouldn’t be published by any reputable academic journal.

Anyway, the best thing you can do for now as an end-user is to make yourself a non-admin account to use day-to-day, and to ensure that you keep regular back-ups of data you care about. Using a non-admin user will make it difficult for malware to affect applications installed on your machine, and keeping backups of critical data means that if the worst ever did happen, you could wipe the system and start again without worrying about losing data.

Responsible Journalism From the BBC

Journalists the world over should read this BBC blog about the fact that they decided to keep secret Prince Harry’s deployment to protect his fellow soldiers. The BBC, along with the other organisations involved in keeping this quiet, should be congratulated on their common sense and their concern for the lives of the soldiers serving with the prince.

Unfortunately, some unpleasant little hack by the name of Matt Drudge decided that he knew best and that it would be a good idea to run a story on it. As a result, Harry now has to come home.

Matt Drudge probably should be ashamed, but I doubt he’s even capable.

Have You Seen the Irish iPhone Deal?

It’s really bad (via Mac Information and Macworld).

I’m glad I don’t live in Ireland. And I think Danuta Gray has got some nerve calling her company’s potential customers “freaks”. If I were Steve Jobs, I’d be pretty furious about all of this; launching without Visual Voicemail, with capped data use and with hardly any minutes at that price, and insulting the people who are going to buy it?! Well I wouldn’t have bought an iPhone on those terms.

The BBC and the YouTube Block

I don’t know who wrote the BBC article about the YouTube blocking incident, but whoever it is seems to think that it has something to do with “faster” routes. (It doesn’t. c|net’s story explains what actually happened.)

I sent them a detailed message about correcting this, but the story currently still reads

“Essentially, Pakistan Telecom took over some of the net addresses assigned to YouTube. Crucially the path it offered to this group of addresses was faster than the usual one used by the hardware, or routers, that speed traffic around the internet. Pakistan Telecom let this address change propagate to the routers of one of its partners - PCCW. Routers are constantly in search of faster ways to get the data passing through them to its destination so news about this faster path started propagating across many of the net’s routers.”

which is of course nonsense.

Edge routers don’t work by choosing “faster” routes. Most of their decisions are driven by the commercial dealings and network policies of their operators; only after those have been taken into account will they consider AS path length, which isn’t necessarily related to the number of hops a packet will take (e.g. because an AS may need to pass it between edge routers somehow), let alone the round-trip-time.

The problem was caused by Pakistan Telecom advertising a more specific route (i.e. a route to a smaller range of IP addresses) than the one advertised by YouTube. Had that advertisement remained within Pakistan, it would have been fine; unfortunately for whatever reason it was allowed to propagate out of Pakistan and into the wider Internet.

Illegal Downloading, ISPs and Internet Bans

I’ve been dying to write about this for a while now but my hand was too painful to say anything on the subject.

On February 12th, the BBC published an article suggesting that the U.K. government is considering banning people from the ’Net if they persistently download illegally.

The comments on that article, as well as on Darren Waters’ blog post are, I think, pretty revealing. A large number of them seem to be attempting to justify illegal downloading, and a lot of these attempts centre on two arguments:

  1. The people this is hurting make (or have) too much money, and

  2. Prices are too high and more people would buy things if they were “more reasonable”

Both of these arguments are fallacious, as any copyright holder will tell you. The vast majority of copyright holders are not millionaires, and in fact, as one of the posters on the BBC’s site explains:

It is obviously a horrific situation that people’s privacy be invaded and this must be addressed. BUT.I have run a small indie label and band for the last 30 years,and we’re on the verge of going bust. I earned £6k last year, not enough to keep my family [cd/LEGAL download sales are a joke], yet I see tens of thousands of illegal downloads of our Cds and dvds. Unfortunately , if people can’t see a ‘value’ for someones ‘efforts’ where there is a demand,most quality creative productions wil ceaseNick, swindon

There are lots of small businesses, and even individuals, who rely on copyright for their income. And even millionaires are not necessarily rich; seems a strange statement, perhaps, but it should be obvious to many people in the U.K. because of our massively inflated housing market, which has turned large numbers of ordinary people into paper millionaires simply because of the value of their homes. That doesn’t necessarily mean that they have any money, mind.

Plus, even in the few cases where they are rich, what gives anyone the right to infringe their rights as a result of their wealth? Are rich people suddenly undeserving of reasonable treatment?

As for the pricing argument, that has been discredited time and again, most recently by Radiohead who discovered that a substantial fraction (30% according to some reports) of the people who downloaded their album, In Rainbows, paid nothing at all. Of course, this would be no surprise to economic theorists, who have known how consumers react to product pricing for well over a century now (indeed, the ideas of supply and demand date back to the late 18th century and the ideas of people like Adam Smith).

Anyway, the ability to get ISPs to ban users who persistently infringe copyright would go some way to eliminating the inbalance that currently exists, which overwhelmingly favours infringers over copyright holders; presently, infringers’ privacy is considered more important in many jurisdictions than the fact that they are breaking the law, and since copyright holders have none of the legal powers that are afforded to criminal prosecutors, the status quo has resulted in copyright being effectively unenforceable, even for large corporations with deep pockets.

More recently, there has been suggestion of sanctioning ISPs who fail to take measures to address Internet piracy. This also seems eminently sensible and, to my mind at least, should extend to the ubiquitous file-sharing websites, who are hiding behind the safe-harbour legislation rather than employing the staff they need to properly screen uploads.

I just hope that they give consideration (a) to small copyright holders, rather than just the large corporates, and (b) to people making things other than just music and movies, who are sometimes forgotten in the heated debate surrounding this issue.