1139969Simp/*-
274468Srwatson * Copyright (c) 2001 Chris D. Faulhaber
374468Srwatson * All rights reserved.
474468Srwatson *
574468Srwatson * Redistribution and use in source and binary forms, with or without
674468Srwatson * modification, are permitted provided that the following conditions
774468Srwatson * are met:
874468Srwatson * 1. Redistributions of source code must retain the above copyright
974468Srwatson *    notice, this list of conditions and the following disclaimer.
1074468Srwatson * 2. Redistributions in binary form must reproduce the above copyright
1174468Srwatson *    notice, this list of conditions and the following disclaimer in the
1274468Srwatson *    documentation and/or other materials provided with the distribution.
1374468Srwatson *
1474468Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1574468Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1674468Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17204819Sjoel * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18204819Sjoel * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19204819Sjoel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20204819Sjoel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21204819Sjoel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22204819Sjoel * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23204819Sjoel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24204819Sjoel * SUCH DAMAGE.
2574468Srwatson *
2674468Srwatson * $FreeBSD$
2774468Srwatson */
2874468Srwatson
2974468Srwatson#ifndef _SETFACL_H
3074468Srwatson#define _SETFACL_H
3174468Srwatson
3274468Srwatson#include <sys/types.h>
3374468Srwatson#include <sys/acl.h>
3474468Srwatson#include <sys/queue.h>
3574468Srwatson
3674468Srwatson/* files.c */
3774468Srwatsonacl_t  get_acl_from_file(const char *filename);
3874468Srwatson/* merge.c */
39196936Straszint    merge_acl(acl_t acl, acl_t *prev_acl, const char *filename);
40196936Straszint    add_acl(acl_t acl, uint entry_number, acl_t *prev_acl, const char *filename);
4174468Srwatson/* remove.c */
42196936Straszint    remove_acl(acl_t acl, acl_t *prev_acl, const char *filename);
43196936Straszint    remove_by_number(uint entry_number, acl_t *prev_acl, const char *filename);
44196936Straszint    remove_default(acl_t *prev_acl, const char *filename);
45196936Straszvoid   remove_ext(acl_t *prev_acl, const char *filename);
4674468Srwatson/* mask.c */
47196936Straszint    set_acl_mask(acl_t *prev_acl, const char *filename);
4874468Srwatson/* util.c */
4974468Srwatsonvoid  *zmalloc(size_t size);
50201016Straszconst char *brand_name(int brand);
51201016Straszint    branding_mismatch(int brand1, int brand2);
5274468Srwatson
53241720Sedextern uint have_mask;
54241720Sedextern uint need_mask;
55241720Sedextern uint have_stdin;
56241720Sedextern uint n_flag;
5774468Srwatson
5874468Srwatson#endif /* _SETFACL_H */
59