Deleted Added
full compact
acl_set.c (108410) acl_set.c (192586)
1/*-
2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * This software was developed by Robert Watson for the TrustedBSD Project.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28/*
29 * acl_set_file -- set a file/directory ACL by name
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * This software was developed by Robert Watson for the TrustedBSD Project.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28/*
29 * acl_set_file -- set a file/directory ACL by name
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_set.c 108410 2002-12-29 20:47:05Z rwatson $");
33__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_set.c 192586 2009-05-22 15:56:43Z trasz $");
34
35#include <sys/types.h>
36#include "namespace.h"
37#include <sys/acl.h>
38#include "un-namespace.h"
39
40#include <errno.h>
41#include <stdlib.h>

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

53acl_set_file(const char *path_p, acl_type_t type, acl_t acl)
54{
55 int error;
56
57 if (acl == NULL || path_p == NULL) {
58 errno = EINVAL;
59 return (-1);
60 }
34
35#include <sys/types.h>
36#include "namespace.h"
37#include <sys/acl.h>
38#include "un-namespace.h"
39
40#include <errno.h>
41#include <stdlib.h>

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

53acl_set_file(const char *path_p, acl_type_t type, acl_t acl)
54{
55 int error;
56
57 if (acl == NULL || path_p == NULL) {
58 errno = EINVAL;
59 return (-1);
60 }
61 type = _acl_type_unold(type);
61 if (_posix1e_acl(acl, type)) {
62 error = _posix1e_acl_sort(acl);
63 if (error) {
64 errno = error;
65 return (-1);
66 }
67 }
68

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

75acl_set_link_np(const char *path_p, acl_type_t type, acl_t acl)
76{
77 int error;
78
79 if (acl == NULL || path_p == NULL) {
80 errno = EINVAL;
81 return (-1);
82 }
62 if (_posix1e_acl(acl, type)) {
63 error = _posix1e_acl_sort(acl);
64 if (error) {
65 errno = error;
66 return (-1);
67 }
68 }
69

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

76acl_set_link_np(const char *path_p, acl_type_t type, acl_t acl)
77{
78 int error;
79
80 if (acl == NULL || path_p == NULL) {
81 errno = EINVAL;
82 return (-1);
83 }
84 type = _acl_type_unold(type);
83 if (_posix1e_acl(acl, type)) {
84 error = _posix1e_acl_sort(acl);
85 if (error) {
86 errno = error;
87 return (-1);
88 }
89 }
90

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

109 return (___acl_set_fd(fd, ACL_TYPE_ACCESS, &acl->ats_acl));
110}
111
112int
113acl_set_fd_np(int fd, acl_t acl, acl_type_t type)
114{
115 int error;
116
85 if (_posix1e_acl(acl, type)) {
86 error = _posix1e_acl_sort(acl);
87 if (error) {
88 errno = error;
89 return (-1);
90 }
91 }
92

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

111 return (___acl_set_fd(fd, ACL_TYPE_ACCESS, &acl->ats_acl));
112}
113
114int
115acl_set_fd_np(int fd, acl_t acl, acl_type_t type)
116{
117 int error;
118
119 type = _acl_type_unold(type);
117 if (_posix1e_acl(acl, type)) {
118 error = _posix1e_acl_sort(acl);
119 if (error) {
120 errno = error;
121 return (-1);
122 }
123 }
124

--- 75 unchanged lines hidden ---
120 if (_posix1e_acl(acl, type)) {
121 error = _posix1e_acl_sort(acl);
122 if (error) {
123 errno = error;
124 return (-1);
125 }
126 }
127

--- 75 unchanged lines hidden ---