subr_acl_posix1e.c (184427) | subr_acl_posix1e.c (192586) |
---|---|
1/*- 2 * Copyright (c) 1999-2006 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * This software was developed by Robert Watson for the TrustedBSD Project. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 20 unchanged lines hidden (view full) --- 29 * Developed by the TrustedBSD Project. 30 * 31 * ACL support routines specific to POSIX.1e access control lists. These are 32 * utility routines for code common across file systems implementing POSIX.1e 33 * ACLs. 34 */ 35 36#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999-2006 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * This software was developed by Robert Watson for the TrustedBSD Project. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 20 unchanged lines hidden (view full) --- 29 * Developed by the TrustedBSD Project. 30 * 31 * ACL support routines specific to POSIX.1e access control lists. These are 32 * utility routines for code common across file systems implementing POSIX.1e 33 * ACLs. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/kern/subr_acl_posix1e.c 184427 2008-10-28 21:58:48Z trasz $"); | 37__FBSDID("$FreeBSD: head/sys/kern/subr_acl_posix1e.c 192586 2009-05-22 15:56:43Z trasz $"); |
38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/mount.h> 42#include <sys/priv.h> 43#include <sys/vnode.h> 44#include <sys/errno.h> 45#include <sys/stat.h> --- 358 unchanged lines hidden (view full) --- 404 */ 405struct acl_entry 406acl_posix1e_mode_to_entry(acl_tag_t tag, uid_t uid, gid_t gid, mode_t mode) 407{ 408 struct acl_entry acl_entry; 409 410 acl_entry.ae_tag = tag; 411 acl_entry.ae_perm = acl_posix1e_mode_to_perm(tag, mode); | 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/mount.h> 42#include <sys/priv.h> 43#include <sys/vnode.h> 44#include <sys/errno.h> 45#include <sys/stat.h> --- 358 unchanged lines hidden (view full) --- 404 */ 405struct acl_entry 406acl_posix1e_mode_to_entry(acl_tag_t tag, uid_t uid, gid_t gid, mode_t mode) 407{ 408 struct acl_entry acl_entry; 409 410 acl_entry.ae_tag = tag; 411 acl_entry.ae_perm = acl_posix1e_mode_to_perm(tag, mode); |
412 acl_entry.ae_entry_type = 0; 413 acl_entry.ae_flags = 0; |
|
412 switch(tag) { 413 case ACL_USER_OBJ: 414 acl_entry.ae_id = uid; 415 break; 416 417 case ACL_GROUP_OBJ: 418 acl_entry.ae_id = gid; 419 break; --- 218 unchanged lines hidden --- | 414 switch(tag) { 415 case ACL_USER_OBJ: 416 acl_entry.ae_id = uid; 417 break; 418 419 case ACL_GROUP_OBJ: 420 acl_entry.ae_id = gid; 421 break; --- 218 unchanged lines hidden --- |