From: Martijn van Oosterhout (kleptog@cupid.suninternet.com)
Date: Tue 14 Mar 2000 - 16:27:01 IST
Joseph Miller wrote: > > I am trying to use setuid() to avoid having to run my svgalib program as root. In my simple minded way, I logged on as root, did an id; and saw that my uid was 0 (number 0). In the main program, I included #include <unistd.h>, and then the command setuid(0); When I ran the program as a mere mortal, "insuficient IO priviledges" error occured again. > > What am I missing? Thanks in advance. If linux allowed any person to type setuid(0) in their programs and actually get root, linux wouldn't be very secure, would it. setuid(0) only gets you root if your program started with it in some way, either by the setuid bit on the binary or running the program as root. Can't really help you with your problem, but I can't wait till capabilites when I can give myself CAP_RAW_IO (or some such) and have everything work. Use the setuid bit or run as root. -- Martijn van Oosterhout <kleptog@cupid.suninternet.com> Trust the computer industry to shorten "Year 2000" to Y2K. It was this kind of thinking that caused the problem in the first place.
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST