acl_delete.c revision 108410
156055Srwatson/*-
2108410Srwatson * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson
356055Srwatson * All rights reserved.
456055Srwatson *
5108410Srwatson * This software was developed by Robert Watson for the TrustedBSD Project.
6108410Srwatson *
756055Srwatson * Redistribution and use in source and binary forms, with or without
856055Srwatson * modification, are permitted provided that the following conditions
956055Srwatson * are met:
1056055Srwatson * 1. Redistributions of source code must retain the above copyright
1156055Srwatson *    notice, this list of conditions and the following disclaimer.
1256055Srwatson * 2. Redistributions in binary form must reproduce the above copyright
1356055Srwatson *    notice, this list of conditions and the following disclaimer in the
1456055Srwatson *    documentation and/or other materials provided with the distribution.
1556055Srwatson *
1656055Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1756055Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1856055Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1956055Srwatson * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2056055Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2156055Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2256055Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2356055Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2456055Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2556055Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2656055Srwatson * SUCH DAMAGE.
2756055Srwatson */
2856055Srwatson/*
2956055Srwatson * acl_delete_def_file -- remove a default acl from a file
3056055Srwatson */
3156055Srwatson
3292986Sobrien#include <sys/cdefs.h>
3392986Sobrien__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_delete.c 108410 2002-12-29 20:47:05Z rwatson $");
3492986Sobrien
3556055Srwatson#include <sys/types.h>
3675185Stmm#include "namespace.h"
3756055Srwatson#include <sys/acl.h>
3875185Stmm#include "un-namespace.h"
3956055Srwatson#include <sys/errno.h>
4056055Srwatson
4156055Srwatsonint
4256197Srwatsonacl_delete_def_file(const char *path_p)
4356055Srwatson{
4456055Srwatson
4556274Srwatson	return (__acl_delete_file(path_p, ACL_TYPE_DEFAULT));
4656055Srwatson}
4756055Srwatson
48108410Srwatsonint
49108410Srwatsonacl_delete_def_link_np(const char *path_p)
50108410Srwatson{
5156055Srwatson
52108410Srwatson	return (__acl_delete_link(path_p, ACL_TYPE_DEFAULT));
53108410Srwatson}
54108410Srwatson
5556055Srwatsonint
5656625Srwatsonacl_delete_file_np(const char *path_p, acl_type_t type)
5756055Srwatson{
5856055Srwatson
5956274Srwatson	return (__acl_delete_file(path_p, type));
6056055Srwatson}
6156055Srwatson
62108410Srwatsonint
63108410Srwatsonacl_delete_link_np(const char *path_p, acl_type_t type)
64108410Srwatson{
6556055Srwatson
66108410Srwatson	return (__acl_delete_link(path_p, type));
67108410Srwatson}
68108410Srwatson
69108410Srwatson
7056055Srwatsonint
7156625Srwatsonacl_delete_fd_np(int filedes, acl_type_t type)
7256055Srwatson{
7356055Srwatson
7475185Stmm	return (___acl_delete_fd(filedes, type));
7556055Srwatson}
76