History log of /freebsd-10.1-release/bin/setfacl/setfacl.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 241720 19-Oct-2012 ed

Fix warnings found by -Wmising-variable-declarations.

This self-written compiler warning, which is hopefully going to be
committed into LLVM sources soon, warns about potentially missing
`static' keywords, similar to -Wmissing-prototypes.

- bin/pax: Move external declaration of chdname and s_mask into extern.h.
- bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h.
- sbin/mount_fusefs: Remove char *progname; use getprogname().
- others: add `static' where possible.


# 240084 04-Sep-2012 trasz

Make "setfacl -bd" an alias for "setfacl -k". Previously it would crash
on assert.

PR: bin/165807
MFC after: 1 month


# 240083 04-Sep-2012 trasz

Make setfacl(1) behave properly in situations like "setfacl -kd".

MFC after: 1 month


# 216922 03-Jan-2011 jh

Increase carried_error if we skip a file due to an error. This ensures
that setfacl(1) exits with proper exit status on failure.

PR: bin/149780
Submitted by: Ævar Arnfjörð Bjarmason (original version)
Reviewed by: trasz
MFC after: 3 weeks


# 204819 07-Mar-2010 joel

Switch to our preferred license text.

Approved by: jedgar


# 196936 07-Sep-2009 trasz

Add NFSv4 support to setfacl(1).

Reviewed by: rwatson


# 182813 06-Sep-2008 trasz

Fix double free in setfacl(1). Description from the author:

Initially, 'acl' (an 'acl_t *') is allocated, and its ACCESS_ACL and
DEFAULT_ACL fields are passed to the 'libc' ACL routines for subsequent
allocation. If the '-m' option (merge existing ACL with a new one) is
specified, then 'set_acl_mask()' will be called and passed one of the
two ACLs. This function, in turn, replaces this given ACL structure by
another, freshly allocated. However, the pointer in the 'acl' variable
in the caller is not updated. The caller then proceeds to free the ACL,
incurring in a double free condition.

Submitted by: Pedro Martelletto <pedro at ambientworks.net>
Approved by: rwatson (mentor)


# 167000 25-Feb-2007 mckusick

Implement the -h flag (set an ACL on a symbolic link).
Before this fix the -h flag was ignored (i.e. setfacl
always set the ACL on the file pointed to by the symbolic
link even when the -h flag requested that the ACL be set
on the symbolic link itself).


# 159463 09-Jun-2006 kib

Copy filename read from the stdin into the private buffer. Otherwise,
next read filename overwrite previous one, resulting in acl being
applied only to the last name in the list.

Submitted by: Oleg Lomaka <oleg.lomaka at gmail com>
MFC after: 1 week
Approved by: kan (mentor)


# 141578 09-Feb-2005 ru

Sync program's usage() with manpage's SYNOPSIS.


# 139969 10-Jan-2005 imp

/*- or .\"- or #- to begin license clauses.


# 118602 07-Aug-2003 rwatson

-v no longer a valid argument to setfacl(1) -- remove from usage().

PR: 55318
Submitted by: Grzegorz Czaplinski <G.Czaplinski@prioris.mini.pw.edu.pl>


# 117734 18-Jul-2003 rwatson

When reporting an error internalizing an ACL string, print out the
ACL that generated the error, rather than the function, which is
more user-friendly.

Obtained from: TrustedBSD Project
Product of: France


# 108450 30-Dec-2002 rwatson

Add "-h" arguments to getfacl and setfacl, which behave in a manner
similar to "-h" on chown, chmod, etc, causing the operation to occur
on a final symlink in the provided path, rather than its target.

Obtained from: TrustedBSD Project


# 99110 30-Jun-2002 obrien

Consistently use FBSDID


# 87259 02-Dec-2001 jedgar

Add defines for access and default ACLs (ACCESS_ACL/DEFAULT_ACL)
to enhance readability.

Obtained from: TrustedBSD Project


# 87254 02-Dec-2001 jedgar

style(9) cleanups mostly consisting of:
o explicitly check return values and variables against a value
o return x; -> return (x);
o fix inconsistent sysexits usage by nuking it (partially
suggested by bde)

Obtained from: TrustedBSD Project


# 76881 20-May-2001 kris

Silence WARNS=2 and BDECFLAGS on alpha and i386

MFC After: 1 week


# 75928 24-Apr-2001 jedgar

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


# 74465 19-Mar-2001 rwatson

o POSIX.2c Userland tool support for POSIX.1e ACLs -- getfacl retrieves ACLs
from files and directories, and setfacl sets ACLs on files and directories.

Submitted by: jedgar
Obtained from: TrustedBSD Project