Deleted Added
full compact
acl_set.c (74667) acl_set.c (75185)
1/*-
2 * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/lib/libc/posix1e/acl_set.c 74667 2001-03-22 22:31:01Z jedgar $
26 * $FreeBSD: head/lib/libc/posix1e/acl_set.c 75185 2001-04-04 18:00:52Z tmm $
27 */
28/*
29 * acl_set_file -- set a file/directory ACL by name
30 */
31
32#include <sys/types.h>
27 */
28/*
29 * acl_set_file -- set a file/directory ACL by name
30 */
31
32#include <sys/types.h>
33#include "namespace.h"
33#include <sys/acl.h>
34#include <sys/acl.h>
35#include "un-namespace.h"
34
35#include <errno.h>
36#include <stdlib.h>
37#include <string.h>
38
39#include "acl_support.h"
40
41/*

--- 24 unchanged lines hidden (view full) ---

66 int error;
67
68 error = _posix1e_acl_sort(acl);
69 if (error) {
70 errno = error;
71 return(-1);
72 }
73
36
37#include <errno.h>
38#include <stdlib.h>
39#include <string.h>
40
41#include "acl_support.h"
42
43/*

--- 24 unchanged lines hidden (view full) ---

68 int error;
69
70 error = _posix1e_acl_sort(acl);
71 if (error) {
72 errno = error;
73 return(-1);
74 }
75
74 return (__acl_set_fd(fd, ACL_TYPE_ACCESS, acl));
76 return (___acl_set_fd(fd, ACL_TYPE_ACCESS, acl));
75}
76
77int
78acl_set_fd_np(int fd, acl_t acl, acl_type_t type)
79{
80 int error;
81
82 if (_posix1e_acl(acl, type)) {
83 error = _posix1e_acl_sort(acl);
84 if (error) {
85 errno = error;
86 return (-1);
87 }
88 }
89
77}
78
79int
80acl_set_fd_np(int fd, acl_t acl, acl_type_t type)
81{
82 int error;
83
84 if (_posix1e_acl(acl, type)) {
85 error = _posix1e_acl_sort(acl);
86 if (error) {
87 errno = error;
88 return (-1);
89 }
90 }
91
90 return (__acl_set_fd(fd, type, acl));
92 return (___acl_set_fd(fd, type, acl));
91}
92
93/*
94 * acl_set_permset() sets the permissions of ACL entry entry_d
95 * with the permissions in permset_d
96 */
97int
98acl_set_permset(acl_entry_t entry_d, acl_permset_t permset_d)

--- 64 unchanged lines hidden ---
93}
94
95/*
96 * acl_set_permset() sets the permissions of ACL entry entry_d
97 * with the permissions in permset_d
98 */
99int
100acl_set_permset(acl_entry_t entry_d, acl_permset_t permset_d)

--- 64 unchanged lines hidden ---