ugidfw_system.c (106648) | ugidfw_system.c (108376) |
---|---|
1/*- 2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 3 * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed by Robert Watson for the TrustedBSD Project. 7 * 8 * This software was developed for the FreeBSD Project in part by Network --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * | 1/*- 2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 3 * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed by Robert Watson for the TrustedBSD Project. 7 * 8 * This software was developed for the FreeBSD Project in part by Network --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * |
34 * $FreeBSD: head/sys/security/mac_bsdextended/mac_bsdextended.c 106648 2002-11-08 18:04:36Z rwatson $ | 34 * $FreeBSD: head/sys/security/mac_bsdextended/mac_bsdextended.c 108376 2002-12-28 23:41:18Z rwatson $ |
35 */ 36/* 37 * Developed by the TrustedBSD Project. 38 * "BSD Extended" MAC policy, allowing the administrator to impose 39 * mandatory rules regarding users and some system objects. 40 * 41 * XXX: Much locking support required here. 42 */ --- 231 unchanged lines hidden (view full) --- 274 int acc_mode) 275{ 276 int error, i; 277 278 for (i = 0; i < rule_slots; i++) { 279 if (rules[i] == NULL) 280 continue; 281 | 35 */ 36/* 37 * Developed by the TrustedBSD Project. 38 * "BSD Extended" MAC policy, allowing the administrator to impose 39 * mandatory rules regarding users and some system objects. 40 * 41 * XXX: Much locking support required here. 42 */ --- 231 unchanged lines hidden (view full) --- 274 int acc_mode) 275{ 276 int error, i; 277 278 for (i = 0; i < rule_slots; i++) { 279 if (rules[i] == NULL) 280 continue; 281 |
282 /* 283 * Since we don't separately handle append, map append to 284 * write. 285 */ 286 if (acc_mode & VAPPEND) { 287 acc_mode &= ~VAPPEND; 288 acc_mode |= VWRITE; 289 } 290 |
|
282 error = mac_bsdextended_rulecheck(rules[i], cred, object_uid, 283 object_gid, acc_mode); 284 if (error) 285 return (error); 286 } 287 288 return (0); 289} --- 461 unchanged lines hidden --- | 291 error = mac_bsdextended_rulecheck(rules[i], cred, object_uid, 292 object_gid, acc_mode); 293 if (error) 294 return (error); 295 } 296 297 return (0); 298} --- 461 unchanged lines hidden --- |