aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/setfmac/setfmac.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | 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
* fts_read: Handle error from a NULL return better.Bryan Drewery2020-12-081-1/+3
| | | | | | | | | | | | | | | | | | | | This is addressing cases such as fts_read(3) encountering an [EIO] from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be seen as a successful traversal in some of these cases while silently discarding expected work. As noted in r264201, fts_read() does not set errno to 0 on a successful EOF so it needs to be set before calling it. Otherwise we might see a random error from one of the iterations. gzip is ignoring most errors and could be improved separately. Reviewed by: vangyzen Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27184 Notes: svn path=/head/; revision=368467
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | 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. No functional change intended. Notes: svn path=/head/; revision=326276
* An average consumer of fts(3) that avoids keeping pointers to oldYaroslav Tykhiy2008-01-291-13/+7
| | | | | | | | | | | FTSENTs and uses only what fts_read() has just returned can rely on fts_path being NUL-terminated. Under these conditions, a plain vanilla "%s" format can be safely used to printf an fts_path. OK'ed by: rwatson Notes: svn path=/head/; revision=175796
* fts_pathlen is now a size_t rather than an int so a cast is needed.John Birrell2008-01-271-6/+6
| | | | | | | | I'm not sure why warn() and err() string formatted variables need to be right-justified. Notes: svn path=/head/; revision=175704
* Eliminate duplicate header files.Kevin Lo2007-02-091-2/+0
| | | | Notes: svn path=/head/; revision=166582
* WARNS?=6 cleanup for [gs]et[fp]mac:Xin LI2005-01-271-3/+3
| | | | | | | | | | | | | | - Constify structure members that should not be changed during process. - Apply static where needed - signed/unsigned madness - Bump WARNS?= levels from 2 to 6 (this is a diff reduction for a subsequent commit against these Makefile's) Notes: svn path=/head/; revision=140907
* Add "-q" argument to setfmac and setfsmac to allow the patient butRobert Watson2004-02-181-7/+17
| | | | | | | exhausted reader not to see non-fatal warnings. Notes: svn path=/head/; revision=125959
* Account for fts(3)'s FTS_SLNONE case for symbolic links which haveBrian Feldman2002-12-121-0/+1
| | | | | | | | | | | a nonexistant target, in addition to the FTS_SL previously, so e.g. setfmac -h sebsd/system_u:object_r:malloc_conf_t /etc/malloc.conf succeeds. Approved by: re Notes: svn path=/head/; revision=107794
* Mdoc markup and language fixes.Robert Watson2002-12-031-2/+2
| | | | | | | | | | Submitted by: ru Approved by: re (jhb) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=107550
* Cast argument to (long), missed in prior pass.Robert Watson2002-12-021-1/+1
| | | | | | | | Approved by: re Submitted by: marcel Notes: svn path=/head/; revision=107514
* Fix 32-bit/64-bit bug in format string.Robert Watson2002-12-021-1/+1
| | | | | | | | | Approved by: re Submitted by: marcel Pointy hat to: green Notes: svn path=/head/; revision=107513
* Add support for -R for file relabel operations.Robert Watson2002-12-021-39/+431
| | | | | | | | | | | | | | | Add 'setfsmac' link, which permits labels to be provided in a label specification file, making it easier to provide initial file system labeling specifications. This is used by the new mac_lomac to provide initial system labeling and policy, and by sebsd, the port of SELinux FLASK/TE to FreeBSD. Approved by: re (jhb) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=107489
* Introduce simple command line tools to manage MAC labels on processes andRobert Watson2002-10-231-0/+103
files. Basically wrappers for mac_{get,set}_{file,link,pid,proc}(3). Man pages to be updated shortly. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=105756