if (!strncmp(scsi_result+8,"NEC",3)) {
if (!strncmp(scsi_result+16,"CD-ROM DRIVE:84 ",16) ||
- !strncmp(scsi_result+16,"CD-ROM DRIVE:25",15))
+ !strncmp(scsi_result+16,"CD-ROM DRIVE:25",15) ||
+ !strncmp(scsi_result+16,"CD-ROM DRIVE:83",15))
SDpnt->manufacturer = SCSI_MAN_NEC_OLDCDR;
else
SDpnt->manufacturer = SCSI_MAN_NEC;
asmlinkage int sys_setregid(gid_t rgid, gid_t egid)
{
int old_rgid = current->gid;
+ int old_egid = current->egid;
if (rgid != (gid_t) -1) {
if ((old_rgid == rgid) ||
(egid != (gid_t) -1 && egid != old_rgid))
current->sgid = current->egid;
current->fsgid = current->egid;
+ if (current->egid != old_egid)
+ current->dumpable = 0;
return 0;
}
*/
asmlinkage int sys_setgid(gid_t gid)
{
+ int old_egid = current->egid;
+
if (suser())
current->gid = current->egid = current->sgid = current->fsgid = gid;
else if ((gid == current->gid) || (gid == current->sgid))
current->egid = current->fsgid = gid;
else
return -EPERM;
+ if (current->egid != old_egid)
+ current->dumpable = 0;
return 0;
}
asmlinkage int sys_setreuid(uid_t ruid, uid_t euid)
{
int old_ruid = current->uid;
+ int old_euid = current->euid;
if (ruid != (uid_t) -1) {
if ((old_ruid == ruid) ||
(euid != (uid_t) -1 && euid != old_ruid))
current->suid = current->euid;
current->fsuid = current->euid;
+ if (current->euid != old_euid)
+ current->dumpable = 0;
return 0;
}
*/
asmlinkage int sys_setuid(uid_t uid)
{
+ int old_euid = current->euid;
+
if (suser())
current->uid = 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;
return(0);
}
if (uid == current->uid || uid == current->euid ||
uid == current->suid || uid == current->fsuid || suser())
current->fsuid = uid;
+ if (current->fsuid != old_fsuid)
+ current->dumpable = 0;
return old_fsuid;
}
if (gid == current->gid || gid == current->egid ||
gid == current->sgid || gid == current->fsgid || suser())
current->fsgid = gid;
+ if (current->fsgid != old_fsgid)
+ current->dumpable = 0;
return old_fsgid;
}
static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct sock *sk=(struct sock *)sock->data;
- int err;
+ int err, pid;
switch(cmd)
{
err=verify_area(VERIFY_READ,(int *)arg,sizeof(long));
if(err)
return err;
- sk->proc = get_fs_long((int *) arg);
+ pid = get_fs_long((int *) arg);
+ /* see inet_fcntl */
+ if (current->pid != pid && current->pgrp != -pid && !suser())
+ return -EPERM;
+ sk->proc = pid;
return(0);
case FIOGETOWN:
case SIOCGPGRP:
* Alan Cox : tcp_data() doesn't ack illegal PSH
* only frames. At least one pc tcp stack
* generates them.
+ * Mark Yarvis : In tcp_read_wakeup(), don't send an
+ * ack if stat is TCP_CLOSED.
*
*
* To Fix:
if (!sk->ack_backlog)
return;
+ /*
+ * If we're closed, don't send an ack, or we'll get a RST
+ * from the closed destination.
+ */
+ if ((sk->state == TCP_CLOSE) || (sk->state == TCP_TIME_WAIT))
+ return;
+
/*
* FIXME: we need to put code here to prevent this routine from
* being called. Being called once in a while is ok, so only check