Re: table ownerships
Posted in 1992
>From: uunet!tetra.co.uk!nick (Nick Rumble) >Subject: table ownerships >Date: Wed, 10 Jun 92 21:35:38 BST >Message-Id: <9206102035.aa11277@saturn.tetra.co.uk> >X-Informix-List-Id: <list.1231> > >I have an application that allows users to `clear down' old >orders from an orders table by creating a temporary copy >containing records to be kept, and then renaming it to the >original table. Any user can perform this task, therefore any >user may `own' the new master table. > >Without giving RESOURCE or DBA privileges to all users, how can I >enable users who do *not* own the table, to drop it. The orthodox answer is "you can't". You can consider some sort of SUID scheme which allows one program to run as some special user, but the program will have to be started as SUID root, and it will have to set the real UID to the required value (as well as the effective UID), because the engine uses the real UID to determine access privileges. >I'm currently running 4.10 SE/Online but can move to 5.0 if >necessary. Ah, now... if you have 5.0, you could write a DBA-privileged stored procedure to do the job. You can control who can execute the procedure, and the user can have DBA privileges while the procedure is run, but not otherwise. Since the procedure is known not to allow anything to be damaged (isn't it!), the user can do no damage. Yours sincerely, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>