Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!comp.vuw.ac.nz!waikato.ac.nz!aukuni.ac.nz!russell From: russell@ccu1.aukuni.ac.nz (Russell J Fulton;ccc032u) Newsgroups: comp.sys.sgi Subject: cuserid sometimes lies!! Message-ID: <1991Feb18.050356.29383@ccu1.aukuni.ac.nz> Date: 18 Feb 91 05:03:56 GMT Organization: University of Auckland, New Zealand. Lines: 17 The cuserid() call sometime lies! We have a setuid program that used cuserid to find out who was running the program.( Some users are priviledged.) We soon noticed that cuserid sometimes returned the wrong login name! and we had to swap over to using getpwuid to find the login name of the user. In some cases it is predictably wrong eg. if the program is executed from a shell in Unipress emacs cuserid always returns telnet. But in other cases it seems to pick a random (valid) logname. Is this a known problem ? In any case we are reporting it as a bug. Russell. -- Russell Fulton, Computer Center, University of Auckland, New Zealand.