Slashdot Mirror


MS Suggests Using Shims For XP-To-Win7 Transition

eldavojohn writes "Windows XP (and a lot of MS OS code before that) had a fundamental security flaw whereby the default setting made the ordinary user run as the superuser. Vista & Windows 7 have fixed that and implemented The Correct Paradigm. But what about the pre-Vista applications written to utilize superuser privileges? How do you migrate them forward? Well, running a virtualized instance of XP in Windows 7 is an option we've talked about. But Microsoft is pushing the idea of using 'shims,' which are a way to bypass or trick the code into thinking it's still running as user/superuser mode in Windows XP. This is an old trick that Microsoft has often employed, and it has brought the Windows kernel a long ways, in a duct-tape sort of fashion. At the TechEd conference in LA, Microsoft associate software architect Chris Jackson joked, 'If you walk too loudly down the hall near the [Windows] kernel developers, you'll break 20 to 30 apps.' So for you enterprise developers fretting about transitioning to Windows 7, shims are your suggested solution."

21 of 316 comments (clear)

  1. I know you slashdotters hate to hear it by Anonymous Coward · · Score: 5, Insightful

    But MS's support for backwards compatibility is THE REASON they own the desktop.

    You can slam all you want, but they will continue to own the desktop because they run all the apps you want.

    1. Re:I know you slashdotters hate to hear it by x2A · · Score: 4, Insightful

      Haha, for me, the best bit was where you said

      "its not due to MS backwords compatibility"

      and then followed it up by listing a bunch of arguments showing why it is due to backward compatibility! That totally caught me by surprise! But yeah, you're right, if they dumped compatibility people would get pissed off, because they do want backward compatibility!

      "All the app makers target Windows because thats what 90% of desktop users use"

      Do you think Windows would ever've gotten so popular if it didn't allow people to run their old DOS programs? Course not. It's called 'transition', and it's much less disruptive, esp to businesses, than quantum leaps.

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    2. Re:I know you slashdotters hate to hear it by SBrach · · Score: 4, Insightful
      You say:

      The minute WINE works 100%

      Then you say:

      without any sort of shims or other garbage

      Wine is the definition of using hacks to get an app to run on an OS. If it is ok for Wine, why is it not ok for Win7?

    3. Re:I know you slashdotters hate to hear it by WMD_88 · · Score: 5, Insightful

      Just to play devil's advocate, linux runs any X11 app and that goes back decades and decades (e.g., nethack is from 1985).

      Nethack may be old, but the binary you use on Linux was compiled recently. Set up an old Linux system (RH 6.2, to throw something out there), run Nethack on it, and then try to run the same binary on a new system. It won't work.

      Having the software be open-source alleviates most of this, but closed-source will never work too well on Linux unless they stop breaking everything all the time.

    4. Re:I know you slashdotters hate to hear it by Volante3192 · · Score: 4, Insightful

      It's not 'lazy to learn' a new set of apps, it's 'utter panic and fear at having to move years and years of vital company data from one business application to another.'

      I know companies that still use applications that are little more than absurdly complex DOS .BAT files because that's where all their data is.

      Learning a new system is child's play compared to migrating all the data, ensuring nothing is lost, getting everything to work (laser printers, faxes, god forbid there's any dot matrix or thermal printers...)

    5. Re:I know you slashdotters hate to hear it by Applekid · · Score: 4, Insightful

      Wine is the definition of using hacks to get an app to run on an OS. If it is ok for Wine, why is it not ok for Win7?

      Because this whole article is FUD.

      I don't even know why shims are a problem. It's not like the API consumer needs to know they exist. Even more so, just use the API correctly and you'll never have compatibility issues in your app. The Microsoft philosophy is to let people to the wrong thing and let it work out right. I don't agree with that, but, hey, it doesn't really matter WHAT Microsoft does with Windows, really.

      Shim for XP compatibility = LOL, Microsoft sux!
      No-shims and screw XP = LOL, Microsoft sux!

      --
      More Twoson than Cupertino
    6. Re:I know you slashdotters hate to hear it by mea37 · · Score: 4, Insightful

      "Microsoft were competing unfairly long before they became a monopoly, and this is also illegal"

      Citation needed.

      The example you gave is not illegal unless you wield undue market clout (such as that held by a monopoly). That is the case with any "unfair competition" law I've heard of - it's only unfair if competition in your market is limited (e.g. because you're a monopoly or because you and a few other players collude to maintain a collective strangle-hold on the market).

    7. Re:I know you slashdotters hate to hear it by x2A · · Score: 4, Interesting

      "The argument is that it's ridiculous to suggest that backwards compatibility is "THE REASON" for MS's success"

      I don't think the word 'the' was meant to be taken as a literal definite article, sometimes people exagerate to demonstrate their point as a shorthand way of explaining that the actual extent of their point is large enough to warrent exageration. It's something I personally prefer to not do, but I don't think it's too much of a problem when people do.

      I don't think anyone's going to suggest that MS OS's are perfectly backward compatible; sometimes things do need to change, and sometimes things rely on bugs that shouldn't be left open, but in all my own personal experience, they do win hands down next to Linux and Apple (I can't comment outside the scope of those three). Say what you want about "having the source code", but when things need certain versions of libraries for certain APIs, or relied on the way a particular version of GCC compiled their code that's now no longer the case, things don't stay so black and white. Yes I've been able to update a lot of old code myself to reflect changes and get it to compile, but there's still an awful lot I can't.

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    8. Re:I know you slashdotters hate to hear it by TemporalBeing · · Score: 4, Insightful

      "or flagrant violation of antitrust laws"

      hint: they had to become a monopoly power first!

      Microsoft were competing unfairly long before they became a monopoly, and this is also illegal.

      IANAL, but...

      It depends on what they did to "compete unfairly". For example, it is not illegal for a vendor to have a contract with an OEM that the OEM could not buy a competitor's products if the vendor is not in a market monopoly position.

      On the other hand, it is illegal for them to bribe, blackmail, or threaten someone to sign the contract.

      To summarize - my point (and the GP's point) is the antitrust laws define a monopoly, and unless the entity falls into that definition there is a lot they can do that they couldn't do otherwise. Anti-trust laws only limit what a monopoly can do - not everyone else.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    9. Re:I know you slashdotters hate to hear it by EvanED · · Score: 5, Informative

      The whole reason shims exist is because the APIs change over time, so what was correct usage in Win2000 or WinXP might not be correct in Vista or 7.

      Well, depending on how you interpret that statement, that's only part of the reason, because MS rarely breaks an API in a backwards-incompatible way.

      There are basically two reasons why software stops working on windows:

      1.) It makes assumptions that are at a higher level than what the API does. For instance, that the user is running as administrator. At least on the NT line, it has never been the case that the API has "allowed" a program to assume that a requested access to HKEY_LOCAL_MACHINE will succeed, or that it can write to Program Files. (Starcraft crashes at the end of a game when run as a limited user under XP -- presumably because it tries to write LastReplay to Program Files.) Even if the API can theoretically return an 'access denied' error, the programmer assumes that it won't actually arise in practice.

      Another example of this is DOS programs that assume they can access the hardware directly and stuff like that, which "of course" doesn't work under NT.

      2.) It makes assumptions that are not part of the API proper, but just artifacts of the implementation. For instance, assuming HANDLEs (which the API says should be opaque) are pointers which can be directly accessed (which is true in version A but not true in version B). One good example of how subtle this can be is a shell namespace extension that implemented a function signature wrong by giving the wrong number of arguments. This creates the strong potential for stack corruption. On Windows 95 and NT 4, it worked because Windows was compiled with frame pointers, which left it robust to that error. With Windows 2000, Windows was compiled with the frame pointer optimization, which meant that program crashed Explorer. At no point was "Windows will be compiled with frame pointers" part of the API.

      (Then there are higher level problems of a similar nature. There are programs that will open up the display properties dialog then send tab messages or otherwise enumerate the controls present, then change, say, the fifth control so it has the setting they want. What if MS changes the tab order or adds a new control? Boom.)

      So if you say that "the APIs change over time" means that their defined behavior changes, this is the decidedly minor aspect of compatibility problems. It's only if you allow implementation-specific details to creep in (which I don't consider part of the API) that your statement is true.

    10. Re:I know you slashdotters hate to hear it by Joe+U · · Score: 4, Funny

      Funny, Apple was able to make the transition from insecure, single-user based OS to more secure, multi-user OS without too much trouble and keeping a compatibility layer for older apps. Why can't Microsoft do the same?

      When you only have about 20 apps for the platform, it's easy.

    11. Re:I know you slashdotters hate to hear it by x2A · · Score: 4, Insightful

      The browser thing is so hypocritical it's almost beyond belief. MS were bundling IE with Windows right back to Win95 with IE2 IIRC. At the time, Netscape was closed source, paid for software, often licensed by ISPs to give out to their customers. We used it because it was what came with our ISP package and knew no different. I discovered IE when I double clicked on a .htm file on the harddisk once and wondered what it was. No one complained, because Netscape had pole position of mindshare and possibly (I'm guessing but cannot confirm) was better anyway. Then... IE started actually getting good, and there was competition, and all of a sudden it was "unfair that they're bundling a browser", even though it wasn't "unfair" for years before that. Now we have a range of open source, free browsers. We would still be buying them if IE wasn't given away with Windows. If you think that's unfair, then you can donate to your favourite browser team.

      I liked that IE was integrated into the OS! Just as how I like that KDE does (or did, I've not used KDE4 to know if it's changed). But now, because other people weren't choosing to use other browsers, I now can't choose what I wanted. The whole things stinks of hypocrisy. But yes... this is slashdot huh. Oh well... I'm sure no one else will read this now anyway!

      --
      The revolution will not be televised... but it will have a page on Wikipedia
  2. if youve got to go through a bunch of hacks by wjh31 · · Score: 4, Funny

    just to get the software to work properly, you may as well just move to linux

  3. HA HA by scribblej · · Score: 4, Insightful

    At the TechEd conference in LA, Microsoft associate software architect Chris Jackson joked, 'If you walk too loudly down the hall near the [Windows] kernel developers, you'll break 20 to 30 apps.'

    Yeah, real funny. Our software is fragile as fuck, HA-ha

    Who's laughing at that goddamn joke? Oh, right, Microsoft is -- all the way to the bank.

    1. Re:HA HA by Migala77 · · Score: 4, Informative

      The 20 to 30 apps you'll be breaking are not MS apps, but are (usually misbehaving) third party apps. Read the SimCity example from Joel.

      It will be a long time before Wine will have this level of compatibility.

  4. love or hate it. by DRAGONWEEZEL · · Score: 4, Insightful

    Shims work.

    It reminds me of the part in "Zen & the Art of Motorcycle Maintenance" where he suggests to John that beer can aluminum would be the perfect shim to keep his handlebars from slipping. John rejects the idea of using a beercan on his beemer, and so goes to buy "quality shimstock" which is probably made from beercans.

    We shim many things, and I had no clue till I took off the siding of my house, and redid a few doors. Shims are how we make construction look good, and still get it done in a timely manner.

    Surely it applies to programming as well?

    --
    How much is your data worth? Back it up now.
  5. Re:Mike by dave562 · · Score: 4, Insightful

    Since at least Windows 2000, Microsoft has provided guidelines about how to write code so the applications do not require administrative privileges. Most developers have either been ignorant of the practices, don't care about the practices, or don't know how to implement the practices. A lot of it has to do with where the DLL files get stored, and where the application writes its files to. In the *nix world, everything is pretty self contained within its own directory. For the most part, all of the files that an application needs are right there with the application. If they aren't in the same directory, symbolic links (something that Windows lacks) provides the application access to the necessary libraries.

    I think you're blowing things out of proportion to say that it is unheard of it in the Windows world for users to be able to run as a something less than a super user. At my current job, we only have one app on the network that requires admin privileges. When I was consulting, most of our clients were all running as regular users.

    The "problem" with Microsoft is that they have always catered to the lowest common denominator. When it comes to developers, they provide the developers with a powerful IDE and don't encourage them to think about how it works behind the scenes. That ease of use has come at the cost of security. Sure, devs have been able to come up with the applications that they need to meet the business requirements laid out for them. Unfortunately, those applications often times aren't properly hardened and crack when put on hostile networks.

    I see the computer world working from two different ends. The Microsoft part of the world has provided the functionality and is backing into security. The *nix world has provided the security and the stable foundation, and now they are building the functionality.

  6. Re:Meh, this isn't the issue 90% of the time... by MrNaz · · Score: 4, Insightful

    You can't always stay away from legacy apps. Legacy apps are made to fill a need that a particular company has in a particular situation. This usually means that when their app is finally put up against the wall, their choices are either stick with the entire old ecosystem, OS and all, or rewrite from scratch.

    Given finite budgets and a culture that values returns *this* quarter at the expense of every future quarter, guess which option gets picked most often.

    --
    I hate printers.
  7. Re:Security flaw? by Jamie's+Nightmare · · Score: 4, Insightful

    Next you'll be telling me you can't switch to another virtual console if your GUI crashes

    If your GUI is crashing, you should consider using a different OS entirely. GUI crashes seem to be an acceptable event among Linux users, but most other users would not tolerate such occurrences. In Windows, there is a chance the "explorer" file manager might crash. For example, due to a 3rd party extension behaving badly. However, since XP and onward, a crashed explorer will restart automatically. Since explorer is only part of the GUI, none of your applications are disturbed.

    Crashes of the underlying GUI are almost unheard of unless there is a serious flaw with the graphics driver. Since Vista and onward, the WDDM (Windows Display Driver Model) can restart the graphics system if such a problem should occur.

    or review the OS code to satisfy yourself it's not malicious.

    I would suggest that if you are paranoid enough to warrant reviewing the entire source code to the OS you wish to choose, you should probably consider some type of therapy. Using computers will only exacerbate your underlying problems.

    --
    "When you see a unixer brainwashed beyond saving, kick him out of the door." - Xah Lee
  8. Re:But who has source code?!? by Blakey+Rat · · Score: 4, Informative

    ISVs can create a "manifest" with their application telling Windows which shims need to be in-place to run the application correctly, without changing their code and without having access to the Windows source code. That's the point.

    Microsoft already ships a compatibility checker utility: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=24da89e9-b581-47b0-b45e-492dd6da2971

    But they can't force ISVs to run it, and they can't force ISVs to fix the problems it finds. What they can do is say, "hey, this shim is an easier fix than the compatibility checker you're already too fucking lazy to run" and hope that sticks.

  9. Re:Meh, this isn't the issue 90% of the time... by cbreaker · · Score: 4, Insightful

    Since when does a small company have 15,000 employees?

    --
    - It's not the Macs I hate. It's Digg users. -