Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!uhccux!munnari.oz.au!bruce!monu1!monu6!minyos!s887212 From: s887212@minyos.xx.rmit.oz.au (Stephen Riehm [Romulis]) Newsgroups: comp.unix.questions Subject: who am i? Message-ID: <6358@minyos.xx.rmit.oz.au> Date: 27 Nov 90 03:37:22 GMT Organization: RMIT Computer Centre, Melbourne Australia. Lines: 13 I am writing a program that needs to know who is running it. at the moment I am using getuid() to index into the /etc/passwd file for the details needed (like name etc). However I have noticed that it doesn't always return the right response after the process table (I assume) gets a bit messed up. (Xterms do wonderful things to the process table dont they?! :) Is there a GUARANTEED way of getting the information about the user? I dont want to rely on environment variables as they can easily be forged or not set by the user. I am using a multimax with UMAX (SysV). any hints?