Setuid has drawbacks in general, due to the possibility of escalating privileges without authentication. Even the concept of root privilege is a bit outdated. Most platforms have updated methods for obtaining additional privileges, whether from the shell with "sudo" on unix and "pfexec" on Solaris, for example.
In addition, they typically have finer-grained controls, for which the privileges they require are exacerbated. Using setuid, whether itβs all or not, but with Solaris RBAC, for example, the environment provides methods for determining the exact privileges (s) you need, usually at a lower level, such as opening files, reading directories, etc.
In general, I think that now you should avoid setuid for anything and use newer APIs.
creechy
source share