acl_delete.c revision 267654
11541Srgrimes/*- 21541Srgrimes * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 31541Srgrimes * All rights reserved. 41541Srgrimes * 51541Srgrimes * This software was developed by Robert Watson for the TrustedBSD Project. 61541Srgrimes * 71541Srgrimes * Redistribution and use in source and binary forms, with or without 81541Srgrimes * modification, are permitted provided that the following conditions 91541Srgrimes * are met: 101541Srgrimes * 1. Redistributions of source code must retain the above copyright 111541Srgrimes * notice, this list of conditions and the following disclaimer. 121541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 131541Srgrimes * notice, this list of conditions and the following disclaimer in the 141541Srgrimes * documentation and/or other materials provided with the distribution. 151541Srgrimes * 161541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 171541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 181541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 191541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 201541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 211541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 221541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 231541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 241541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 251541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 261541Srgrimes * SUCH DAMAGE. 271541Srgrimes */ 281541Srgrimes/* 291541Srgrimes * acl_delete_def_file -- remove a default acl from a file 301541Srgrimes */ 311541Srgrimes 321541Srgrimes#include <sys/cdefs.h> 331541Srgrimes__FBSDID("$FreeBSD: releng/9.3/lib/libc/posix1e/acl_delete.c 192586 2009-05-22 15:56:43Z trasz $"); 3450477Speter 351541Srgrimes#include <sys/types.h> 361541Srgrimes#include "namespace.h" 372168Spaul#include <sys/acl.h> 384507Sbde#include "un-namespace.h" 392168Spaul#include <sys/errno.h> 401541Srgrimes 4134750Speter#include "acl_support.h" 4234750Speter 4334750Speterint 4434750Speteracl_delete_def_file(const char *path_p) 4534750Speter{ 4634750Speter 4734750Speter return (__acl_delete_file(path_p, ACL_TYPE_DEFAULT)); 4834750Speter} 4919079Sfenner 5019079Sfennerint 5119079Sfenneracl_delete_def_link_np(const char *path_p) 529457Sjoerg{ 539457Sjoerg 549457Sjoerg return (__acl_delete_link(path_p, ACL_TYPE_DEFAULT)); 559457Sjoerg} 569457Sjoerg 579457Sjoergint 5817352Swollmanacl_delete_file_np(const char *path_p, acl_type_t type) 5917352Swollman{ 609457Sjoerg 619457Sjoerg type = _acl_type_unold(type); 629457Sjoerg return (__acl_delete_file(path_p, type)); 639457Sjoerg} 649457Sjoerg 659457Sjoergint 669457Sjoergacl_delete_link_np(const char *path_p, acl_type_t type) 679457Sjoerg{ 689457Sjoerg 699457Sjoerg type = _acl_type_unold(type); 709457Sjoerg return (__acl_delete_link(path_p, type)); 719457Sjoerg} 729457Sjoerg 739457Sjoergint 749457Sjoergacl_delete_fd_np(int filedes, acl_type_t type) 7517352Swollman{ 7617352Swollman 7716287Sgpalmer type = _acl_type_unold(type); 789457Sjoerg return (___acl_delete_fd(filedes, type)); 799457Sjoerg} 801541Srgrimes