Path: utzoo!attcan!uunet!visdc!jiii From: jiii@visdc.UUCP (John E Van Deusen III) Newsgroups: comp.unix.questions Subject: Re: again Summary: setuid(getuid()) type mismatch Message-ID: <510@visdc.UUCP> Date: 17 Apr 89 17:24:42 GMT References: <1051@aplcen.apl.jhu.edu> Reply-To: jiii@visdc.UUCP (John E Van Deusen III) Organization: VI Software Development, Boise, Idaho Lines: 16 In article <1051@aplcen.apl.jhu.edu> (Ken Arromdee (600.429)) writes: > > I have a program which is run setuid. I want to set the uid back to > the original before exec'ing a shell. >-------------------------------------------------------------- > extern unsigned short getuid(); > ... > > setuid(getuid()); You have declared getuid() to return an unsigned short. Setuid expects its argument to be an int. Lint(1) complains. -- John E Van Deusen III, PO Box 9283, Boise, ID 83707, (208) 343-1865 uunet!visdc!jiii