acl_compat.c revision 192586
1/*-
2 * Copyright (c) 2008 Edward Tomasz Napiera��a <trasz@FreeBSD.org>
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
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 *
14 * ALTHOUGH THIS SOFTWARE IS MADE OF WIN AND SCIENCE, IT IS PROVIDED BY THE
15 * AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
16 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
17 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
18 * THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
20 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
21 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_compat.c 192586 2009-05-22 15:56:43Z trasz $");
29
30#include <sys/acl.h>
31
32/*
33 * Compatibility wrappers for applications compiled against libc from before
34 * NFSv4 ACLs were added.
35 */
36int
37__oldacl_get_perm_np(acl_permset_t permset_d, oldacl_perm_t perm)
38{
39
40	return (acl_get_perm_np(permset_d, perm));
41}
42
43int
44__oldacl_add_perm(acl_permset_t permset_d, oldacl_perm_t perm)
45{
46
47	return (acl_add_perm(permset_d, perm));
48}
49
50int
51__oldacl_delete_perm(acl_permset_t permset_d, oldacl_perm_t perm)
52{
53
54	return (acl_delete_perm(permset_d, perm));
55}
56
57__sym_compat(acl_get_perm_np, __oldacl_get_perm_np, FBSD_1.0);
58__sym_compat(acl_add_perm, __oldacl_add_perm, FBSD_1.0);
59__sym_compat(acl_delete_perm, __oldacl_delete_perm, FBSD_1.0);
60