> I looked in sqllib/bin for the instance-owner but all executables there
> are owned by the instance-owner, and none have the setuid bit.
That's surprising. All executables in sqllib/bin should be owned by bin:bin
and not the instance owner.
> I also looked in sqllib/adm, where several executables are owned by
> root and have setuid.
And several executables are owned by the instance owner, or the fenced user,
and may have the setuid bit set.
> However, some db2 executables are not in the instance-owner's tree, but
> instead are in /opt/IBM/db2 tree, and additionally some executables
Don't pay attention to the man behind the curtain.
(These should not be called directly, although eTrust may not know the
difference between calling something in sqllib/bin vs /opt/IBM/db2/V8.1/bin
since sqllib/bin is not a real directory but a symlink back
to /opt/IBM/db2/V8.1/bin.)
> that have setuid set do not appear to actually request root access at
> runtime (for example: db2stop), according to eTrust. Additionally some
> programs are in the administrative-server user's tree.
Perhaps they don't need root for the cases in which you call them, but may
need root access for some other cases that you've not encountered. Off the
top of my head, I would imagine that if you upgraded to the Database
Partitioning Feature (DPF) of ESE, db2stop may need root to perform an rcmd
to all the other nodes to stop them as well. This is just a guess, and
there may be other cases that you've not run into yet.
> Hence my original question: which db2 executables actually *need* root
> access at runtime (as distinct from those with setuid) ? I was hoping
> for some kind of specification with an explicit list of executables
> that really need root, but cannot see it in the docs yet.
I would imagine that if IBM could tell you specifically which executables
*need* root, they'd just turn off root-setuid for the rest. In otherwords,
IBM would believe that the files that need root have it, and those that
don't, well, don't.
> However, some db2 executables are not in the instance-owner's tree, but
> instead are in /opt/IBM/db2 tree,
You can use "ls -lL" to automatically dereference links and get the
information you want. The physical placement of a file in the directory
tree hardly matters, does it?

Signature
Knut Stolze
Information Integration Development
IBM Germany / University of Jena