svn commit: r194957 - head/lib/libc/posix1e

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Jun 25 13:08:03 UTC 2009


Author: trasz
Date: Thu Jun 25 13:08:02 2009
New Revision: 194957
URL: http://svn.freebsd.org/changeset/base/194957

Log:
  Fix c194955 - somehow I managed all the new files, tripling their
  contents.

Modified:
  head/lib/libc/posix1e/acl_add_flag_np.3
  head/lib/libc/posix1e/acl_branding.c
  head/lib/libc/posix1e/acl_clear_flags_np.3
  head/lib/libc/posix1e/acl_delete_flag_np.3
  head/lib/libc/posix1e/acl_flag.c
  head/lib/libc/posix1e/acl_from_text_nfs4.c
  head/lib/libc/posix1e/acl_get_brand_np.3
  head/lib/libc/posix1e/acl_get_entry_type_np.3
  head/lib/libc/posix1e/acl_get_flag_np.3
  head/lib/libc/posix1e/acl_get_flagset_np.3
  head/lib/libc/posix1e/acl_is_trivial_np.3
  head/lib/libc/posix1e/acl_set_entry_type_np.3
  head/lib/libc/posix1e/acl_set_flagset_np.3
  head/lib/libc/posix1e/acl_strip.c
  head/lib/libc/posix1e/acl_strip_np.3
  head/lib/libc/posix1e/acl_support_nfs4.c
  head/lib/libc/posix1e/acl_to_text_nfs4.c

Modified: head/lib/libc/posix1e/acl_add_flag_np.3
==============================================================================
--- head/lib/libc/posix1e/acl_add_flag_np.3	Thu Jun 25 12:53:50 2009	(r194956)
+++ head/lib/libc/posix1e/acl_add_flag_np.3	Thu Jun 25 13:08:02 2009	(r194957)
@@ -96,199 +96,3 @@ The
 .Fn acl_add_flag_np
 function was written by
 .An Edward Tomasz Napierala Aq trasz at FreeBSD.org .
-.\"-
-.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 10, 2001
-.Dt ACL_ADD_FLAG_NP 3
-.Os
-.Sh NAME
-.Nm acl_add_flag_np
-.Nd add flags to a flagset 
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/acl.h
-.Ft int
-.Fn acl_add_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag"
-.Sh DESCRIPTION
-The
-.Fn acl_add_flag_np
-function
-is a non-portable call that adds the flags contained in
-.Fa flags
-to the flagset
-.Fa flagset_d .
-.Pp
-Note: it is not considered an error to attempt to add flags
-that already exist in the flagset.
-.Pp
-Valid values are:
-.Pp
-.Bl -column -offset 3n "ACL_ENTRY_NO_PROPAGATE_INHERIT"
-.It ACL_ENTRY_FILE_INHERIT		Will be inherited by files.
-.It ACL_ENTRY_DIRECTORY_INHERIT	Will be inherited by directories.
-.It ACL_ENTRY_NO_PROPAGATE_INHERIT	Will not propagate.
-.It ACL_ENTRY_INHERIT_ONLY		Inherit-only.
-.El
-.Sh RETURN VALUES
-.Rv -std acl_add_flag_np
-.Sh ERRORS
-The
-.Fn acl_add_flag_np
-function fails if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-Argument
-.Fa flagset_d
-is not a valid descriptor for a flagset within an ACL entry.
-Argument
-.Fa flag
-does not contain a valid
-.Vt acl_flag_t
-value.
-.El
-.Sh SEE ALSO
-.Xr acl 3 ,
-.Xr acl_clear_flags_np 3 ,
-.Xr acl_delete_flag_np 3 ,
-.Xr acl_get_flagset_np 3 ,
-.Xr acl_set_flagset_np 3 ,
-.Xr posix1e 3
-.Sh STANDARDS
-POSIX.1e is described in IEEE POSIX.1e draft 17.
-.Sh HISTORY
-POSIX.1e support was introduced in
-.Fx 4.0 .
-The
-.Fn acl_add_flag_np
-function was added in
-.Fx 8.0 .
-.Sh AUTHORS
-The
-.Fn acl_add_flag_np
-function was written by
-.An Edward Tomasz Napierala Aq trasz at FreeBSD.org .
-.\"-
-.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 10, 2001
-.Dt ACL_ADD_FLAG_NP 3
-.Os
-.Sh NAME
-.Nm acl_add_flag_np
-.Nd add flags to a flagset 
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/acl.h
-.Ft int
-.Fn acl_add_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag"
-.Sh DESCRIPTION
-The
-.Fn acl_add_flag_np
-function
-is a non-portable call that adds the flags contained in
-.Fa flags
-to the flagset
-.Fa flagset_d .
-.Pp
-Note: it is not considered an error to attempt to add flags
-that already exist in the flagset.
-.Pp
-Valid values are:
-.Pp
-.Bl -column -offset 3n "ACL_ENTRY_NO_PROPAGATE_INHERIT"
-.It ACL_ENTRY_FILE_INHERIT		Will be inherited by files.
-.It ACL_ENTRY_DIRECTORY_INHERIT	Will be inherited by directories.
-.It ACL_ENTRY_NO_PROPAGATE_INHERIT	Will not propagate.
-.It ACL_ENTRY_INHERIT_ONLY		Inherit-only.
-.El
-.Sh RETURN VALUES
-.Rv -std acl_add_flag_np
-.Sh ERRORS
-The
-.Fn acl_add_flag_np
-function fails if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-Argument
-.Fa flagset_d
-is not a valid descriptor for a flagset within an ACL entry.
-Argument
-.Fa flag
-does not contain a valid
-.Vt acl_flag_t
-value.
-.El
-.Sh SEE ALSO
-.Xr acl 3 ,
-.Xr acl_clear_flags_np 3 ,
-.Xr acl_delete_flag_np 3 ,
-.Xr acl_get_flagset_np 3 ,
-.Xr acl_set_flagset_np 3 ,
-.Xr posix1e 3
-.Sh STANDARDS
-POSIX.1e is described in IEEE POSIX.1e draft 17.
-.Sh HISTORY
-POSIX.1e support was introduced in
-.Fx 4.0 .
-The
-.Fn acl_add_flag_np
-function was added in
-.Fx 8.0 .
-.Sh AUTHORS
-The
-.Fn acl_add_flag_np
-function was written by
-.An Edward Tomasz Napierala Aq trasz at FreeBSD.org .

Modified: head/lib/libc/posix1e/acl_branding.c
==============================================================================
--- head/lib/libc/posix1e/acl_branding.c	Thu Jun 25 12:53:50 2009	(r194956)
+++ head/lib/libc/posix1e/acl_branding.c	Thu Jun 25 13:08:02 2009	(r194957)
@@ -164,335 +164,3 @@ acl_get_brand_np(acl_t acl, int *brand_p
 
 	return (0);
 }
