acl_support.c (180493) | acl_support.c (192586) |
---|---|
1/*- 2 * Copyright (c) 1999-2001, 2008 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26/* 27 * Support functionality for the POSIX.1e ACL interface 28 * These calls are intended only to be called within the library. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999-2001, 2008 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26/* 27 * Support functionality for the POSIX.1e ACL interface 28 * These calls are intended only to be called within the library. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_support.c 180493 2008-07-13 16:37:51Z rwatson $"); | 32__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_support.c 192586 2009-05-22 15:56:43Z trasz $"); |
33 34#include <sys/types.h> 35#include "namespace.h" 36#include <sys/acl.h> 37#include "un-namespace.h" 38#include <errno.h> 39#include <grp.h> 40#include <pwd.h> --- 330 unchanged lines hidden (view full) --- 371 e = &(acl_int->acl_entry[acl_int->acl_cnt]); 372 e->ae_perm = perm; 373 e->ae_tag = tag; 374 e->ae_id = id; 375 acl_int->acl_cnt++; 376 377 return (0); 378} | 33 34#include <sys/types.h> 35#include "namespace.h" 36#include <sys/acl.h> 37#include "un-namespace.h" 38#include <errno.h> 39#include <grp.h> 40#include <pwd.h> --- 330 unchanged lines hidden (view full) --- 371 e = &(acl_int->acl_entry[acl_int->acl_cnt]); 372 e->ae_perm = perm; 373 e->ae_tag = tag; 374 e->ae_id = id; 375 acl_int->acl_cnt++; 376 377 return (0); 378} |
379 380/* 381 * Convert "old" type - ACL_TYPE_{ACCESS,DEFAULT}_OLD - into its "new" 382 * counterpart. It's neccessary for the old (pre-NFS4 ACLs) binaries 383 * to work with new libc and kernel. Fixing 'type' for old binaries with 384 * old libc and new kernel is being done by kern/vfs_acl.c:type_unold(). 385 */ 386int 387_acl_type_unold(acl_type_t type) 388{ 389 switch (type) { 390 case ACL_TYPE_ACCESS_OLD: 391 return (ACL_TYPE_ACCESS); 392 393 case ACL_TYPE_DEFAULT_OLD: 394 return (ACL_TYPE_DEFAULT); 395 396 default: 397 return (type); 398 } 399} |
|