You should investigate the following procedures for yourself:
seek (5861) statl (6045) sslep (5979) dup (6069) fstat (6014) owner (6791) stat (6028) suser (6811)