core dump odities

Pavel Machek (pavel@atrey.karlin.mff.cuni.cz)
Wed, 1 Oct 1997 12:56:17 +0200


Hi!

I've noticed following code in kernel (which makes problems for me
because my forumd does setuid( nobody ) and then it can not dump
core). I would like to ask why is it this way.

asmlinkage int sys_setuid(uid_t uid)
{
int old_euid = current->euid;
int old_ruid, new_ruid;

old_ruid = new_ruid = current->uid;
if (suser())
new_ruid = current->euid = current->suid = current->fsuid = uid;
else if ((uid == current->uid) || (uid == current->suid))
current->fsuid = current->euid = uid;
else
return -EPERM;

if (current->euid != old_euid)
current->dumpable = 0;
~~~~~~~~~~~~~~~~~~~~~~

I _think_ that if I'm suser(), than current->dumpable should not be
reset. After all, that program now lost all it privilegs and there are
probably other ways how to read its address space - so there may be
nothing important in there.

Pavel

-- 
--
This is my little buggy signature...				Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+