summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/verify.c
Commit message (Collapse)AuthorAgeFilesLines
* o Add an 'optional' keyword, which allows files to be in themaxim2006-07-031-0/+2
| | | | | | | | | | specification, but not in the file hierarchy. PR: bin/99531 Submitted by: skv Obtained from: NetBSD, originally from Ed Symanzik Regress. test: test/test05.sh MFC after: 1 month
* If we fail in chown(2), try to just change the group and continue on tobrian2005-08-111-10/+28
| | | | | | | | | | | change the permissions. Failures are still recorded. This allows mtree to do a generally better job of things when uid != 0. Sponsored by: ActiveState/Sophos Partially submitted by: neilw at ActiveState dot com Reviewed by: neilw at ActiveState dot com MFC after: 3 weeks
* collect all "extern bla" stuff in extern.h in order to get cross-filephk2004-01-111-5/+0
| | | | type checking. No bugs found.
* Rename spec() and verify() functions to have mtree_ prefix and takephk2003-11-051-2/+2
| | | | explicit file descriptor instead of assuming stdin.
* Remove clause 3 in the copyrights (according to permission in src/COPYRIGHT)phk2003-10-211-6/+2
| | | | Remove trailing whitespace.
* Remove "register" keywords.phk2003-10-211-10/+8
| | | | Use newspeak functions definitions.
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+4
|
* - Align the function prototype of the external `crc' function withrobert2003-03-131-2/+1
| | | | | | | | | | | | | | how `crc' is actually defined. - Remove an unnecessary `extern' variable declaration. Data type corrections: - Define a variable which contains a file byte offset value as type off_t as required by the `crc' function. - Change the type of a variable carrying a CRC checksum from `u_long' to `uint32_t'. - Substitute the wrong `extern' variable declaration of `crc_total' by putting a correct one in the shared header extern.h. `crc_total' is defined as an `uint32_t', thus fixing incorrect mtree checksums on big-endian LP64 machines.
* fixup for WARNS=4.alfred2002-07-111-1/+2
|
* de-__P()alfred2002-07-111-2/+2
|
* Make the output of mtree(8) more systematic and machine readable.phk2000-10-031-2/+2
| | | | | | | | | | | | The new format is: filename {changed,missing,extra} $field expected $foo found $bar ... Fix various bugs along the way: Don't complain about directory sizes differing. Correctly check flags.
* Add -q. this will cause the warning messages about missingimp2000-07-251-3/+11
| | | | | | | | | | | | directories to not be printed. This is from OpenBSD (and I think NetBSD also) and makes our mtree more compatible with other BSDs. This makes cross compilation easier than it was before. Other changes will be needed to allow NetBSD or OpenBSD to cross build on FreeBSD, but this is a start. Reviewed by: andrey Obtained from: OpenBSD Concentric Red Circles by: My own stupidity
* Allow symlinks to be created if they appear in the mtree specification.joe2000-07-131-4/+19
| | | | PR: bin/14171
* Added a flag (-S) to mtree to specify that symlinks shouldn't bejoe2000-07-131-0/+1
| | | | | | followed. This allows type=link matches to work properly and match the link itself, instead of the file/directory that the link is pointing to.
* Give mtree the ability to exclude files and directories from its traversal.wollman2000-05-121-0/+4
| | | | PR: 16944
* Added support for file flags, mostly merged from the NetBSD version.joe1999-12-091-0/+6
| | | | | | | | The way is now open to schg and sappnd key files and directories in our tree. There are recommendations in bin/15229. PR: bin/15229 Reviewed by: imp, brian
* -Wall fixes.billf1999-09-271-2/+2
| | | | Submitted by: nrahlstr
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* There is no need to make nochange imply ignore as well.peter1998-06-101-2/+2
| | | | Suggested by: bde
* Create a new flag, "nochange", which will specify that a directory ispeter1998-06-051-7/+8
| | | | | | | | | | | | to be created if it's missing, otherwise completely ignore it's modes and owners. Primary intended targets: /usr/src and /usr/obj. Adjust the 'not created: File exists' message to mention that it's a directory that's the problem, otherwise it doesn't make sense. I had created chown-style -L and -P flag to control logical/physical mode (ie: whether symlinks were followed), but the nochange flag is enough to get the blasted thing out of my hair so I took them back out.
* Use err(3) instead of local redefinition.charnier1997-10-011-7/+11
|
* Use p->fts_level instead of unsuccessfully trying to keep track of thebde1995-07-241-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | level ourself. We failed for unreadable directories. E.g., `mtree -d -f /etc/mtree/BSD.usr.dist -p /usr' run by `nobody' was confused after it couldn't descend into /usr/games/hide. It looked for /usr/include and subsequent directories in /usr/games. Don't search for `extra' files when the spec depth is less than the fts level. The spec depth isn't incremented for leaf nodes because that would give a NULL level pointer and make it inconvenient to go back to the parent level. Leaf nodes are built for directories that are empty in the spec. Since they are empty in the spec, all files in them are extra. The search looked for files one spec level too high, so for `mtree -d -f /etc/mtree/BSD.usr.dist -p /usr', obj/sbin matched ./sbin and wasn't considered extra, so it was descended into and lots of bogus extra things in it were found. This was harmful for `mtree -U' (as reported in pr623) and worse for `mtree -r'. Use rmdir(), not unlink(), to remove `extra' directories. unlink() succeeds for root but unlinking directories normally damages the file system. Report `fts_errno' instead of `errno' when the former applies.
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* 1. Remove commented out CFLAGS+=-DDEBUG from Makefilergrimes1994-09-181-4/+5
| | | | | | | | | | | | 2. Clean up code so it compiles -Wall (except for sccsid's and copyright). This included fixing several printf formats that where not correct, and changing the data types of a few things. 3. Implement new option -i that produces indented mtree output files. 4. Implement new option -n that turns off directory comments. 5. Only emit /set records if something has changed since the last one.
* BSD 4.4 Lite usr.sbin Sourcesrgrimes1994-05-261-0/+202
OpenPOWER on IntegriCloud