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$"); 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 41192586Strasz#include "acl_support.h" 42192586Strasz 4356055Srwatsonint 4456197Srwatsonacl_delete_def_file(const char *path_p) 4556055Srwatson{ 4656055Srwatson 4756274Srwatson return (__acl_delete_file(path_p, ACL_TYPE_DEFAULT)); 4856055Srwatson} 4956055Srwatson 50108410Srwatsonint 51108410Srwatsonacl_delete_def_link_np(const char *path_p) 52108410Srwatson{ 5356055Srwatson 54108410Srwatson return (__acl_delete_link(path_p, ACL_TYPE_DEFAULT)); 55108410Srwatson} 56108410Srwatson 5756055Srwatsonint 5856625Srwatsonacl_delete_file_np(const char *path_p, acl_type_t type) 5956055Srwatson{ 6056055Srwatson 61192586Strasz type = _acl_type_unold(type); 6256274Srwatson return (__acl_delete_file(path_p, type)); 6356055Srwatson} 6456055Srwatson 65108410Srwatsonint 66108410Srwatsonacl_delete_link_np(const char *path_p, acl_type_t type) 67108410Srwatson{ 6856055Srwatson 69192586Strasz type = _acl_type_unold(type); 70108410Srwatson return (__acl_delete_link(path_p, type)); 71108410Srwatson} 72108410Srwatson 7356055Srwatsonint 7456625Srwatsonacl_delete_fd_np(int filedes, acl_type_t type) 7556055Srwatson{ 7656055Srwatson 77192586Strasz type = _acl_type_unold(type); 7875185Stmm return (___acl_delete_fd(filedes, type)); 7956055Srwatson} 80