History log of /freebsd-current/sys/kern/subr_acl_nfs4.c
Revision Date Author Comments
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# ba8cc6d7 12-Mar-2023 Mateusz Guzik <mjg@FreeBSD.org>

vfs: use __enum_uint8 for vtype and vstate

This whacks hackery around only reading v_type once.

Bump __FreeBSD_version to 1400093


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

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


# bce7ee9d 28-Oct-2020 Edward Tomasz Napierala <trasz@FreeBSD.org>

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


# 5710395f 24-Sep-2020 Alan Somers <asomers@FreeBSD.org>

Fix some signed/unsigned comparison warnings in NFS

Reviewed by: rmacklem
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26533


# d292b194 05-Aug-2020 Mateusz Guzik <mjg@FreeBSD.org>

vfs: remove the obsolete privused argument from vaccess

This brings argument count down to 6, which is passable without the
stack on amd64.


# cc426dd3 11-Dec-2018 Mateusz Guzik <mjg@FreeBSD.org>

Remove unused argument to priv_check_cred.

Patch mostly generated with cocinnelle:

@@
expression E1,E2;
@@

- priv_check_cred(E1,E2,0)
+ priv_check_cred(E1,E2)

Sponsored by: The FreeBSD Foundation


# 8a36da99 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/kern: adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified 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.


# 28ffe927 03-Sep-2015 Xin LI <delphij@FreeBSD.org>

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


# 9e21ef39 17-Apr-2012 Edward Tomasz Napierala <trasz@FreeBSD.org>

Fix bug where NFSv4 ACL enforcement code wouldn't unconditionally
allow the owner to read and write ACL and file attributes when there
was no entry with subject matching the owner. In other words,
'getfacl meh' shouldn't fail for the owner if the ACL looks like this:

# file: meh
# owner: trasz
# group: wheel
user:root:------a-------:------:allow

Reported by: kientzle


# a9a282f6 13-Mar-2012 Adrian Chadd <adrian@FreeBSD.org>

Add module load/unload stubs.


# 4ce9c95b 05-Oct-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Remove assertion against empty NFSv4 ACLs. An empty ACL is not exactly
valid - we don't allow for setting it on a file, for example - but it's
not something we should assert on.

For STABLE kernel, it changes nothing, because it's not compiled with
INVARIANTS. If it was, it would fix crashes. It also fixes an assert
in libc encountered with NFSv4 without nfsuserd(8) running.

Submitted by: Yuri Pankov (earlier version)
MFC after: 1 month


# 999d680c 22-Mar-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Make UFS use PSARC/2010/029 NFSv4 ACL semantics by default, bringing
it in line with ZFSv28.

X-MFC-After: ZFSv28.


# cdec3856 22-Mar-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Move the code around so that libc behaviour does not depend on a variable
that was supposed to be kernel-only. There should be no functional changes.


# 8a6f4985 06-Mar-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Temporarily revert r219272; it breaks acl_is_trivial_np(3).


# 18ac6e83 04-Mar-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Make UFS use PSARC/2010/029 NFSv4 ACL semantics by default, just like
ZFSv28 does.

MFC after: 2 months


# 4c7bba99 13-Dec-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

Adapt filesystem-independent NFSv4 ACL code (used by UFS, but not by ZFS)
to PSARC/2010/029. In short, the semantics is simplified - "weird stuff"
no longer happens after chmod, entries don't get duplicated during
inheritance, and trivial ACLs no longer contain three "DENY" entries,
which is also more friendly to MS Windows.

By default, UFS keeps using old semantics. To change it, set sysctl
vfs.acl_nfs4_old_semantics to 0. I'll flip the switch when ZFSv28
hits the tree, to keep these two in sync - ZFS v28 uses PSARC semantics,
and ZFS v15 uses the old one.


# 252e4a96 29-Oct-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

Fix uninitialized variable.

Found with: Coverity Prevent(tm)
CID: 8632


# 880cb81c 23-Oct-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

Remove workaround for ZFS bug; fix was committed to the //depot/user/pjd/zfs/...
branch some time ago.

MFC after: two weeks


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 4089cc8a 20-Sep-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

First step at adopting FreeBSD to support PSARC/2010/029. This makes
acl_is_trivial_np(3) properly recognize the new trivial ACLs. From
the user point of view, that means "ls -l" no longer shows plus signs
for all the files when running ZFS v28.


# de478dd4 30-Aug-2010 Jaakko Heinonen <jh@FreeBSD.org>

execve(2) has a special check for file permissions: a file must have at
least one execute bit set, otherwise execve(2) will return EACCES even
for an user with PRIV_VFS_EXEC privilege.

Add the check also to vaccess(9), vaccess_acl_nfs4(9) and
vaccess_acl_posix1e(9). This makes access(2) to better agree with
execve(2). Because ZFS doesn't use vaccess(9) for VEXEC, add the check
to zfs_freebsd_access() too. There may be other file systems which are
not using vaccess*() functions and need to be handled separately.

PR: kern/125009
Reviewed by: bde, trasz
Approved by: pjd (ZFS part)


# c977cdf9 03-Jun-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

The acl_cnt field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 3683


# fddc1213 27-Mar-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

MFC r200723:

Interpret VAPPEND correctly in vaccess_acl_nfs4(9).


# 78e32164 27-Mar-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

MFC r197405:

Add pieces of infrastructure required for NFSv4 ACL support in UFS.

Reviewed by: rwatson


# 922ec471 03-Jan-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

Fix comments.


# 558e9b5c 26-Dec-2009 Edward Tomasz Napierala <trasz@FreeBSD.org>

Now that all the callers seem to be fixed, add KASSERTs to make sure VAPPEND
is not being used improperly.


# 28d3fd00 19-Dec-2009 Edward Tomasz Napierala <trasz@FreeBSD.org>

Interpret VAPPEND correctly in vaccess_acl_nfs4(9).


# a9315dde 22-Sep-2009 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add pieces of infrastructure required for NFSv4 ACL support in UFS.

Reviewed by: rwatson


# c0d345be 09-Jun-2009 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add part of NFSv4 ACL kernel support code that is required for the upcoming
libc changes to work. Not connected to the kernel build yet; for now,
it will be compiled into libc.

Reviewed by: rwatson