-/*-
- * Copyright (c) 2008, 2009 Edward Tomasz Napierała <trasz at FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <assert.h>
-#include <errno.h>
-#include <sys/acl.h>
-
-#include "acl_support.h"
-
-/*
- * An ugly detail of the implementation - fortunately not visible
- * to the API users - is the "branding": libc needs to keep track
- * of what "brand" ACL is: NFSv4, POSIX.1e or unknown.  It happens
- * automatically - for example, during acl_get_file(3) ACL gets
- * branded according to the "type" argument; during acl_set_permset
- * ACL, if its brand is unknown it gets branded as NFSv4 if any of the
- * NFSv4 permissions that are not valid for POSIX.1e ACL are set etc.
- * Branding information is used for printing out the ACL (acl_to_text(3)),
- * veryfying acl_set_whatever arguments (checking against setting
- * bits that are valid only for NFSv4 in ACL branded as POSIX.1e) etc.
- */
-
-static acl_t
-entry2acl(acl_entry_t entry)
-{
-	acl_t aclp;
-
-	aclp = (acl_t)(((long)entry >> _ACL_T_ALIGNMENT_BITS) << _ACL_T_ALIGNMENT_BITS);
-
-	return (aclp);
-}
-
-/*
- * Return brand of an ACL.
- */
-int
-_acl_brand(const acl_t acl)
-{
-
-	return (acl->ats_brand);
-}
-
-int
-_entry_brand(const acl_entry_t entry)
-{
-
-	return (_acl_brand(entry2acl(entry)));
-}
-
-/*
- * Return 1, iff branding ACL as "brand" is ok.
- */
-int
-_acl_brand_may_be(const acl_t acl, int brand)
-{
-
-	if (_acl_brand(acl) == ACL_BRAND_UNKNOWN)
-		return (1);
-
-	if (_acl_brand(acl) == brand)
-		return (1);
-
-	return (0);
-}
-
-int
-_entry_brand_may_be(const acl_entry_t entry, int brand)
-{
-
-	return (_acl_brand_may_be(entry2acl(entry), brand));
-}
-
-/*
- * Brand ACL as "brand".
- */
-void
-_acl_brand_as(acl_t acl, int brand)
-{
-
-	assert(_acl_brand_may_be(acl, brand));
-
-	acl->ats_brand = brand;
-}
-
-void
-_entry_brand_as(const acl_entry_t entry, int brand)
-{
-
-	_acl_brand_as(entry2acl(entry), brand);
-}
-
-int
-_acl_type_not_valid_for_acl(const acl_t acl, acl_type_t type)
-{
-
-	switch (_acl_brand(acl)) {
-	case ACL_BRAND_NFS4:
-		if (type == ACL_TYPE_NFS4)
-			return (0);
-		break;
-
-	case ACL_BRAND_POSIX:
-		if (type == ACL_TYPE_ACCESS || type == ACL_TYPE_DEFAULT)
-			return (0);
-		break;
-	}
-
-	return (-1);
-}
-
-void
-_acl_brand_from_type(acl_t acl, acl_type_t type)
-{
-
-	switch (type) {
-	case ACL_TYPE_NFS4:
-		_acl_brand_as(acl, ACL_BRAND_NFS4);
-		break;
-	case ACL_TYPE_ACCESS:
-	case ACL_TYPE_DEFAULT:
-		_acl_brand_as(acl, ACL_BRAND_POSIX);
-		break;
-	default:
-		/* XXX: What to do here? */
-		break;
-	}
-}
-
-int
-acl_get_brand_np(acl_t acl, int *brand_p)
-{
-
-	if (acl == NULL || brand_p == NULL) {
-		errno = EINVAL;
-		return (-1);
-	}
-	*brand_p = _acl_brand(acl);
-
-	return (0);
-}
-/*-
- * Copyright (c) 2008, 2009 Edward Tomasz Napierała <trasz at FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <assert.h>
-#include <errno.h>
-#include <sys/acl.h>
-
-#include "acl_support.h"
-
-/*
- * An ugly detail of the implementation - fortunately not visible
- * to the API users - is the "branding": libc needs to keep track
- * of what "brand" ACL is: NFSv4, POSIX.1e or unknown.  It happens
- * automatically - for example, during acl_get_file(3) ACL gets
- * branded according to the "type" argument; during acl_set_permset
- * ACL, if its brand is unknown it gets branded as NFSv4 if any of the
- * NFSv4 permissions that are not valid for POSIX.1e ACL are set etc.
- * Branding information is used for printing out the ACL (acl_to_text(3)),
- * veryfying acl_set_whatever arguments (checking against setting
- * bits that are valid only for NFSv4 in ACL branded as POSIX.1e) etc.
- */
-
-static acl_t
-entry2acl(acl_entry_t entry)
-{
-	acl_t aclp;
-
-	aclp = (acl_t)(((long)entry >> _ACL_T_ALIGNMENT_BITS) << _ACL_T_ALIGNMENT_BITS);
-
-	return (aclp);
-}
-
-/*
- * Return brand of an ACL.
- */
-int
-_acl_brand(const acl_t acl)
-{
-
-	return (acl->ats_brand);
-}
-
-int
-_entry_brand(const acl_entry_t entry)
-{
-
-	return (_acl_brand(entry2acl(entry)));
-}
-
-/*
- * Return 1, iff branding ACL as "brand" is ok.
- */
-int
-_acl_brand_may_be(const acl_t acl, int brand)
-{
-
-	if (_acl_brand(acl) == ACL_BRAND_UNKNOWN)
-		return (1);
-
-	if (_acl_brand(acl) == brand)
-		return (1);
-
-	return (0);
-}
-
-int
-_entry_brand_may_be(const acl_entry_t entry, int brand)
-{
-
-	return (_acl_brand_may_be(entry2acl(entry), brand));
-}
-
-/*
- * Brand ACL as "brand".
- */
-void
-_acl_brand_as(acl_t acl, int brand)
-{
-
-	assert(_acl_brand_may_be(acl, brand));
-
-	acl->ats_brand = brand;
-}
-
-void
-_entry_brand_as(const acl_entry_t entry, int brand)
-{
-
-	_acl_brand_as(entry2acl(entry), brand);
-}
-
-int
-_acl_type_not_valid_for_acl(const acl_t acl, acl_type_t type)
-{
-
-	switch (_acl_brand(acl)) {
-	case ACL_BRAND_NFS4:
-		if (type == ACL_TYPE_NFS4)
-			return (0);
-		break;
-
-	case ACL_BRAND_POSIX:
-		if (type == ACL_TYPE_ACCESS || type == ACL_TYPE_DEFAULT)
-			return (0);
-		break;
-	}
-
-	return (-1);
-}
-
-void
-_acl_brand_from_type(acl_t acl, acl_type_t type)
-{
-
-	switch (type) {
-	case ACL_TYPE_NFS4:
-		_acl_brand_as(acl, ACL_BRAND_NFS4);
-		break;
-	case ACL_TYPE_ACCESS:
-	case ACL_TYPE_DEFAULT:
-		_acl_brand_as(acl, ACL_BRAND_POSIX);
-		break;
-	default:
-		/* XXX: What to do here? */
-		break;
-	}
-}
-
-int
-acl_get_brand_np(acl_t acl, int *brand_p)
-{
-
-	if (acl == NULL || brand_p == NULL) {
-		errno = EINVAL;
-		return (-1);
-	}
-	*brand_p = _acl_brand(acl);
-
-	return (0);
-}

