Plagiarism, copy of code - licensing

In the academic world, plagiarism and referencing are taken seriously. And when it comes to our intellectual creation, to what extent it would be plagiarism copy and paste snippets of other code, available on the Internet at mine?
Particularly I never referenciei the code snippets that I copied in SO. This is plagiarism? The legal punishment is the same for plagiarism in the academic world?

In the commercial world, the main issue is Copyright and Copyright law. Basically, it is illegal to copy something unless you have the permission of the copyright owner. The legal punishment for copyright violation can be large civil damages, large fines and even jail time, depending on the legal jurisdiction and the nature and severity of the violations.
Other qualitative differences between plagiarism and copyright violation include:
Plagiarism is punished by Universities kicking out students, and sacking staff ... and "public shaming". Copyright violation is punished by the law courts with civil damages, or criminal fines and jail terms.
Universities are actively looking for instances of plagiarism, certainly at the undergraduate level1 ... where it is commonplace. Copyright violation is generally up to the copyright holder to detect.
For plagiarism, the Universities, etc take the initiative for prosecution. For copyright violation, it is generally up to the copyright owner to pursue the violators via the civil court system.
A programmer who copies snippets of code is unlikely to fall foul of copyright law. Copyright law allows for "fair use" and there are also de minimus arguments. However, a lawyer can still threaten to take you to court ... and it would cost you money to fight them.
A programmer or company that wholesale copies entire applications (e.g. open source) in violation of the copyright / license is taking a significant risk.
Particularly I never reference the code snippets that I copied in SO. This is plagiarism?
Yes. Plagiarism is copying without attribution and claiming the work as your own.
Does it matter?
Only if the context in which you are copying the code snippets requires attribution (referencing). (Open source software licenses generally don't ... but Creative Commons licenses often do!)
But the copying does matter if it is a copyright violation!
Read the StackOverflow legal page carefully to understand if what you are doing is permitted.
1 - AFAIK, there are no systematic attempts to detect plagiarism in RHD theses or published research papers. On the other hand, the consequences for the plagiariser are much, much worse; e.g. it can mean the end of a career.

See the bottom of this page and all pages on SO: when you copy a snippet of code from SO, these terms apply:
"user contributions licensed under cc by-sa 3.0 with attribution required",
as explained here: https://blog.stackoverflow.com/2009/06/attribution-required/
Reuse is not plagiarism, and to reuse you need to comply with the terms of the license and this require attribution per the CC-BY-SA-3.0 license http://creativecommons.org/licenses/by-sa/3.0/
If you do not comply with the license terms, you are simply not licensed (i.e. not authorized) to reuse this code. This is the extent of the "punishment"!
/IANAL /TINLA

Related

Forking proprietary code to BSD [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
Let's say I have obtained permission from an employer to release a snapshot of a proprietary application to the public under a BSD license.
Is it possible to have a separate, independently developed fork of the code at this point in time released under a BSD license (or GPL I guess, not sure which yet), while the existing code will continue to be developed internally by the original company and will continue to be proprietary?
Are there any things to watch out for?
Talk to a lawyer.
My understanding is that you retain your own copyright to do whatever you want with your copy. The license you release under is for other people, not you -- you don't lose your rights by offering an open-source variant.
There is a huge difference between BSD and GPL. BSD lets others do basically whatever they want with it. GPL is much more restrictive for the programmer, and more open to the end-user. Any project with GPL code, must itself be released under GPL. BSD lets programmers incorporate the code into proprietary closed-source projects.
But, don't listen to me on this -- check for yourself, and get the opinion of a lawyer.
I agree on the "ask a lawyer" bit.
In general, releasing code both under a free software licence and a proprietary licence is fine, as the legally relevant bit is not what kind of licence sticker is attached to the code, but rather what was agreed on in the contract.
Releasing code under a BSD licence is actually offering a contract to whomever happens to stumble over the code that they may use the code under the terms of the BSD licence. Once people have accepted this offer (by downloading the code), the contract is sealed -- i.e. you cannot revoke the rights of someone who has already entered into that contract, however there is no obligation beyond the contract (i.e. they will not get access to newer versions, and you do not have an obligation to offer the same conditions in eternity).
The only place where the two licences can really conflict is when, by entering into a contract with these terms, one of the parties would have to violate another contract; the most obvious example would be if one of the licences grants exclusivity to the customer.
For the full details, I repeat that asking a lawyer is your only option; the most interesting question is usually whether the permission to use any patented technology is also transferred with the licence.
The owner of the code can redistribute it under any license he pleases. So yes, you can distribute it under BSD and GPL and propietary at the same time.
You should be careful with contributions though. If a third party contributes a patch or something, then you're not the owner of THAT derivate code. If it's BSD, you can add it to your propietary branch (with the appropiate copyright notice). If it's GPL you can't.

C program to call pam_passwdqc.so and report password strength, pass/fail

Is it possible (and where would I find the interface documentation) to write a simple C program to use pam_passwdqc.so to determine if a potential password will be strong enough to pass muster under passwd?
I think what you actually want is libpasswdqc, which is the stand alone version of the PAM module. The source / download links are at the middle of the page(note, if you just want the checking functionality, you probably just want the library).
The file INTERNALS points you to the header, which is brief and self explanatory. The file pwqcheck.c illustrates pretty much what you want to accomplish.
At least on my Ubuntu workstation, I could not find a package that didn't also install all of the PAM bits. The stand alone library is small enough to drop into almost any tree, if the dependency would be problematic for you.
Then again, you could try linking to the DSO, The interface might be the same. The way my OS packages it, it's kind of hard to tell. The library uses the most permissive version of the BSD license that I've ever seen, so dropping it in place is a non-issue:
Redistribution and use in source and
binary forms, with or without
modification, are permitted.
THIS SOFTWARE IS PROVIDED BY THE
AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Pam is using cracklib for password checking, you should check it also.

If I use open source code with license X, does my code that uses it have be under license X? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
For example, if I use some open source code that is licensed with an MIT license in my (commercial) project, does my project in turn have to be under the MIT license or do I have to distribute the MIT license or anything like that?
No, the MIT license (similar to the BSD license) is very permissive in this regard. You can mostly do with libraries (and other software) released under this license whatever you want. Just if you bundle code from an MIT-licensed project with your own project, you, as far as I can tell, have to keep the license and copyright header of the affected files in place. For details read the license carefully :-)
The term you are looking for here is "viral". If a license has a viral nature, software A under that license used in software B affects the license of software B. With MIT as with BSD you should be on the safe side. On the other hand, there are some opensource license that are viral or at least have some traits of a viral license.
I'm not a lawyer, though, so it might be better to ask someone dealing with the legal sides of software licensing
The answer depends on the text of the license. In the case of the MIT license, the text of the license reads (emphasis mine):
Copyright (c) [year] [copyright holders]
Permission is hereby granted, free of
charge, to any person obtaining a
copy of this software and associated
documentation files (the "Software"),
to deal in the Software without
restriction, including without
limitation the rights to use, copy,
modify, merge, publish, distribute,
sublicense, and/or sell copies of the
Software, and to permit persons to
whom the Software is furnished to do
so, subject to the following
conditions:
The above copyright notice and this
permission notice shall be included
in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS",
WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
If you're still unsure of how that affects you, you should really ask a lawyer, not StackOverflow.
It depends on the license, if you modify the code, if your code is derivative, etc. The license will tell you but you do have to read it.
It depends entirely on the conditions imposed by the license, so you have to read it carefully.
Earlier comment is spot on for MIT license. In general, your best bet when mixing proprietary and OSS code is to 1) read the specific license, 2) consult a lawyer, 3) comply with the license. Anything else is asking for trouble

