Commit graph

329 commits

Author SHA1 Message Date
Alexander Ziaee 1a720cbec5 man filesystems: fix xrefs after move to section 4
Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
2024-05-16 10:25:29 -06:00
Brooks Davis 418b4c2a80 acl_to_text: include sys/param.h for MAXLOGNAME
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44474
2024-04-15 21:35:41 +01:00
Brooks Davis 85c9d36497 acl_equiv_mode_np: zero mode on just inited ACL
You can't return 0 and not write the mode if mode_p is non-NULL.  That
violates the API contract and in common usage leaves stack trash in
*mode_p.

The acl_equiv_mode_test test passed by accident.

Reviewed by:	kevans, markj
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D43278
2024-01-03 16:34:39 +00:00
Peter Eriksson 7aa375dcc6 libc: correct some memory leaks in acl_to_text(3) and acl_to_text_np(3)
PR:	275232
MFC after:	1 week
2023-12-18 00:06:03 +02:00
Brooks Davis 1ca63a8219 libc: Remove empty comments in Symbol.map
These were left over from $FreeBSD$ removal.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D42612
2023-11-15 17:51:03 +00:00
Warner Losh 559a218c9b libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42385
2023-11-01 16:44:30 -06:00
Dag-Erling Smørgrav dc41de36ab libc: Fix missing or misspelled MLINKS.
Differential Revision:	https://reviews.freebsd.org/D42192
2023-10-18 16:07:46 +02:00
Dag-Erling Smørgrav c34fce8a03 Fix typos in acl_get_entry(3) manual page.
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41924
2023-09-22 09:43:19 +02:00
Dag-Erling Smørgrav b653faaa19 Remove mention of defunct mailing list from acl / mac man pages.
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41923
2023-09-22 09:43:19 +02:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh 42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Kyle Evans 0e96337b11 acl_is_trivial_np(3): minor fixes
- Correct the document title
- This function has an _np suffix
- acl_strip_np has a manpage, xref it
- RETURN VALUES should describe acl_is_trivial_np, not acl_get_tag_type

Sponsored by:	Klara, Inc.
2023-06-19 00:47:04 -05:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Kyle Evans 20c61a7c51 acl(3): improve discoverability of acl_get_perm_np(3)
- Mention it in acl(3) as an available function, xref
- Mention it in acl_get_permset(3), as acl_get_perm_np(3) is a natural
    follow-up to acl_get_permset(3)

Sponsored by:	Klara, Inc.
2023-05-08 22:45:12 -05:00
Mark Johnston 68ca8363c7 libc: Use secure_getenv(3) where appropriate
No functional change intended.

Reviewed by:	mjg, imp, kib
Differential Revision:	https://reviews.freebsd.org/D39278
2023-03-27 08:56:22 -04:00
Konstantin Belousov 959c7ab51e acl_delete_entry(): remove write-only variable
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-11-29 17:39:51 +02:00
Gleb Popov c468923b22 libc/posix1e: Add acl_extended_file_np() function.
Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255
2021-08-27 11:52:26 +03:00
Gleb Popov d81d5b2f2c libc/posix1e: Add acl_equiv_mode_np() function.
Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255
2021-08-27 11:52:15 +03:00
Gleb Popov 937f807a36 libc/posix1e: Add acl_cmp_np() function.
Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255
2021-08-27 11:52:08 +03:00
Gleb Popov 19f7f91133 libc/posix1e: Add acl_from_mode_np() function.
Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255
2021-08-27 11:49:19 +03:00
Andrew Walker dd559118ab Fix leak in libc NFSv4 flags parsing
Free memory allocated by strdup() in parse_flags_verbose().

Submitted by:	Andrew Walker <walker.aj325_gmail.com>
Reported by:	valgrind
Reviewed by:	allanjude, freqlabs, rpokala
MFC after:	3 days
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D29871
2021-04-20 15:39:56 -04:00
Edward Tomasz Napierala bce7ee9d41 Drop "All rights reserved" from all my stuff. This includes
Foundation copyrights, approved by emaste@.  It does not include
files which carry other people's copyrights; if you're one
of those people, feel free to make similar change.

Reviewed by:	emaste, imp, gbe (manpages)
Differential Revision:	https://reviews.freebsd.org/D26980
2020-10-28 13:46:11 +00:00
John Baldwin 371f3da616 Remove the SYMVER build option.
This option was added as a transition aide when symbol versioning was
first added.  It was enabled by default in 2007 and is supported even
by the old GPLv2 binutils.  Trying to disable it currently fails to
build in libc and at this point it isn't worth fixing the build.

Reported by:	Michael Dexter
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D24637
2020-04-30 22:08:40 +00:00
Sean Eric Fagan 237f4abc57 Remove some redundant code in _posix1e_acl_strip_np
This was discovered through examination -- acl_copy_entry() copies the
tag type and permset fields.

