Path: utzoo!utgpu!cunews2!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: chris@bilby.cs.uwa.oz.au (chris mcdonald) Newsgroups: comp.sys.sun Subject: How to find the real uid/gid of a process? Keywords: Miscellaneous Message-ID: <2884@brchh104.bnr.ca> Date: 23 May 91 18:47:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 25 Approved: Sun-Spots@rice.edu X-Original-Date: 6 May 91 09:22:20 GMT X-Sun-Spots-Digest: Volume 10, Issue 102, message 5 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu Me again, still trying to understand the SunOS kvm_* routines. I would like to determine the real uid and gid of each process, but can't seem to access them from each struct proc returned by kvm_nextproc(); Assuming: struct proc theproc; when I attempt to access theproc->p_cred I get a Memory Fault, and when I access it as root I get a Segv. I see in there are some nice functions, such as crget(), but that these are only accessible in the kernel. Is there any way to get real uids and gids from the proc or user structs? Unfortunately Leffler is no help on this. While you're here, why are the cred #defines actually in and not ? Thanks, Department of Computer Science, ACSnet: chris@budgie.cs.uwa.oz.au University of Western Australia, ARPA: chris%budgie.cs.uwa.oz.au@uunet.uu.net Mounts Bay Road, FTP: bison.cs.uwa.oz.au, 130.95.1.23 Crawley, Western Australia, 6009. SCUD: (31.97 +/-10% S, 115.81 +/-10% E) PHONE: ((+61) 09) 380 2533 FAX: ((+61) 09) 382 1688