Kevin
It depends upon how the author of the code licensed it. You might want to take a look at this article talking the the difference between the different types of open source licenses:
http://www.opensource.org/licenses/