fcntl F_SETOWN correct?

Jeff Garzik (jgarzik@pobox.com)
Wed, 26 May 1999 10:50:11 -0400 (EDT)


Here is some code from sys_fcntl() in fs/fcntl.c:

case F_SETOWN:
err = 0;
filp->f_owner.pid = arg;
filp->f_owner.uid = current->uid;
filp->f_owner.euid = current->euid;
if (S_ISSOCK (filp->f_dentry->d_inode->i_mode))
err = sock_fcntl (filp, F_SETOWN, arg);
break;

It looks like no validation is done when setting the 'pid' field.

Is this correct, or should it check to make sure the pid is valid, and
owned by the current user?

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/