diff options
| author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2002-03-10 21:57:35 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-03-10 21:57:35 -0800 |
| commit | d82d83bbc7e3daaf6456487901a3597139b46731 (patch) | |
| tree | c96678b908731300d50754bc148ac7650c7534d2 | |
| parent | 1c7efed15ce0c80f950a6a88f5af3270033d19f4 (diff) | |
[PATCH] 2.5.6-pre3 Fix BSD accounting rlimit
Fix rlimit on accounting file.
| -rw-r--r-- | kernel/acct.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index 99f44df17b49..a2787eb242a1 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -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); } |