Do you have to pay for GNU GPL software that is "for sale"? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I've seen some software (a Joomla component, to be exact) for sale on a web site. The web site says it is licensed under the GNU GPL2. However it also says you need to pay for every site you use the software on (with bulk discounts).
I know it's perfectly acceptable to sell software under the GPL, however the license implies that the source code must be distributed at no cost.
So is this a legitimate use of the GPL, or is it violating the license? Is it legal to download the software for free (say, from Bittorrent) and use it as I wish?
Here is a FAQ from the GNU site. I think it answers your question:
Does the GPL allow me to sell copies
of the program for money?
Yes, the GPL allows everyone to do this. The right to sell copies is part
of the definition of free software.
Except in one special situation, there
is no limit on what price you can
charge. (The one exception is the
required written offer to provide
source code that must accompany
binary-only release.)
http://www.gnu.org/licenses/gpl-faq.html#DoesTheGPLAllowMoney
Further more:
If I distribute GPL'd software for a fee, am I required to also make it
available to the public without a
charge?
No. However, if someone pays your fee
and gets a copy, the GPL gives them
the freedom to release it to the
public, with or without a fee. For
example, someone could pay your fee,
and then put her copy on a web site
for the general public.
For GPL software, the source code must be distributed with the binary version or upon request to anyone who legally obtains the binary version.
Ergo, if you didn't buy the product from them, they are under no obligation to give you the source code.
The obvious flip side to this is that anyone who DOES legitimately get the source code is free to redistribute it as they please.
From my understanding distributing it on bittorrent would be redistribution which is permitted under the GPL without limitation (however Trademarks etc could still be violated!) This is how projects like CentOS work - they remove the trademarks, rebuild and then redistribute - and this is perfectly legal.
The company themselves are under no obligation to release source code unless they distribute the software to you.
So your options are:
Get it from someone else (who redistributes it under the GPL)
Purchase the product from the company - they'll give you the source code
I would personally suggest the latter option because it supports companies that support the GPL!
One question is whether the author wrote all the software or used any pre-existing GPLed software. If the person on the web site owns the copyright completely, then the web site may impose any conditions, including those incompatible with the GPL. Of course, releasing it under the GPL gives you some rights by itself. In particular, you can't redistribute without the source code, but you can make copies and use them.
The above practice is generally considered unfriendly by Free and Open Source Software advocates. Since it's not really honest to advertise GPLv2 and not deliver everything necessary, I'd advise being careful about the product. People who deliberately misrepresent things in advertising are likely to be selling shoddy software.
If the software contains pre-existing GPLed components, and the author didn't come to other terms with the copyright holders, then the GPL applies in full. The distributor has to provide source code (either with the executable or on request at nominal cost) and may not impose restrictions not allowed by the GPL.
There's also the possibility that the author released under GPLv2 without actually understanding the license. This happens from time to time, and frequently the FSF will quietly work with companies on getting into compliance.
In either case, it's perfectly fine to sell the software. If somebody else has the software including the source, they can redistribute freely, and it's perfectly legal for you to get it from them.
This is obviously a very simple business trick that relies on the naivity of the purchaser. It is obvious that, if the component is GPL, you can get it from any other user (bittorrent, file sharing), redistribute it and even resell it (but keep it GPL).
It is also very obvious that, if there's no other source to find/get it from, if you purchase, there is absolutely no need to pay multiple times for it. You just need to buy it once, and re-use it on all of the websites that you wish.
Even if it has some source of protection, the source code is open, so you can easily remove that protection.
Just out of curiousity, can you please give the name/website of the Joomla! component?

