bug #5903 (race condition in lpr) was fixed by adding calls to seteuid() before the calls to open(). The problem is that the value returned from seteuid() isn't checked. If seteuid fails, the race condition is still there. Why would seteuid() fail, you ask? Check out http://www.securityfocus.com/bid/1322 for an example.
This kernel bug has already been addressed by a kernel advisory.
The kernal bug that I pointed out was an example. If you don't fix the problem in lpr, it will be suseptable to all future problems of that type.