Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!mips!smsc.sony.com!dce From: dce@smsc.sony.com (David Elliott) Newsgroups: comp.unix.questions Subject: Re: Messages to the console Message-ID: <1990Nov27.161046.11007@smsc.sony.com> Date: 27 Nov 90 16:10:46 GMT References: <25112@adm.brl.mil> Organization: Sony Microsystems Corp, San Jose, CA Lines: 21 In article <25112@adm.brl.mil> sct60a.sunyct.edu!buck@sct60a.sunyct.edu (Jesse R. Buckley Jr.) writes: > >On Nov 26, 16:10, iis!venkat%sun.com@nisc.nyser.net wrote: >} I have a process running in the background at all times which performs certain >} tasks. How can my process write messages to the system console irrespective >} of who owns /dev/console? Any responses will be appreciated. > > Simple, just make your process Set uid root. Which may or may not be simple. Even assuming that Venkat has root priveleges, changing just any old program to be setuid can have serious consequences. I recently found that a program that had been changed to setuid root for using the SVR4 real-time scheduler didn't deal with file access correctly, and could be used by anyone to overwrite any file in the system. In this case, I believe it's better to use some connection to syslog (either the syslog subroutine or the logger program), since that will allow for configuration of the messages. Programs (including parts of the kernel) should avoid writing directly to the console.