Subject: those annoying "set*uid is deprecated" messages
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: John Kohl <jtk@atria.com>
List: current-users
Date: 07/19/1994 17:15:55
In the process of porting some software to NetBSD, I'm getting run-time
messages of the sort "foo: This program uses setreuid() which is
deprecated".
I recall the tail end of a discussion about this when I joined
current-users, but don't recall. Are these messages going to be tossed
in favor of program load time messages? [In particular, I consider them
evil because they cause me protocol problems on an RPC service which had
stderr connected to the socket]
On a related topic, is there some way to do this:
be running as ruid=euid=0 (some authentication program)
set one of the uid's to a user, then run some functions which fetch
kerberos tickets for that user, giving the file his/her UID
set them both back to root to complete other login stuff
set them both to the user's UID, and exec his/her shell
No combination I've tried of seteuid(), setruid(), setuid() or
setreuid() seems to make this happen, and some combinations that don't
return system call errors don't actually affect the UIDs.
Suggestions (besides forking---too much state needs to be passed unless
I toss the code and rewrite it, which I'd rather not do, as I want to
feed changes back to the maintainers)?
==John
------------------------------------------------------------------------------