Re: chroot in swsusp userland interface (was: Re: [Suspend2-devel] Re: [ 00/10] [Suspend2] Modules support.)

From: Bernard Blackham
Date: Mon Feb 06 2006 - 04:04:50 EST


On Sat, Feb 04, 2006 at 08:57:44PM +0100, Rafael J. Wysocki wrote:
> > What about this (untested)?
>
> So you think we should chroot from the user space. Fine.

Here's what suspend2's userspace user interface currently does
before suspending.

static void enforce_lifesavers() {
struct rlimit r;
r.rlim_cur = r.rlim_max = 0;
setrlimit(RLIMIT_NOFILE, &r);
setrlimit(RLIMIT_NPROC, &r);
setrlimit(RLIMIT_CORE, &r);
}

All userspace user interfaces (text, fbsplash, usplash) share this
common code that is run before suspend itself proceeds.

Bernard.

--
Bernard Blackham <bernard at blackham dot com dot au>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/