From owner-p4-projects@FreeBSD.ORG Tue Jun 27 05:11:59 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A9C8216A40F; Tue, 27 Jun 2006 05:11:59 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FB9D16A405 for ; Tue, 27 Jun 2006 05:11:59 +0000 (UTC) (envelope-from als@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E649343D90 for ; Tue, 27 Jun 2006 05:11:58 +0000 (GMT) (envelope-from als@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5R5BwCF087695 for ; Tue, 27 Jun 2006 05:11:58 GMT (envelope-from als@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5R5BwZN087692 for perforce@freebsd.org; Tue, 27 Jun 2006 05:11:58 GMT (envelope-from als@FreeBSD.org) Date: Tue, 27 Jun 2006 05:11:58 GMT Message-Id: <200606270511.k5R5BwZN087692@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to als@FreeBSD.org using -f From: Alex Lyashkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 100114 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2006 05:11:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=100114 Change 100114 by als@als_head on 2006/06/27 05:11:37 whitespace fixes. introduce storage for pointers to private module data. Affected files ... .. //depot/projects/jail2/sys/sys/jail.h#3 edit Differences ... ==== //depot/projects/jail2/sys/sys/jail.h#3 (text+ko) ==== @@ -24,7 +24,7 @@ int pr_version; int pr_id; char pr_path[MAXPATHLEN]; - char pr_host[MAXHOSTNAMELEN]; + char pr_host[MAXHOSTNAMELEN]; u_int32_t pr_ip; /* network order */ }; #define XPRISON_VERSION 1 @@ -56,6 +56,7 @@ #include #include +#include #include #include #include @@ -73,29 +74,30 @@ * required to read * (d) set only during destruction of jail, no mutex needed * (n) not need locking or atomic operation - * (i) have internal locker + * (i) have internal locker */ struct prison { - LIST_ENTRY(prison) pr_list; /* (a) all prisons */ - int pr_id; /* (c) prison id */ - int pr_refcnt; /* (p) refcount */ + LIST_ENTRY(prison) pr_list; /* (a) all prisons */ + int pr_id; /* (c) prison id */ + int pr_refcnt; /* (p) refcount */ - uint32_t pr_flags; /* (n) flags for jails restructions + uint32_t pr_flags; /* (n) flags for jails restructions * see J_*_FL in jail_flags.h */ - char pr_host[MAXHOSTNAMELEN]; /* (p) jail hostname */ + char pr_host[MAXHOSTNAMELEN]; /* (p) jail hostname */ void *pr_linux; /* (p) linux abi */ - int pr_securelevel; /* (p) securelevel */ - struct task pr_task; /* (d) destroy task */ - struct mtx pr_mtx; - struct jail_tasks pr_tasks; /* (i) tasks in jail */ - struct jail_disks pr_disk; /* (i) disk usage */ - struct jail_network pr_network; /* (i) network for jail */ - struct jail_sysvipc pr_ipc; /* (n) SYSV IPC for jail */ - struct jail_limits pr_limits; /* (n) various limits for jail */ + int pr_securelevel; /* (p) securelevel */ + struct task pr_task; /* (d) destroy task */ + struct mtx pr_mtx; + struct jail_tasks pr_tasks; /* (i) tasks in jail */ + struct jail_disks pr_disk; /* (i) disk usage */ + struct jail_network pr_network; /* (i) network for jail */ + struct jail_sysvipc pr_ipc; /* (n) SYSV IPC for jail */ + struct jail_limits pr_limits; /* (n) various limits for jail */ /* (c) per jail uid info */ LIST_HEAD(uihashhead, uidinfo) *uihashtbl; /* (i) also protected with uihash mutex */ - u_long uihash; /* (c) size of hash table - 1 */ + u_long uihash; /* (c) size of hash table - 1 */ + void *mod_data[JMODULE_COUNT] /* (i) modules private data */ }; #endif /* _KERNEL || _WANT_PRISON */ @@ -127,7 +129,7 @@ int prison_canseemount(struct ucred *cred, struct mount *mp); void prison_enforce_statfs(struct ucred *cred, struct mount *mp, struct statfs *sp); - + /* jails control */ struct prison *prison_alloc(uint32_t ctx_id); struct prison *prison_find(int prid); @@ -136,7 +138,7 @@ /* task control */ int jail_migrate(struct thread *td, struct prison *pr); - + /* network */ int prison_if(struct ucred *cred, struct sockaddr *sa); int prison_ip(struct ucred *cred, uint32_t *ip);