Modified: head/lib/libc/posix1e/acl_clear_flags_np.3
==============================================================================
--- head/lib/libc/posix1e/acl_clear_flags_np.3	Thu Jun 25 12:53:50 2009	(r194956)
+++ head/lib/libc/posix1e/acl_clear_flags_np.3	Thu Jun 25 13:08:02 2009	(r194957)
@@ -77,161 +77,3 @@ The
 .Fn acl_clear_flags_np
 function was written by
 .An Edward Tomasz Napierala Aq trasz at FreeBSD.org .
-.\"-
-.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 10, 2001
-.Dt ACL_CLEAR_FLAGS_NP 3
-.Os
-.Sh NAME
-.Nm acl_clear_flags_np
-.Nd clear flags from a flagset
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/acl.h
-.Ft int
-.Fn acl_clear_flags_np "acl_flagset_t flagset_d"
-.Sh DESCRIPTION
-The
-.Fn acl_clear_flags_np
-function
-is a non-portable call that clears all flags from flagset
-.Fa flagset_d .
-.Sh RETURN VALUES
-.Rv -std acl_clear_flags_np
-.Sh ERRORS
-The
-.Fn acl_clear_flags_np
-function fails if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-Argument
-.Fa flagset_d
-is not a valid descriptor for a flagset.
-.El
-.Sh SEE ALSO
-.Xr acl 3 ,
-.Xr acl_add_flag_np 3 ,
-.Xr acl_delete_flag_np 3 ,
-.Xr acl_get_flagset_np 3 ,
-.Xr acl_set_flagset_np 3 ,
-.Xr posix1e 3
-.Sh STANDARDS
-POSIX.1e is described in IEEE POSIX.1e draft 17.
-.Sh HISTORY
-POSIX.1e support was introduced in
-.Fx 4.0 .
-The
-.Fn acl_clear_flags_np
-function was added in
-.Fx 5.0 .
-.Sh AUTHORS
-The
-.Fn acl_clear_flags_np
-function was written by
-.An Edward Tomasz Napierala Aq trasz at FreeBSD.org .
-.\"-
-.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 10, 2001
-.Dt ACL_CLEAR_FLAGS_NP 3
-.Os
-.Sh NAME
-.Nm acl_clear_flags_np
-.Nd clear flags from a flagset
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/acl.h
-.Ft int
-.Fn acl_clear_flags_np "acl_flagset_t flagset_d"
-.Sh DESCRIPTION
-The
-.Fn acl_clear_flags_np
-function
-is a non-portable call that clears all flags from flagset
-.Fa flagset_d .
-.Sh RETURN VALUES
-.Rv -std acl_clear_flags_np
-.Sh ERRORS
-The
-.Fn acl_clear_flags_np
-function fails if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-Argument
-.Fa flagset_d
-is not a valid descriptor for a flagset.
-.El
-.Sh SEE ALSO
-.Xr acl 3 ,
-.Xr acl_add_flag_np 3 ,
-.Xr acl_delete_flag_np 3 ,
-.Xr acl_get_flagset_np 3 ,
-.Xr acl_set_flagset_np 3 ,
-.Xr posix1e 3
-.Sh STANDARDS
-POSIX.1e is described in IEEE POSIX.1e draft 17.
-.Sh HISTORY
-POSIX.1e support was introduced in
-.Fx 4.0 .
-The
-.Fn acl_clear_flags_np
-function was added in
-.Fx 5.0 .
-.Sh AUTHORS
-The
-.Fn acl_clear_flags_np
-function was written by
-.An Edward Tomasz Napierala Aq trasz at FreeBSD.org .

Modified: head/lib/libc/posix1e/acl_delete_flag_np.3
==============================================================================
--- head/lib/libc/posix1e/acl_delete_flag_np.3	Thu Jun 25 12:53:50 2009	(r194956)
+++ head/lib/libc/posix1e/acl_delete_flag_np.3	Thu Jun 25 13:08:02 2009	(r194957)
@@ -82,171 +82,3 @@ The
 .Fn acl_delete_flag_np
 function was written by
 .An Edward Tomasz Napierala Aq trasz at FreeBSD.org .
-.\"-
-.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 10, 2001
-.Dt ACL_DELETE_FLAG_NP 3
-.Os
-.Sh NAME
-.Nm acl_delete_flag_np
-.Nd delete flags from a flagset
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/acl.h
-.Ft int
-.Fn acl_delete_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag"
-.Sh DESCRIPTION
-The
-.Fn acl_delete_flag_np
-function
-is a non-portable call that removes specific flags from flagset
-.Fa flags .
-.Sh RETURN VALUES
-.Rv -std acl_delete_flag_np
-.Sh ERRORS
-The
-.Fn acl_delete_flag_np
-function fails if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-Argument
-.Fa flagset_d
-is not a valid descriptor for a flagset.
-Argument
-.Fa flag
-does not contain a valid
-.Vt acl_flag_t
-value.
-.El
-.Sh SEE ALSO
-.Xr acl 3 ,
-.Xr acl_add_flag_np 3 ,
-.Xr acl_clear_flag_nps 3 ,
-.Xr acl_get_flagset_np 3 ,
-.Xr acl_set_flagset_np 3 ,
-.Xr posix1e 3
-.Sh STANDARDS
-POSIX.1e is described in IEEE POSIX.1e draft 17.
-.Sh HISTORY
-POSIX.1e support was introduced in
-.Fx 4.0 .
-The
-.Fn acl_delete_flag_np
-function was added in
-.Fx 8.0 .
-.Sh AUTHORS
-The
-.Fn acl_delete_flag_np
-function was written by
-.An Edward Tomasz Napierala Aq trasz at FreeBSD.org .
-.\"-
-.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 10, 2001
-.Dt ACL_DELETE_FLAG_NP 3
-.Os
-.Sh NAME
-.Nm acl_delete_flag_np
-.Nd delete flags from a flagset
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/acl.h
-.Ft int
-.Fn acl_delete_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag"
-.Sh DESCRIPTION
-The
-.Fn acl_delete_flag_np
-function
-is a non-portable call that removes specific flags from flagset
-.Fa flags .
-.Sh RETURN VALUES
-.Rv -std acl_delete_flag_np
-.Sh ERRORS
-The
-.Fn acl_delete_flag_np
-function fails if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-Argument
-.Fa flagset_d
-is not a valid descriptor for a flagset.
-Argument
-.Fa flag
-does not contain a valid
-.Vt acl_flag_t
-value.
-.El
-.Sh SEE ALSO
-.Xr acl 3 ,
-.Xr acl_add_flag_np 3 ,
-.Xr acl_clear_flag_nps 3 ,
-.Xr acl_get_flagset_np 3 ,
-.Xr acl_set_flagset_np 3 ,
-.Xr posix1e 3
-.Sh STANDARDS
-POSIX.1e is described in IEEE POSIX.1e draft 17.
-.Sh HISTORY
-POSIX.1e support was introduced in
-.Fx 4.0 .
-The
-.Fn acl_delete_flag_np
-function was added in
-.Fx 8.0 .
-.Sh AUTHORS
-The
-.Fn acl_delete_flag_np
-function was written by
-.An Edward Tomasz Napierala Aq trasz at FreeBSD.org .

