Next | Classic Unix Security Problems | 17 |
Typical example:
Program X, running as root, needs to read file Y
But it should only do so if the real user has permission to read Y
A normal program would just do:
if ((fd = open(Y, O_RDONLY)) < 0) if (errno == EPERM) perror(Y);
But because the process is running as root, the open here will always succeed
Next | Copyright © 2005 M. J. Dominus |