Deleted Added
full compact
acl_get.c (108410) acl_get.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

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

34 * acl_get_perm_np() checks if a permission is in the specified
35 * permset (non-POSIX)
36 * acl_get_permset() returns the permission set in the ACL entry
37 * acl_get_qualifier() retrieves the qualifier of the tag from the ACL entry
38 * acl_get_tag_type() returns the tag type for the ACL entry entry_d
39 */
40
41#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

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

34 * acl_get_perm_np() checks if a permission is in the specified
35 * permset (non-POSIX)
36 * acl_get_permset() returns the permission set in the ACL entry
37 * acl_get_qualifier() retrieves the qualifier of the tag from the ACL entry
38 * acl_get_tag_type() returns the tag type for the ACL entry entry_d
39 */
40
41#include <sys/cdefs.h>
42__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_get.c 108410 2002-12-29 20:47:05Z rwatson $");
42__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_get.c 192586 2009-05-22 15:56:43Z trasz $");
43
44#include <sys/types.h>
45#include "namespace.h"
46#include <sys/acl.h>
47#include "un-namespace.h"
48
49#include <errno.h>
50#include <stdlib.h>
51#include <string.h>
52
43
44#include <sys/types.h>
45#include "namespace.h"
46#include <sys/acl.h>
47#include "un-namespace.h"
48
49#include <errno.h>
50#include <stdlib.h>
51#include <string.h>
52
53#include "acl_support.h"
54
53acl_t
54acl_get_file(const char *path_p, acl_type_t type)
55{
56 acl_t aclp;
57 int error;
58
59 aclp = acl_init(ACL_MAX_ENTRIES);
60 if (aclp == NULL)
61 return (NULL);
62
55acl_t
56acl_get_file(const char *path_p, acl_type_t type)
57{
58 acl_t aclp;
59 int error;
60
61 aclp = acl_init(ACL_MAX_ENTRIES);
62 if (aclp == NULL)
63 return (NULL);
64
65 type = _acl_type_unold(type);
63 error = __acl_get_file(path_p, type, &aclp->ats_acl);
64 if (error) {
65 acl_free(aclp);
66 return (NULL);
67 }
68
69 return (aclp);
70}
71
72acl_t
73acl_get_link_np(const char *path_p, acl_type_t type)
74{
75 acl_t aclp;
76 int error;
77
78 aclp = acl_init(ACL_MAX_ENTRIES);
79 if (aclp == NULL)
80 return (NULL);
81
66 error = __acl_get_file(path_p, type, &aclp->ats_acl);
67 if (error) {
68 acl_free(aclp);
69 return (NULL);
70 }
71
72 return (aclp);
73}
74
75acl_t
76acl_get_link_np(const char *path_p, acl_type_t type)
77{
78 acl_t aclp;
79 int error;
80
81 aclp = acl_init(ACL_MAX_ENTRIES);
82 if (aclp == NULL)
83 return (NULL);
84
85 type = _acl_type_unold(type);
82 error = __acl_get_link(path_p, type, &aclp->ats_acl);
83 if (error) {
84 acl_free(aclp);
85 return (NULL);
86 }
87
88 return (aclp);
89}

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

112{
113 acl_t aclp;
114 int error;
115
116 aclp = acl_init(ACL_MAX_ENTRIES);
117 if (aclp == NULL)
118 return (NULL);
119
86 error = __acl_get_link(path_p, type, &aclp->ats_acl);
87 if (error) {
88 acl_free(aclp);
89 return (NULL);
90 }
91
92 return (aclp);
93}

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

116{
117 acl_t aclp;
118 int error;
119
120 aclp = acl_init(ACL_MAX_ENTRIES);
121 if (aclp == NULL)
122 return (NULL);
123
124 type = _acl_type_unold(type);
120 error = ___acl_get_fd(fd, type, &aclp->ats_acl);
121 if (error) {
122 acl_free(aclp);
123 return (NULL);
124 }
125
126 return (aclp);
127}

--- 88 unchanged lines hidden ---
125 error = ___acl_get_fd(fd, type, &aclp->ats_acl);
126 if (error) {
127 acl_free(aclp);
128 return (NULL);
129 }
130
131 return (aclp);
132}

--- 88 unchanged lines hidden ---