Commit Graph

196 Commits

Author SHA1 Message Date
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Ruslan Ermilov
051bb54bd3 mdoc(7) police: Added the missing .Os call; it's not strictly
necessary nowadays, but is documented as "required", and may
become so again in the future.

Approved by:	re
2002-12-11 15:55:29 +00:00
Ruslan Ermilov
3b29692060 mdoc(7) police: markup overhaul.
Approved by:	re
2002-12-04 16:28:45 +00:00
Ruslan Ermilov
c51d717f0c libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
Robert Watson
963b8cdcc8 Update acl.3 to xref getfacl(1) and setfacl(1), the recommended tools for
manipulating file ACLs.  Update the status of the implementation a bit,
update the copyright, etc.

Obtained from:	TrustedBSD Project
2002-11-08 15:01:28 +00:00
Chris Costello
2834b91a8d o Make the COMPATIBILITY section a bit less redundant.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-11-06 17:38:18 +00:00
Chris Costello
baae0d7638 o Update man page to reflect the new prototypes for mac_{to,from}_text.
o Remove a (currently) no-longer-pertinent entry from errors.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-11-06 17:34:29 +00:00
Robert Watson
ce311c66ec Hook up the userland wrapper for __mac_execve().
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-06 03:38:47 +00:00
Robert Watson
f8d0815040 License update authorized by NAI: remove clause 3. 2002-11-05 01:42:35 +00:00
Robert Watson
1ccff0f490 Clarify language relating to ACLs, Capabtilities, and MAC, since the
implementation status of these services has changed substantially
since this man page was last updated.
2002-11-04 20:52:09 +00:00
Robert Watson
ec05f17e38 Update license, historical information. 2002-11-04 20:45:44 +00:00
Robert Watson
443ab2a0fd Point out that the MAC Framework is considered experimental. 2002-11-04 20:42:58 +00:00
Chris Costello
311e43248d Scoop out examples illustrating the label text format and refer to
maclabel(7) instead.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-10-28 23:06:04 +00:00
Garrett Wollman
688dfe4533 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
Chris Costello
4bae1674ce Place mac_prepare() with the other mac_prepare*() functions. 2002-10-24 01:16:56 +00:00
Chris Costello
0d511a4ea7 mac_free() no longer accepts a void * parameter; only mac_t's are supposed
to be passed.  Point this out in a warning notice, which will eventually
go away, sometime between now and -RELEASE.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-24 01:01:29 +00:00
Chris Costello
3261668c1d Remove superfluous empty "FILES" section.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-23 23:56:15 +00:00
Chris Costello
b90b17d351 Remove hard sentence breaks.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-23 23:55:23 +00:00
Robert Watson
391b1d758d Reflect MAC kernel/user API changes into the libc MAC implementation.
This removes a lot of complexity, since we basically just reserve
space on a retrieval of a label, and pass around strings.  Two new
elements: (1) consumers of the API must now declare what label
elements they are interested in retrieving, or (2) rely on the default
provided in a new configuration file, mac.conf.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 14:36:11 +00:00
Robert Watson
19eab74a6c .Xr mac.3 and posix1e.3 to mac.9. Point at sys/mac.h in posix1e.3.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 01:52:53 +00:00
Robert Watson
803bf0837b Unhook the per-policy parsing/printing MAC modules in libc to prepare
to bring in the new MAC label management API.  With the new API
revision, we have only policy-agnostic code in libc and the base
kernel.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-21 03:54:24 +00:00
Robert Watson
ecfbf7e46d Update TE policy and MAC text conversion routines to support partial
label updates.  Biba and MLS already supported this.  This permits the
userland library to submit relative updates on MAC labels, rather
than submitting an entire label to replace the current label.  This
also requires changes to the MAC modules, which are forthcoming.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-09 03:09:38 +00:00
Robert Watson
1355f6d016 X-ref mac.3. 2002-08-09 03:03:08 +00:00
Robert Watson
d97fcfce27 Introduce support for Mandatory Access Control and extensible
kernel access control.