Modified: head/lib/libc/posix1e/acl_flag.c
==============================================================================
--- head/lib/libc/posix1e/acl_flag.c	Thu Jun 25 12:53:50 2009	(r194956)
+++ head/lib/libc/posix1e/acl_flag.c	Thu Jun 25 13:08:02 2009	(r194957)
@@ -153,313 +153,3 @@ acl_set_flagset_np(acl_entry_t entry_d, 
 
 	return (0);
 }
-/*-
- * Copyright (c) 2008, 2009 Edward Tomasz Napierała <trasz at FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <errno.h>
-#include <sys/acl.h>
-
-#include "acl_support.h"
-
-static int
-_flag_is_invalid(acl_flag_t flag)
-{
-
-	if ((flag & ACL_FLAGS_BITS) == flag)
-		return (0);
-
-	errno = EINVAL;
-
-	return (1);
-}
-
-int
-acl_add_flag_np(acl_flagset_t flagset_d, acl_flag_t flag)
-{
-
-	if (flagset_d == NULL) {
-		errno = EINVAL;
-		return (-1);
-	}
-
-	if (_flag_is_invalid(flag))
-		return (-1);
-
-	*flagset_d |= flag;
-
-	return (0);
-}
-
-int
-acl_clear_flags_np(acl_flagset_t flagset_d)
-{
-
-	if (flagset_d == NULL) {
-		errno = EINVAL;
-		return (-1);
-	}
-
-	*flagset_d |= 0;
-
-	return (0);
-}
-
-int
-acl_delete_flag_np(acl_flagset_t flagset_d, acl_flag_t flag)
-{
-
-	if (flagset_d == NULL) {
-		errno = EINVAL;
-		return (-1);
-	}
-
-	if (_flag_is_invalid(flag))
-		return (-1);
-
-	*flagset_d &= ~flag;
-
-	return (0);
-}
-
-int
-acl_get_flag_np(acl_flagset_t flagset_d, acl_flag_t flag)
-{
-
-	if (flagset_d == NULL) {
-		errno = EINVAL;
-		return (-1);
-	}
-
-	if (_flag_is_invalid(flag))
-		return (-1);
-
-	if (*flagset_d & flag)
-		return (1);
-
-	return (0);
-}
-
-int
-acl_get_flagset_np(acl_entry_t entry_d, acl_flagset_t *flagset_p)
-{

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list