#include <linux/pagemap.h>
#include <linux/syscalls.h>
#include <linux/rcupdate.h>
-#include <linux/audit.h>
-#include <linux/vs_base.h>
#include <linux/vs_limit.h>
#include <linux/vs_dlimit.h>
#include <linux/vserver/xid.h>
return error;
}
-EXPORT_SYMBOL_GPL(sys_chdir);
-
asmlinkage long sys_fchdir(unsigned int fd)
{
struct file *file;
return error;
}
-EXPORT_SYMBOL_GPL(sys_chroot);
-
asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
{
struct inode * inode;
dentry = file->f_dentry;
inode = dentry->d_inode;
- audit_inode(NULL, inode, 0);
-
err = -EROFS;
if (IS_RDONLY(inode) || MNT_IS_RDONLY(file->f_vfsmnt))
goto out_putf;
file = fget(fd);
if (file) {
- struct dentry * dentry;
- dentry = file->f_dentry;
- audit_inode(NULL, dentry->d_inode, 0);
- error = chown_common(dentry, file->f_vfsmnt, user, group);
+ error = chown_common(file->f_dentry, file->f_vfsmnt, user, group);
fput(file);
}
return error;
* a fully instantiated struct file to the caller.
* This function is meant to be called from within a filesystem's
* lookup method.
- * Beware of calling it for non-regular files! Those ->open methods might block
- * (e.g. in fifo_open), leaving you with parent locked (and in case of fifo,
- * leading to a deadlock, as nobody can open that fifo anymore, because
- * another process to open fifo will block on locked parent when doing lookup).
* Note that in case of error, nd->intent.open.file is destroyed, but the
* path information remains valid.
* If the open callback is set to NULL, then the standard f_op->open()
fdt = files_fdtable(files);
fd = find_next_zero_bit(fdt->open_fds->fds_bits,
fdt->max_fdset,
- files->next_fd);
+ fdt->next_fd);
/*
* N.B. For clone tasks sharing a files structure, this test
FD_SET(fd, fdt->open_fds);
FD_CLR(fd, fdt->close_on_exec);
- files->next_fd = fd + 1;
+ fdt->next_fd = fd + 1;
vx_openfd_inc(fd);
#if 1
/* Sanity check */
{
struct fdtable *fdt = files_fdtable(files);
__FD_CLR(fd, fdt->open_fds);
- if (fd < files->next_fd)
- files->next_fd = fd;
+ if (fd < fdt->next_fd)
+ fdt->next_fd = fd;
vx_openfd_dec(fd);
}
prevent_tail_call(ret);
return ret;
}
+EXPORT_SYMBOL_GPL(sys_open);
asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
int mode)
prevent_tail_call(ret);
return ret;
}
+EXPORT_SYMBOL_GPL(sys_openat);
#ifndef __alpha__