acl_copy.c revision 184607
11849Swollman/* 21849Swollman * Copyright (c) 2001-2002 Chris D. Faulhaber 31849Swollman * All rights reserved. 41849Swollman * 51849Swollman * Redistribution and use in source and binary forms, with or without 61849Swollman * modification, are permitted provided that the following conditions 71849Swollman * are met: 81849Swollman * 1. Redistributions of source code must retain the above copyright 91849Swollman * notice, this list of conditions and the following disclaimer. 101849Swollman * 2. Redistributions in binary form must reproduce the above copyright 111849Swollman * notice, this list of conditions and the following disclaimer in the 121849Swollman * documentation and/or other materials provided with the distribution. 131849Swollman * 141849Swollman * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 151849Swollman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 161849Swollman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 171849Swollman * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 181849Swollman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 191849Swollman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 201849Swollman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 211849Swollman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 221849Swollman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 231849Swollman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 241849Swollman * SUCH DAMAGE. 251849Swollman */ 261849Swollman 271849Swollman#include <sys/cdefs.h> 281849Swollman__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_copy.c 184607 2008-11-04 00:20:43Z imp $"); 291849Swollman 301849Swollman#include <sys/types.h> 3185437Speter#include "namespace.h" 3293000Sobrien#include <sys/acl.h> 331849Swollman#include "un-namespace.h" 341849Swollman 351849Swollman#include <errno.h> 361849Swollman#include <string.h> 371849Swollman 381849Swollman/* 391849Swollman * acl_copy_entry() (23.4.4): copy the contents of ACL entry src_d to 401849Swollman * ACL entry dest_d 411849Swollman */ 421849Swollmanint 431849Swollmanacl_copy_entry(acl_entry_t dest_d, acl_entry_t src_d) 441849Swollman{ 451849Swollman 461849Swollman if (src_d == NULL || dest_d == NULL || src_d == dest_d) { 471849Swollman errno = EINVAL; 481849Swollman return (-1); 491849Swollman } 501849Swollman 511849Swollman dest_d->ae_tag = src_d->ae_tag; 521849Swollman dest_d->ae_id = src_d->ae_id; 531849Swollman dest_d->ae_perm = src_d->ae_perm; 541849Swollman 551849Swollman return (0); 561849Swollman} 571849Swollman 581849Swollmanssize_t 591849Swollmanacl_copy_ext(void *buf_p, acl_t acl, ssize_t size) 601849Swollman{ 611849Swollman 621849Swollman errno = ENOSYS; 631849Swollman return (-1); 641849Swollman} 651849Swollman 661849Swollmanacl_t 671849Swollmanacl_copy_int(const void *buf_p) 681849Swollman{ 691849Swollman 701849Swollman errno = ENOSYS; 711849Swollman return (NULL); 721849Swollman} 731849Swollman