Putting license in each code file? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I find it unnecessarily duplicated to have it in each code file, but I see it on most open source projects. Should I do that same, or just include a single license outside the code?
A single one outside the code, please! I don't know about the others, but I hate seeing the same thing on top of every file.
I think I've read it a few times, just by page_down-ing through it.
EULA is the wrong term here, as the people looking at source code usually are not end users.
Legally, it makes no difference either; copyright does not need to be declared explicitly.
Basically, all you achieve is a lower risk of people accidentally violating your license terms. You'll have to decide how important that is to you.
I'd say the best compromise is to put a very short header containing a link (absolute URL as well as relative within the project) to the full license text into each source code file. That way, anyone who cares about the license knows where to find it (ideally, people who're willing to pay massive license fees; you certainly want those people to be able to contact you!)
It might depend on the license. The GPL distinguishes between preamble and license. It clearly states, that the (annoying) preamble must be part of the code:
Can I omit the preamble of the GPL, or the instructions for how to use
it on your own programs, to save space?
The preamble and instructions are integral parts of the GNU GPL and may not be omitted. In fact, the GPL is copyrighted, and its
license permits only verbatim copying of the entire GPL. (You can use
the legal terms to make another license but it won't be the GNU GPL.) (1)
Source:
1) http://www.gnu.org/licenses/gpl-faq.html#GPLOmitPreamble
See also http://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
A free ebook from ifrOSS explains and comments the GPL 2 in german language. There is another one for GPL 3
For a well founded answer you should ask for a legal advice which is not available on sx. If you can not find a lawyer for your (open source) project, have a look at the FSFE legal network.
No, you don't have to put the license in each source code file.
If you look closer, most FOSS applications don't do that either. They put a copyright statement at the top of each file and a short sentence telling you what license the file is under and where you can find the full text of the license. They usually point you to the COPYING or LICENSE file containing the full text of the license and/or to a website that contains the full text (in case the COPYING file isn't there anymore).
Like Michael Borgwardt said in his answers, legally you don't have to do this. But it is advisable for source code that you intend to distribute since people can immediately see who has the copyright and what the license is.
I think the reasoning behind putting it in each file is a legal one. If the agreement is in each file, there is no chance of someone stumbling across a piece of code without being exposed to the license.
It may not be a good one, but all the big boys use it so if it's just visual pain, I would look for a better reason not to do the same.
If you're using GPL this is more of an issue, but if you're using public domain licenses like BSD or MIT, I don't think you really care what people do with the code anyway. I suppose it depends on how strict your license is.
IANAL,
Assuming you are talking about licensing, not a EULA, you can put the license outside. This is almost always done with really long licenses such as the GPL. It would be silly to put the entire GPL license in every file. Usually you would just have some type of notice saying where you can find the actual license. This is perfectly legal. However, with really short licenses such as BSD/Apache/MIT/whatever, it is simpler to just include to license in every file, since the notice saying where to find the license would be almost as long as the license itself.
If your code is going to be compiled so you are just distributing a binary then it really does not matter. Because when you create a binary, the comments are removed before the compilation process takes place. It only matters if you will be distributing the actual source code either open source or closed source. This typical matters if you will be distributing a application in a scripting language that doesn't compile.
It depends on what the license dictates. The GPL, for example, instructs you to put a short notice in every source file, include the entire license somewhere in your source distribution, and make your source distribution available to anyone who get a copy of the binary distribution.
If you disagree with this, and it is YOUR code, you're free to choose a more agreeable license, or create your own.
You dont need it for the license, a single external file will do as long as its clear what files it covers.
However for Copyright you should have the copyright notice on every piece of text.
What I do is to put a two-line comment at the top of the file, stating my company's name, last revision date and the name of the license the source file has, then at the very bottom of the file a short version of the license.
Of course, the full license (all of them in case of multiple licenses) is always enclosed on source file and release directories.

Resources