Commit d82d83bb authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] 2.5.6-pre3 Fix BSD accounting rlimit

Fix rlimit on accounting file.
parent 1c7efed1
......@@ -311,6 +311,7 @@ static void do_acct_process(long exitcode, struct file *file)
struct acct ac;
mm_segment_t fs;
unsigned long vsize;
unsigned long flim;
/*
* First check to see if there is enough free_space to continue
......@@ -372,8 +373,14 @@ static void do_acct_process(long exitcode, struct file *file)
*/
fs = get_fs();
set_fs(KERNEL_DS);
/*
* Accounting records are not subject to resource limits.
*/
flim = current->rlim[RLIMIT_FSIZE].rlim_cur;
current->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
file->f_op->write(file, (char *)&ac,
sizeof(struct acct), &file->f_pos);
current->rlim[RLIMIT_FSIZE].rlim_cur = flim;
set_fs(fs);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment