acl_compat.c revision 192804
1218887Sdim/*- 2218887Sdim * Copyright (c) 2008 Edward Tomasz Napiera��a <trasz@FreeBSD.org> 3218887Sdim * All rights reserved. 4218887Sdim * 5218887Sdim * Redistribution and use in source and binary forms, with or without 6218887Sdim * modification, are permitted provided that the following conditions 7218887Sdim * are met: 8218887Sdim * 1. Redistributions of source code must retain the above copyright 9218887Sdim * notice, this list of conditions and the following disclaimer. 10218887Sdim * 2. Redistributions in binary form must reproduce the above copyright 11218887Sdim * notice, this list of conditions and the following disclaimer in the 12218887Sdim * documentation and/or other materials provided with the distribution. 13218887Sdim * 14218887Sdim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15218887Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16218887Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17218887Sdim * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18218887Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19218887Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20218887Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21218887Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22218887Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23218887Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24218887Sdim * SUCH DAMAGE. 25218887Sdim */ 26218887Sdim 27218887Sdim#include <sys/cdefs.h> 28218887Sdim__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_compat.c 192804 2009-05-26 11:42:06Z trasz $"); 29218887Sdim 30218887Sdim#include <sys/acl.h> 31218887Sdim 32218887Sdim/* 33218887Sdim * Compatibility wrappers for applications compiled against libc from before 34218887Sdim * NFSv4 ACLs were added. 35218887Sdim */ 36218887Sdimint 37218887Sdim__oldacl_get_perm_np(acl_permset_t permset_d, oldacl_perm_t perm) 38218887Sdim{ 39218887Sdim 40218887Sdim return (acl_get_perm_np(permset_d, perm)); 41218887Sdim} 42218887Sdim 43218887Sdimint 44218887Sdim__oldacl_add_perm(acl_permset_t permset_d, oldacl_perm_t perm) 45218887Sdim{ 46218887Sdim 47218887Sdim return (acl_add_perm(permset_d, perm)); 48218887Sdim} 49218887Sdim 50218887Sdimint 51218887Sdim__oldacl_delete_perm(acl_permset_t permset_d, oldacl_perm_t perm) 52218887Sdim{ 53218887Sdim 54218887Sdim return (acl_delete_perm(permset_d, perm)); 55218887Sdim} 56218887Sdim 57218887Sdim__sym_compat(acl_get_perm_np, __oldacl_get_perm_np, FBSD_1.0); 58218887Sdim__sym_compat(acl_add_perm, __oldacl_add_perm, FBSD_1.0); 59218887Sdim__sym_compat(acl_delete_perm, __oldacl_delete_perm, FBSD_1.0); 60218887Sdim