How hardenedbsd/hardenedbsd-stable works
FreeBSD is an operating system source tree, not a single application. A representative user workflow is to enter a command in the shell, have it parsed and evaluated, execute a system utility, and receive output or system changes. The tree also documents and represents ZFS administration through commands and libraries. The supplied tree is broad but the excerpts are partial and do not include the core kernel implementation; the graph therefore shows only supported, representative runtime paths and leaves uncertain wiring out.
Main entry points: exec.c Command execution · eval.c Command evaluation · libzfs_dataset.c ZFS management · main.c Shell entry
Components 20
Command shell
- Shell entry
bin/sh/main.c - Command parser
bin/sh/parser.c - Command evaluation
bin/sh/eval.c - Command execution
bin/sh/exec.c - Redirection
bin/sh/redir.c
System commands
- File commands
bin/cp/cp.c - Directory listing
bin/ls/ls.c - Permission commands
bin/chmod/chmod.c - Archive utility
bin/pax/pax.c - Process reporting
bin/ps/ps.c
ZFS storage
- ZFS commands
cddl/contrib/opensolaris/cmd/zfs/zfs_main.c - Pool commands
cddl/contrib/opensolaris/cmd/zpool/zpool_main.c - ZFS management
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c - ZFS core interface
cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
System services
- ZFS event daemon
cddl/usr.sbin/zfsd/zfsd_main.cc - DTrace command
cddl/contrib/opensolaris/cmd/dtrace/dtrace.c - DTrace library
cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
Other components
- User
- FreeBSD system
- Terminal output
Connections 23
- User → Shell entry: enters commands
- Shell entry → Command parser: reads input
- Command parser → Command evaluation: produces syntax
- Command evaluation → Command execution: dispatches commands
- Command evaluation → Redirection: handles redirection
- Command execution → File commands: executes utility
- Command execution → Directory listing: executes utility
- Command execution → Permission commands: executes utility
- Command execution → Archive utility: executes utility
- Command execution → Process reporting: executes utility
- File commands → FreeBSD system: accesses files
- Directory listing → FreeBSD system: reads directories
- Permission commands → FreeBSD system: changes permissions
- Archive utility → FreeBSD system: reads and writes
- Process reporting → FreeBSD system: queries processes
- ZFS commands → ZFS management: calls management API
- Pool commands → ZFS management: calls management API
- ZFS management → ZFS core interface: uses core interface
- ZFS core interface → FreeBSD system: requests ZFS operations
- DTrace command → DTrace library: uses tracing API
- DTrace library → FreeBSD system: controls tracing
- Command execution → Terminal output: displays results
- FreeBSD system → Terminal output: provides output