summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2005-11-02 21:18:07 +0000
committerps <ps@FreeBSD.org>2005-11-02 21:18:07 +0000
commite0951fe5041ade134381562a4cbf4bc0e2fb7219 (patch)
tree579fb2f2f747602f163048fe8fc4c723adbadd1a /sys/compat
parent830d2103fbe6636ab7adf8d4fb308b9a383be46f (diff)
downloadFreeBSD-src-e0951fe5041ade134381562a4cbf4bc0e2fb7219.zip
FreeBSD-src-e0951fe5041ade134381562a4cbf4bc0e2fb7219.tar.gz
Calling setrlimit from 32bit apps could potentially increase certain
limits beyond what should be capiable in a 32bit process, so we must fixup the limits. Reviewed by: jhb
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/ia32/ia32_sysvec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c
index 1052d61..a18163b 100644
--- a/sys/compat/ia32/ia32_sysvec.c
+++ b/sys/compat/ia32/ia32_sysvec.c
@@ -93,7 +93,7 @@ CTASSERT(sizeof(struct ia32_sigframe4) == 408);
#endif
static register_t *ia32_copyout_strings(struct image_params *imgp);
-static void ia32_fixlimits(struct image_params *imgp);
+static void ia32_fixlimits(struct proc *p);
extern struct sysent freebsd32_sysent[];
@@ -278,9 +278,8 @@ static u_long ia32_maxvmem = IA32_MAXVMEM;
SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxvmem, CTLFLAG_RW, &ia32_maxvmem, 0, "");
static void
-ia32_fixlimits(struct image_params *imgp)
+ia32_fixlimits(struct proc *p)
{
- struct proc *p = imgp->proc;
struct plimit *oldlim, *newlim;
if (ia32_maxdsiz == 0 && ia32_maxssiz == 0 && ia32_maxvmem == 0)
OpenPOWER on IntegriCloud