Reviewed by:	trasz, pfg
Sponsored by:	iXsystems Inc.
Differential Revision:	https://reviews.freebsd.org/D19240
2019-02-19 19:15:15 +00:00
Brad Davis b6af74d289 Move mac.conf to lib/libc/posix1e/
This leverages CONFS to handle the install of the config file.

Approved by:	re (blanket, pkgbase), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17162
2018-09-18 01:40:37 +00:00
Pedro F. Giffuni d915a14ef0 libc: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-25 17:12:48 +00:00
Enji Cooper 7372d8148c acl_to_text(3): start sentences on new lines
Reported by:	make manlint
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-05-23 07:12:31 +00:00
Enji Cooper 5f19e26b75 acl_create_entry(3): separate .Nm entries with commas in SYNOPSIS
Reported by:	make manlint
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-05-23 07:11:15 +00:00
Enji Cooper b4b5c4a602 posix1e(3): reference using the section (3) when referencing libbsm with .Xr
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-05-23 07:05:34 +00:00
Enji Cooper d0fd0203fb Replace dot-dot relative pathing with SRCTOP-relative paths where possible
This reduces build output, need for recalculating paths, and makes it clearer
which paths are relative to what areas in the source tree. The change in
performance over a locally mounted UFS filesystem was negligible in my testing,
but this may more positively impact other filesystems like NFS.

LIBC_SRCTOP was left alone so Juniper (and other users) can continue to
manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as
include Makefiles with custom options.

Discussed with:	marcel, sjg
MFC after:	1 week
Reviewed by:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D9207
2017-01-20 03:23:24 +00:00
Pedro F. Giffuni 32223c1b7d libc: spelling fixes.
Mostly on comments.
2016-04-30 01:24:24 +00:00
Pedro F. Giffuni 513004a23d libc: replace 0 with NULL for pointers.
While here also cleanup some surrounding code; particularly
drop some malloc() casts.

Found with devel/coccinelle.

Reviewed by:	bde (previous version - all new bugs are mine)
2016-04-10 19:33:58 +00:00
Ed Maste c38dac681d libc: don't build compat functions if building WITHOUT_SYMVER
WITHOUT_SYMVER necessarily implies building a system without symver
backwards compatability.

Sponsored by:	The FreeBSD Foundation
2016-03-15 19:26:32 +00:00
Edward Tomasz Napierala de19f22681 Fix typos in .Xrs.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-02-29 16:52:06 +00:00
Mariusz Zaborski c501d73c7e Convert casperd(8) daemon to the libcasper.
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.

Discussed with:		pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by:	drysdale@google.com, bdrewery
Approved by:		pjd (mentor)
Differential Revision:	https://reviews.freebsd.org/D4277
2016-02-25 18:23:40 +00:00
Craig Rodrigues 8d7e1f1585 Remove names from some prototypes 2015-09-20 20:16:34 +00:00
Craig Rodrigues 9762525c95 Adding missing declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 04:06:55 +00:00
Edward Tomasz Napierala 45d55945fd Make it possible to use acl_create_entry_np(3) to use first entry to an
empty ACL, and to append an entry to an ACL.

Submitted by:	sef@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-08 14:52:14 +00:00
Xin LI 28ffe927c2 Expose an interface to determine if an ACE is inherited.
Submitted by:	sef
Reviewed by:	trasz
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D3540
2015-09-04 00:14:20 +00:00
Edward Tomasz Napierala 8e6acc531a Fix acl_strip_np(3) breakage introduced in r279962.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:31:34 +00:00
Edward Tomasz Napierala b0f957f94a Fix the way acl_init(3) uses posix_memalign(3) - the latter doesn't
set errno.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:30:39 +00:00
Xin LI 34103b3cac Instead of doing an no-op (|= 0), actually clear the flags in
acl_clear_flags_np.

MFC after:	2 weeks
2015-08-24 04:49:20 +00:00
Edward Tomasz Napierala 208a8b9532 Update Capsicum and Mandatory Access Control manual pages
to no longer claim they are experimental.

Reviewed by:	rwatson@, wblock@
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2985
2015-07-25 15:56:49 +00:00
Pedro F. Giffuni cf0f0b800c libc: plug memory leaks in edge cases for the posix1e code.
CID:	1016705
CID:	1016706
CID:	1016707

Differential Revision:	https://reviews.freebsd.org/D2023
2015-03-13 18:42:43 +00:00
Christian Brueffer 0aee91e1fb Various mdoc fixes and a few EOL whitespace removals.
Found with:	mandoc -Tlint
2014-12-21 12:36:36 +00:00
Edward Tomasz Napierala c07b9c32f0 Remove acl_size.c; apparently it was never used.
PR:		194398
Submitted by:	ngie@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-19 19:43:39 +00:00
Edward Tomasz Napierala 62bf353355 Update acl(3) to expand on NFSv4 ACL support.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-30 10:56:38 +00:00