Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Imagine that an unfaithful (or maybe careless) employee at Microsoft managed to sneak in three lines of GPL code into a the core of a distribution of Windows. Wouldn't this mean that Microsoft would need to publish all their source code under GPL as well? Or could they just rewrite the three lines once they are notified about the issue?

Shouldn't Microsoft be scared to death about this?

Edit

In the comments below, Kenneth states that it has actually happened, so I would be most intereted in any references. I also do not understand how this question could get closed.

share|improve this question

closed as not constructive by NickC, Jonathan Khoo, Walter, ChrisF Apr 11 '11 at 8:17

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

5  
Are you planning on doing this? –  Mahmoud Hossam Apr 9 '11 at 13:42
    
No, but I am in a similar situation, where I have proprietary code. –  David Apr 9 '11 at 13:45
    
I think if you use GPL'ed code, your code needs to be GPL as well, unless the code you're using is dual-licensed and the other license is more permissible. –  Mahmoud Hossam Apr 9 '11 at 13:49
1  
Nobody will find it anyway, especially if it causes a bug. –  JeffO Apr 9 '11 at 13:52
    
If you get caught,shit happens –  Aditya P Apr 9 '11 at 15:52

5 Answers 5

up vote 18 down vote accepted

As old as the GNU GPL is, I'm amazed at how broadly it is still misunderstood.

Three lines of code is not going to make a difference. I could write a simple for() loop with three lines of code and you'd probably spot it in hundreds of code bases. Your question is valid, but the example is rather trivial.

If Microsoft accidentally linked against a GPL'ed (note, I said GPL, not LGPL) library, there would be an issue because they would have created a combined work. Microsoft could come into compliance by either:

  • Releasing the source code and build scripts to the executable or dynamic object that linked against the covered library, or

  • Stop using the library

Your last question was the most interesting part, and yes all software companies should be diligent about monitoring what gets checked into their code base. Some companies even appoint 'compliance officers' to ensure that their use of free/open source code is in accordance with the license. One of the benefits of version control is to be able to monitor this.

If you have proprietary code, in an ideal world, you use open stuff that is under the least restrictive licenses such as the two / three clause BSD, MIT or similar.

IANAL, but I work closely with one. Part of my job is to ensure my company remains compliant, it's my ultimate call on what third party stuff we use.

share|improve this answer
    
I did imagine some complex unique three line code. Not just a standard for() loop. I admit that three lines of code is hardly enough for it to be unique, but it was to understand the principle. If it makes a difference, I am interested to know what would happen if they used 200 lines of GPL code? –  David Apr 9 '11 at 14:00
3  
@David - they would remove it, release an update to replace it on people's systems and fire the programmer. Exactly the same as if the programmer wrote a 200line buggy function –  Martin Beckett Apr 9 '11 at 15:34
    
Tools like Maven can do license tracking provided the upstream projects have license info in their POMs. It's part of site generation, and it is A Good Thing. –  Donal Fellows Apr 9 '11 at 16:26
    
@Donal Ohcount is also a great tool, it will give you a nice license summary in any code base (based on examining existing files). –  Tim Post Apr 9 '11 at 17:53

Disclaimer: I am not a lawyer, this is my opinion, etc.

No, they wouldn't have to publish the source to Windows. The GPL is a license. The company (the actual entity that owns the source and the product) never agreed to it, so they aren't bound by the terms of the copyright. What actually would be happening is that Microsoft would be guilty of copyright infringement, since they used the source without abiding by the terms of its license.

The fact that you perform an action as part of your job doesn't give you the ability to bind the company to a contract. If the corporate entity didn't fix the problem as soon as it learned of the inclusion, though, whoever originally wrote the code may have a case.

share|improve this answer
    
I think that By using GPL code, that implies agreeing to the license. –  Mahmoud Hossam Apr 9 '11 at 15:28
2  
@Mahmoud - but the programmer had no rights to agree to the license, he isn't a director. If I'm a lowly french frier at McDonalds and one day in Starbucks say "we should buy this place" - this doesn't constitute a legally binding agreement from McD's to buy starbucks –  Martin Beckett Apr 9 '11 at 15:37
    
@Martin true, but that doesn't mean the programmer can use the code as long as he's not a representative of the company. –  Mahmoud Hossam Apr 9 '11 at 16:06
2  
@Mahmoud - you may think that, but it is not true. Besides it is not relevant. You don't have to agree with the GPL. It is a license, not a contract. –  Stephen C Apr 9 '11 at 16:10
3  
@Mahmoud - it means that MSFT haven't agreed to anything though. They will have to remove it and issue a fix, but they aren't at fault and would be given considerable leeway by the court to deal with it –  Martin Beckett Apr 9 '11 at 16:31

They would get sued. Most companies resolve the licensing issues before it ever goes to court. A case against Westinghouse however, did go to court and they were served with a injunction and $90,000 fine.

http://www.theinquirer.net/inquirer/news/1726810/free-software-lawyers-win-gpl-lawsuit

share|improve this answer
    
They would only get sued if they refused to take steps to comply with the GPL. Removing the offending code would be one way to comply. –  Stephen C Apr 9 '11 at 16:07
2  
The FSF has never sued before asking for a software company to come into compliance. However, the FSF may or may not be the copyright holder of the covered work. So yes, a very disgruntled programmer could conceivably file suit, but highly unlikely that any lawyer would do it without first demanding that Microsoft comply with the license. –  Tim Post Apr 9 '11 at 17:55

There was a situation like this in the mid-90s. A contracting firm had been hired by Apple to help port QuickTime to Windows. Then they contracted with Microsoft to work on Video for Windows, and used some of Apple's code for that. Apple found out, and it was a huge mess and dragged through the courts for years. Finally, Steve Jobs returned to Apple and cut a deal with Microsoft on a variety of issues, including dropping that litigation.

Having been through it once, I doubt Microsoft is "scared to death". But I'd sure be scared to death to be the Microserf who got caught pulling a stunt like slipping GPL code into an MS product.

share|improve this answer

Microsoft will get sued but the end of the situation has more variables. If the company suing Microsoft is another big company like Google, Novel, Apple, .. etc most probably the situation will be converted to settlement of some kind or may even does not go to court because Microsoft has patents to protect itself and the suing company may find it self facing a law suit from Microsoft. If the company suing Microsoft is small, it will get money or get bought. I do not think Microsoft can be scared by this at all unless for its image and reputation in the market.

share|improve this answer
    
Well, but there is the Free Software Foundation which does not actually "own" any GPL project, but will sue on the behalf of a GPL project. I'd be curious what would happen if them and Microsoft met in court. –  Earlz Apr 10 '11 at 2:06
3  
@Earlz: The Free Software Foundation owns official Gnu projects, requiring copyright assignments. This means they can sue over them. They can't sue about any software they don't have the copyright to; only the copyright holder(s) can do that. They may give help or legal advice. –  David Thornley May 2 '11 at 13:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.