jailed-kern.patch

belczyk, 03/19/2006 09:23 PM

Download (815 Bytes)

View differences:

kern_jail.c 19 Mar 2006 20:26:29 -0000
317 317
SYSCTL_OID(_jail, OID_AUTO, list, CTLTYPE_STRUCT | CTLFLAG_RD, NULL, 0,
318 318
	   sysctl_jail_list, "S", "List of active jails");
319 319

  
320
static int
321
sysctl_jail_jailed(SYSCTL_HANDLER_ARGS)
322
{
323
	struct proc *p = curthread->td_proc;
324
	int error, injail;
325

  
326
	injail = jailed(p->p_ucred);
327
	error = SYSCTL_OUT(req, &injail, sizeof(injail));
328
	return(error);
329
}
330

  
331
SYSCTL_PROC(_jail, OID_AUTO, jailed, CTLTYPE_INT | CTLFLAG_RD, NULL, 0,
332
	    sysctl_jail_jailed, "I", "Process in jail?");
333

  
320 334
void
321 335
prison_hold(struct prison *pr)
322 336
{