Police officers are allowed something known as "plain view" (I think that's what it's called). At any rate it is a procedure regulated to the senses; most importantly sight, smell, and sound. If I cop pulls you over and smells some dank, he would have probable cause to execute a search, within reason. I can't hash out the specifics, but even if they have probable cause to search the interior of the car, I do believe places like the trunk are protected, again unless the search warrants differently.
The reason the supreme court rejects the notion of dogs as a legal means of a search can be read in the dissenting decision
http://caselaw.lp.findlaw.com/script...0&invol=03-923 (or at least the dissenting opinions).