>
> Speaking of mount options, any of you with an handy Linux box, please answer
> this one:
> How does Linux respond when asked to execute an executable with suid bit on,
> but when on a nosuid-mounted filesystem?
> Is it running with the uid of the executing user? Not running at all? If not
> running, is it -EACESS or -EPERM?
> What about sgid?
>
Runs as the executing user. The relevant snippet from fs/exec.c:
if(!(bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)) {
/* Set-uid? */
if (mode & S_ISUID)
bprm->e_uid = inode->i_uid;
/* Set-gid? */
/*
* If setgid is set but no group execute bit then this
* is a candidate for mandatory locking, not a setgid
* executable.
*/
if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP))
bprm->e_gid = inode->i_gid;
}
Alon
--
This message was sent by Alon Altman ([EMAIL PROTECTED]) ICQ:1366540
GPG public key at http://alon.wox.org/pubkey.txt
Key fingerprint = A670 6C81 19D3 3773 3627 DE14 B44A 50A3 FE06 7F24
--------------------------------------------------------------------------
-=[ Random Fortune ]=-
Most people don't need a great deal of love nearly so much as they need
a steady supply.
--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]