> e.g. diskfs_S_file_chown would look like this:
> 
>      err = fshelp_isroot (&diskfs_underlying_stat, cred->user);
>      if (!err)
>      {
>        err = fshelp_isowner (&np->dn_stat, cred->user);
>        if (!err
>          && ((uid != (uid_t) -1
>               && !idvec_contains (cred->user->uids, uid))
>              || (gid != (gid_t) -1
>                  && !idvec_contains (cred->user->gids, gid))))
>        err = EPERM;
>      }
>      if (!err)
>         ... do it ...

It has occured to me: should suid binaries on a user mounted file system
be run as the owner of the filesystem?

PGP signature

Reply via email to