1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-21 07:15:49 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Ganael Laplanche 681fd2bed8 pax: Terminate loop for empty directory names
Pax can sometimes loop forever. For example:

$ mkdir -p /tmp/src/foo/bar
$ rm -rf /tmp/dst ; mkdir -p /tmp/dst
$ cd /tmp/src
$ echo 'foo/bar/' | /bin/pax -r -w -d -pe "/tmp/dst"
<looping infinitely>

Here, pax(1) infinitely deletes and re-creates /tmp/dst/foo/bar/.

The problem is that chk_path() (bin/pax/file_subs.c), called from
node_creat() also creates the leaf directory when a trailing '/' appears
in the directory name to create. When the execution goes back from
chk_path() to node_creat(), the function still cannot create the leaf
directory (it has been created by chk_path()), so it unlinks it and
calls node_creat() again. The function re-creates it, and so on...

In node_creat() detect trailing slashes and not create a leaf directory,
but only intermediate ones.

PR: 277060
Reviewed by: imp
2024-06-21 10:39:09 -06:00
.cirrus-ci
.github
bin pax: Terminate loop for empty directory names 2024-06-21 10:39:09 -06:00
cddl sdt: Implement SDT probes using hot-patching 2024-06-19 16:57:41 -04:00
contrib ee: fix wprintw usage (highlighted by ncurses 6.5) 2024-06-20 15:43:44 +02:00
crypto
etc
gnu
include stdlib: Support compiling with tinyc by omitting compat qsort code 2024-06-21 09:53:07 -06:00
kerberos5
lib math.h: Remove support for old gcc versions 2024-06-20 20:41:09 -06:00
libexec rc.subr: improve description for ${name}_offcmd 2024-06-18 16:13:51 +07:00
release release: Don't publish CW if !WITH_CLOUDWARE 2024-06-20 17:41:14 -07:00
rescue
sbin ifconfig: make interface address without mask an error 2024-06-17 20:21:06 -04:00
secure
share uefi.8: Remove a reference to armv6 2024-06-20 09:26:16 +00:00
stand
sys cdefs.h: Move to more regular _Thread_local define 2024-06-21 09:53:07 -06:00
targets
tests pf tests: test keepcounters when we exceed 32 bits 2024-06-21 13:49:17 +02:00
tools tools/boot/universe.sh: Remove armv6 from a comment 2024-06-20 09:26:20 +00:00
usr.bin systat: fix build with newer ncurses 2024-06-20 15:10:38 +02:00
usr.sbin binmiscctl.8: Change the example to armv7 2024-06-20 09:26:18 +00:00
.arcconfig
.arclint
.cirrus.yml
.clang-format
.git-blame-ignore-revs
.gitattributes
.gitignore
.mailmap
CONTRIBUTING.md
COPYRIGHT
LOCKS
MAINTAINERS
Makefile
Makefile.inc1 Makefile.inc1: Fix typo affecting incremental pkgbase builds. 2024-06-20 12:17:46 -07:00
Makefile.libcompat
Makefile.sys.inc
ObsoleteFiles.inc
README.md
RELNOTES RELNOTES: add entries about byacc and ncurses updates 2024-06-21 09:34:10 +02:00
UPDATING ifconfig: make interface address without mask an error 2024-06-17 20:21:06 -04:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

For official FreeBSD bootable images, see the release page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.