About this list Date view Thread view Subject view Author view Attachment view

From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Sat 23 Oct 2004 - 20:19:35 BST


On Sat, Oct 23, 2004 at 07:06:15PM +0200, uli wrote:
> Hello all,
>
> I got an patch error with patch patch-2.4.25-vs1.27-q0.14.diff in
> file /fs/ioctctl.c. Attached the diff- file:
>
> ***************
> *** 115,120 ****
> else
> error = -ENOTTY;
> break;
> case FIOC_GETXFLG:
> case FIOC_SETXFLG:
> error = -ENOTTY;
> --- 115,154 ----
> else
> error = -ENOTTY;
> break;
> + #ifndef CONFIG_INOXID_NONE
> + case FIOC_GETXID: {
> + struct inode *inode = filp->f_dentry->d_inode;
> +
> + /* fixme: if stealth, return -ENOTTY */
> + error = -EPERM;
> + if (capable(CAP_CONTEXT))
> + error = put_user(inode->i_xid, (int *) arg);
> + break;
> + }
> + case FIOC_SETXID: {
> + struct inode *inode = filp->f_dentry->d_inode;
> + int xid;
> +
> + /* fixme: if stealth, return -ENOTTY */
> + error = -EPERM;
> + if (!capable(CAP_CONTEXT))
> + break;
> + error = -EROFS;
> + if (IS_RDONLY(inode))
> + break;
> + error = -ENOSYS;
> + if (!(inode->i_sb->s_flags & MS_TAGXID))
> + break;
> + error = -EFAULT;
> + if (get_user(xid, (int *) arg))
> + break;
> + error = 0;
> + inode->i_xid = (xid & 0xFFFF);
> + inode->i_ctime = CURRENT_TIME;
> + mark_inode_dirty(inode);
> + break;
> + }
> + #endif
> case FIOC_GETXFLG:
> case FIOC_SETXFLG:
> error = -ENOTTY;
>
>
>
> The problem is that in ioctl after line 111 I see following:
>
> else
> error = -ENOTTY;
> break;
> default:
> error = -ENOTTY;
> if (S_ISREG(filp->f_dentry->d_inode->i_mode))
> error = file_ioctl(filp, cmd, arg);
> else if (filp->f_op && filp->f_op->ioctl)
> error = filp->f_op->ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
> }
> unlock_kernel();
> fput(filp);
>
> out:
> return error;
> }
>
> But I see no lines:
>
> case FIOC_GETXFLG:
> case FIOC_SETXFLG:
> error = -ENOTTY;
>
> Any idea? I do not have any. I used kernel 2.4.25 directly from kernel.org.

yep, that's probably the issue here, the patch should
go ontop of 2.4.25-vs1.27 so you have to patch vs1.27
first ...

I readded the 2.4.27-vs1.29-q0.14 patch, which was
unfortunately removed when I had to restore my backup
you can find it at:

http://www.13thfloor.at/vserver/s_addons/quota/

HTH,
Herbert

> U. Wachtel
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 23 Oct 2004 - 20:19:52 BST by hypermail 2.1.3