Deleted Added
sdiff udiff text old ( 196638 ) new ( 208785 )
full compact
1/*-
2 * Copyright (c) 1999-2001, 2008 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

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

24 * SUCH DAMAGE.
25 */
26/*
27 * Support functionality for the POSIX.1e ACL interface
28 * These calls are intended only to be called within the library.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_support.c 196638 2009-08-29 03:17:24Z kientzle $");
33
34#include <sys/types.h>
35#include "namespace.h"
36#include <sys/acl.h>
37#include "un-namespace.h"
38#include <errno.h>
39#include <grp.h>
40#include <pwd.h>

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

122 * Don't know how to sort multiple entries of the rest--either it's
123 * a bad entry, or there shouldn't be more than one. Ignore and the
124 * validity checker can get it later.
125 */
126 return (0);
127}
128
129/*
130 * _posix1e_acl_sort -- sort ACL entries in POSIX.1e-formatted ACLs
131 * Give the opportunity to fail, although we don't currently have a way
132 * to fail.
133 */
134int
135_posix1e_acl_sort(acl_t acl)
136{
137 struct acl *acl_int;
138
139 acl_int = &acl->ats_acl;
140
141 qsort(&acl_int->acl_entry[0], acl_int->acl_cnt,
142 sizeof(struct acl_entry), (compare) _posix1e_acl_entry_compare);
143
144 return (0);
145}
146
147/*
148 * acl_posix1e -- in what situations should we acl_sort before submission?
149 * We apply posix1e ACL semantics for any ACL of type ACL_TYPE_ACCESS or
150 * ACL_TYPE_DEFAULT
151 */
152int

--- 325 unchanged lines hidden ---