Extensions to libc to provide basic MAC label manipulation facilities
for userland.  These interface will be replaced in the next month
or two with more flexible interfaces, but provide sufficient support
to allow use of the Biba and MLS policies for user applications.

libc_r wrappers to follow.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-02 21:14:42 +00:00
Robert Watson
820a52632e No POSIX.1e capabilities in the main tree yet. 2002-06-13 23:40:13 +00:00
Jens Schweikhardt
27cf01ec47 Correct a bunch of typos. Translators can ignore this commit.
MFC after:	3 weeks
2002-06-02 10:27:41 +00:00
David E. O'Brien
333fc21e3c Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
2002-03-22 21:53:29 +00:00
Brian Feldman
92369d84a9 Check if string is not NULL, not *string, before setting *string. 2002-02-27 22:00:44 +00:00
Chris D. Faulhaber
a82f127b41 o style(9) and consistency fix:
- if (!var) -> if (var == NULL)
o spelling fix (althouh -> although)

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2002-02-21 23:18:04 +00:00
Chris D. Faulhaber
9fd46b0237 o style(9) and consistency fixes:
- if (!var) -> if (var == NULL)
  - return val; -> return (val);

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2002-02-21 23:17:19 +00:00
Chris D. Faulhaber
e146d0bc6a Add more argument checking
Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2002-02-21 23:13:06 +00:00
Chris D. Faulhaber
c61eb011c4 static'ize and declare functions
Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2002-02-21 23:12:25 +00:00
Chris D. Faulhaber
e76872c11e o style and consistency fixes:
- if (!var) -> if (var == NULL)
  - return val; -> return (val);
o update copyright
2002-02-17 20:05:20 +00:00
Chris D. Faulhaber
60fba73589 Correct function's description.
Obtained from:	TrustedBSD Project
2002-01-29 12:18:45 +00:00
Chris D. Faulhaber
d5af31a255 o return EINVAL if acl_to_text() have been sent a NULL acl. o update copyright dates.
Reviewed by:	rwatson
2002-01-26 19:32:50 +00:00
Chris D. Faulhaber
98a32f6de6 Correct phrase 'get an ACL' to 'set an ACL'.
PR:		33660
Submitted by:	Rich Morin <rdm@cfcl.com>, Tom Rhodes <darklogik@pittgoth.com>
2002-01-07 22:46:14 +00:00
Chris Costello
d06a764812 o Change the layout of the tagged lists to be like those in acl(3).
o Document the following capabilities: CAP_NET_ADMIN, CAP_SYS_RAWIO,
  CAP_SYS_ADMIN, and CAP_SYS_TTY_CONFIG.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-12-23 00:19:48 +00:00
Robert Watson
5acb7446b0 o Reflect repo-copy of extattr.[c3] from libutil to libc, moving
extattr namespace routines to the libc/posix1e directory.  While
  the extattr calls are not strictly POSIX.1e, POSIX.1e wasn't
  strictly ever approved, so I think that's OK.

Obtained from:	TrustedBSD Project
2001-11-16 05:09:45 +00:00
Bruce Evans
da838a6546 Fixed missing `const' in synopsis. 2001-10-03 16:29:21 +00:00
Bruce Evans
d2dcbe6238 Fixed return type in synopsis. 2001-10-03 16:25:08 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Matthew Dillon
8719c58fef Add __FBSDID()s to libutil 2001-09-30 22:35:07 +00:00
Ruslan Ermilov
9cbf4a2152 mdoc(7) police: removed commas from the standard (split) AUTHORS block. 2001-09-11 09:26:38 +00:00
Ruslan Ermilov
8872ae5340 mdoc(7) police: markup and minor content fixes.
o Removed whitespace at EOL
o Removed hard sentence breaks
o Added cap_size() to the NAME section
o Normalized .Nd descriptions
o Fixed the abuses of .Nm and .Va
o Fixed some DESCRIPTION texts
o Fixed the RETURN VALUES and ERRORS texts to look more traditional

Reviewed by:	tmm
2001-09-05 14:09:08 +00:00
Robert Watson
8d44fade0e Add Thomas Moestl and Chris Faulhaber to the author list for POSIX.1e
support.

Obtained from:	TrustedBSD Project
2001-09-05 03:36:00 +00:00
Robert Watson
3652b4dc72 o Sync up prototypes for cap_size() and cap_copy_ext() with
sys/capability.h--this compiled fine on i386 where (int) and (ssize_t)
  are the same, but broke on Alpha where they differ.

Submitted by:		Mike Barcroft <mike@FreeBSD.org>
Obtained from:	TrustedBSD Project
2001-09-02 23:13:49 +00:00
Robert Watson
0e3adf0b58 o Attach cap_cmp.c and cap_copy.c to the build.
o Attach cap_copy_ext.3 and cap_copy_int.3 to the install, and link
  cap_size.3 to cap_copy_ext.3.

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-09-01 00:00:50 +00:00
Ruslan Ermilov
d6002fef6f Use ``.Rv -std'' wherever possible.
Submitted by:	yar
2001-08-31 09:57:38 +00:00
Robert Watson
ab2ba9fac8 o Use .Fx to refer to FreeBSD
Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:12:54 +00:00
Robert Watson
cbc25559e4 o Remove definition of CAP_MAX_BUF_LEN since it is defined in
sys/capability.h now.

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:11:59 +00:00
Robert Watson
7bb862d793 Introduce implementations of POSIX.1e non-portable form capability
support functions:
     cap_subset_np()    - Is cap1 a subset of cap2
     cap_equal_np()     - Is cap1 equal to cap2

o Introduce implementations of POSIX.1e capability support functions:
     cap_copy_ext()     - Externalize capability
     cap_copy_int()     - Internalize capability
     cap_size()         - Determine size required for cap_copy_ext()

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:07:48 +00:00
Robert Watson
fca41b9c6f o src/sys/capability.h provides a number of support macros that are not
documented by POSIX.1e, and understand the opaque capability structures.
  Introduce support in the userland POSIX.1e library for a
  _CAPABILITY_NEEDMACROS define to remove these macros from the normal
  namespace, but allow the libc functions to use them.

Submitted by:	tmm
Obtained from:	TrustedBSD Project
2001-08-29 17:53:45 +00:00
Robert Watson
4b7e521b26 o s/violate/override/ Capabilities are part of the system policy, not
an exception to it.

Submitted by:	tmm
Obtained from:	TrustedBSD Project
2001-08-25 14:37:01 +00:00
Brian Somers
3c321a686f Handle snprintf() returning -1
MFC after:	2 weeks
2001-08-20 12:41:36 +00:00
Yaroslav Tykhiy
a2a0a4dc2a Use the ".Rv" mdoc(7) macro where appropriate.
Reviewed by:	ru
2001-08-14 14:20:35 +00:00
Yaroslav Tykhiy
b1250632c5 Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.
Reviewed by:	ru
2001-08-09 13:32:13 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ruslan Ermilov
a307d59838 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Ruslan Ermilov
5521ff5a4d mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2). 2001-07-06 16:46:48 +00:00
Dima Dorfman
2b47b55f69 Add RETURN VALUES and ERRORS sections. 2001-06-25 01:25:01 +00:00
Dima Dorfman
444a2d61e8 Add a manual page for extattr_string_to_namespace and
extattr_namespace_to_string.

Reviewed by:	rwatson
2001-06-24 23:54:46 +00:00
Dima Dorfman
a910f192bb Remove duplicate words. 2001-06-24 01:34:38 +00:00
Maxim Sobolev
000d56193c Fix cross-references:
xntpd.8 --> ntpd.8
acl_delete_perms.3 --> acl_delete_perm.3
getname.2 --> getsockname.2

MFC after:	1 week
2001-06-10 12:06:54 +00:00
Ruslan Ermilov
9af42d27b1 mdoc(7) police: fix markup. 2001-05-16 09:50:12 +00:00
Chris D. Faulhaber
fda2d391d6 Correct prototype (entry_p -> *entry_p)
Submitted by:	Alex Zepeda <jazepeda@pacbell.net>
2001-05-07 23:16:25 +00:00
Chris D. Faulhaber
21aaa49c89 Document acl_get_entry(3)
Obtained from:	TrustedBSD Project
2001-04-26 22:28:14 +00:00
Chris D. Faulhaber
0f6263079e o Separate acl_t into internal and external representations as
required by POSIX.1e.  This maintains the current 'struct acl'
  in the kernel while providing the generic external acl_t
  interface required to complete the ACL editing library.
o Add the acl_get_entry() function.
o Convert the existing ACL utilities, getfacl and setfacl, to
  fully make use of the ACL editing library.

Obtained from:	TrustedBSD Project
2001-04-24 22:45:41 +00:00
Thomas Moestl
a483f58aea Remove bogus assignments of libc syscall stub return values to errno;
the stubs do errno assignments and return -1 in this case, so that errno
would end up with this value.

Approved by:	rwatson
2001-04-24 20:50:42 +00:00
Ruslan Ermilov
eb0838029f mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
Ruslan Ermilov
79d4920b1d mdoc(7) police: use .Fx where appropriate. 2001-04-18 13:14:47 +00:00
Ruslan Ermilov
6061acb30c mdoc(7) police: fix markup. 2001-04-16 15:06:19 +00:00
Chris D. Faulhaber
d5675fffd1 Correct a bogus cast in acl_get_qualifier() causing invalid
ID's to be stored in the ACL.

Obtained from:	TrustedBSD Project
2001-04-15 15:21:15 +00:00
Chris D. Faulhaber
9a227c5754 Add acl_get_perm_np(3), a non-portable function to check if a
permission is in a permission set, required for third-party
applications such as Samba.

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-13 19:37:04 +00:00
Chris D. Faulhaber
94ef417e4b Add the remaining POSIX.1e ACL definitions:
ACL_UNDEFINED_TAG, ACL_UNDEFINED_ID, ACL_FIRST_ENTRY, ACL_NEXT_ENTRY

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-13 19:14:38 +00:00
Chris D. Faulhaber
bbf2cf59fc Revamp acl_create_entry() so it actually works.
Obtained from:	TrustedBSD Project
2001-04-11 22:09:51 +00:00
Chris D. Faulhaber
fb1af1f2bf Correct the following defines to match the POSIX.1e spec:
ACL_PERM_EXEC  -> ACL_EXECUTE
  ACL_PERM_READ  -> ACL_READ
  ACL_PERM_WRITE -> ACL_WRITE

Obtained from:	TrustedBSD
2001-04-11 02:19:01 +00:00
Ruslan Ermilov
1a4fc0bfba mdoc(7) police: add missing LIBRARY section. 2001-04-05 07:51:48 +00:00
Ruslan Ermilov
8eb5b197f1 Unbreak world.
Submitted by:	jhay
2001-04-05 07:47:06 +00:00
Ruslan Ermilov
31acc83627 Record -lposix1e merge with -lc. 2001-04-05 07:42:56 +00:00
Ruslan Ermilov
336ee39a26 mdoc(7) police rev 1.11: convert descriptions and cross-references
for the ACL editing library functions to the plain tagged list.
2001-04-05 07:35:59 +00:00
Chris D. Faulhaber
6822f9df3f - Add descriptions and cross-references for the ACL editing library
functions.
- Place the acl_dup() description in alphabetical order.
- Move the POSIX.1e descriptions under the ENVIRONMENT section to the
  STANDARDS section.

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-05 01:48:07 +00:00
Chris D. Faulhaber
4aa97316b4 Install the acl_create_entry.3 man page 2001-04-05 01:36:54 +00:00
Thomas Moestl
7bd44e9223 Prepare for the inclusion of libposix1e into libc: retire the old
Makefile, add Makefile.inc needed for libc build; add
#include "namespace.h"/#include "un-namespace.h" pairs around the
includes of sys/acl.h and sys/capability.h, and an additional underscore
in front of the functions that will be overridden in libc_r.

Approved by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-04 18:00:52 +00:00
Chris D. Faulhaber
5a696f5d02 Correct function name: acl_clear_perm -> acl_clear_perms 2001-03-29 00:48:54 +00:00
Robert Watson
3cd4410688 o De-uglify IMPLEMENTATION NOTES section by removing unnecessary use of
.Fx
2001-03-28 01:03:33 +00:00
Ruslan Ermilov
4a558355e5 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
Robert Watson
a21c3aa0e9 o Update copyright date
o Revise description in light of commits over last month including:
  - ACL editing library is now implemented
  - ACLs are now implemented

Obtained from:	TrustedBSD Project
2001-03-26 19:55:35 +00:00
Ruslan Ermilov
01f491fa8e mdoc(7) police: fix markup. 2001-03-23 14:01:28 +00:00
Chris D. Faulhaber
3dfe3292f1 Correct the acl_set_permset and acl_set_tag_type man pages
which somehow got mixed up with the acl_get_* man pages.

Submitted by:	ru
2001-03-23 11:30:31 +00:00
Ruslan Ermilov
8480a1eb14 mdoc(7) police: fix markup. 2001-03-23 09:39:35 +00:00
Ruslan Ermilov
f8376ccd46 mdoc(7) police: fix markup, function prototype, and RETURN VALUES text. 2001-03-23 09:38:43 +00:00
Chris D. Faulhaber
4bf60dfaf8 Add the following ACL editing functions:
acl_add_perm, acl_clear_perms, acl_copy_entry, acl_create_entry,
  acl_delete_perm, acl_get_permset, acl_get_qualifier, acl_get_tag_type,
  acl_set_permset, acl_set_qualifier, acl_set_tag_type

This brings us within 4 functions of a full ACL editing library.

Reviewed by:	rwatson
2001-03-22 22:31:01 +00:00
Ruslan Ermilov
bc057d3dff mdoc(7) police:
- lowercase Nd argument
- mark function arguments with Fa
- mark defined values with Dv
- simply copying POSIX text for RETURN VALUES and ERRORS sections is not
  always a good idea.  POSIX uses the word "shall" indicating the behavior
  the correct implementation should follow.
2001-03-19 08:08:22 +00:00
Robert Watson
d51048c93b o Rename "namespace" argument to "attrnamespace" as namespace is a C++
reserved word.

Submitted by:	jkh
Obtained from:	TrustedBSD Project
2001-03-19 05:05:41 +00:00
Chris D. Faulhaber
14721edabe Add the following POSIX 1003.1e functions and man pages:
o acl_calc_mask(): calculates the ACL mask entry associated with
    the given ACL.
  o acl_delete_entry(): remove a specified ACL entry from the given
    ACL.

Approved by:	rwatson
2001-03-19 03:19:51 +00:00
Robert Watson
1bc2362e07 o To support new EA interface with explicit namespaces, introduce two
utility functions which convert between string namespace names and
  numeric constants used by the interface.  Right now, two namespaces
  are supported, EXTATTR_NAMESPACE_SYSTEM ("system") and
  EXTATTR_NAMESPACE_USER ("user").  These functions are used by
  various userland EA utilities, rather than hard coding the routines
  all over the place.

Obtained from:	TrustedBSD Project
2001-03-15 03:00:39 +00:00
Robert Watson
2de14c39b5 o Update copyright dates.
o Rename internal library functions so that they are prefixed with
  _posix1e or _POSIX1E, removing them from the application namespace (and
  potential conflict with other ACL functions elsewhere in the system).

Obtained from:	TrustedBSD Project
2001-03-13 02:31:32 +00:00
Jeroen Ruigrok van der Werven
9a01d32bfd Fix typo: seperate -> separate.
Seperate does not exist in the english language.

Submitted to look at by:	kris
2001-02-06 10:39:38 +00:00
Bruce Evans
fc80017420 Fixed C error(s) in synopsis. 2001-02-06 00:02:32 +00:00