Code and law have been inextricably mixed ever since Richard Stallman drew up the first GNU GPL. Indeed, in many ways, the logical processes for crafting both are similar - which is probably handy. Nonetheless, law does present special problems that hackers need to be aware of.
To provide some help, the Software Freedom Law Center has just put together a useful
legal issues primer for open source and free software projects: