X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=fs%2Fopen.c;h=4f01e06227c69190525944d4a6da07b850715172;hb=1f28fcd925b2b3157411bbd08f0024b55b70d8dd;hp=40d1fa25f5aa3414d2dcacafc36c879d55b6a6f8;hpb=939a9421eb53d3ea83188ae13802779041caefdb;p=safe%2Fjmp%2Flinux-2.6 diff --git a/fs/open.c b/fs/open.c index 40d1fa2..4f01e06 100644 --- a/fs/open.c +++ b/fs/open.c @@ -290,10 +290,9 @@ out: return error; } -SYSCALL_DEFINE2(truncate, const char __user *, path, unsigned long, length) +SYSCALL_DEFINE2(truncate, const char __user *, path, long, length) { - /* on 32-bit boxen it will cut the range 2^31--2^32-1 off */ - return do_sys_truncate(path, (long)length); + return do_sys_truncate(path, length); } static long do_sys_ftruncate(unsigned int fd, loff_t length, int small) @@ -959,6 +958,8 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags, int error; struct file *f; + validate_creds(cred); + /* * We must always pass in a valid mount pointer. Historically * callers got away with not passing it, but we must enforce this at