448 Commits
Author SHA1 Message Date
Warner Losh a259b98fa2 tests: skip gracefully when the tested binary's own package isn't installed
pkgbase splits programs and their tests into separate packages (e.g.
unifdef/yacc/indent/file2c -> toolchain, jail -> jail, etc), while their
tests always land in the generic tests package.  Installing just the
tests package therefore leaves these suites unable to find the binary
they exercise, and they fail confusingly instead of skipping.

Rather than force all packages to be installed for the tests package,
make the tests cope with the missing packages.  Add require.progs (or,
for TAP/PLAIN-style suites with no atf_set hook: TEST_METADATA
required_programs) for the binary under test in: bectl, certctl,
ctfconvert, dhclient, file2c, indent, ipfw, jail, lastcomm, mixer,
newsyslog, nvmecontrol, pfctl, praudit, sa, syslogd, tunefs, unifdef,
yacc, ztest.

I skipped adding data for all the binaries in the base runtime
package for simplicity.

Assisted-by:		Claude Code (Sonnet 5)
Sponsored by:		Netflix
Reviewed by:		ngie
Differential Revision:	https://reviews.freebsd.org/D58262
2026-09-10 23:42:25 -06:00
Mark Johnston 231dfc99a0 syslogd/tests: Amend a test to catch leaked process descriptors
This serves to catch the regression fixed by commit
1a669b66dd ("syslogd: reap pipe children on config reload").

MFC after:	1 week
2026-09-02 19:33:56 +00:00
Mark Johnston 87cfe4a620 syslogd: Pipes need the CAP_PDGETPID right as well
While here, use caph_rights_limit(), as syslogd already uses
caph_enter().

PR:		298104
Reported by:	mi
Fixes:		24816abb87 ("syslogd: Limit rights on procdescs")
MFC after:	3 days
2026-09-02 19:33:56 +00:00
Baptiste Daroussin 1a669b66dd syslogd: reap pipe children on config reload
On SIGHUP reload, closelogfiles() frees each F_PIPE filed even when its
pipe process is still running.  close_filed() sets f_type to F_UNUSED
before the check, so the condition f_type != F_PIPE is always true and
the filed is freed while its process descriptor is still on the dead
queue and registered in the kqueue.  When the child later exits, the
NOTE_EXIT handler dereferences the freed filed (use-after-free) and
never closes the process descriptor, leaving the pipe child as a
persistent zombie.

Capture whether the filed is a pipe with an active process descriptor
before calling close_filed(), and defer the free in that case so the
NOTE_EXIT handler can reap the child and free the filed.

Reviewed by:	markj
Fixes:	95381c0139 (syslogd: Use process descriptors)
Differential Revision:	https://reviews.freebsd.org/D59319
2026-09-02 17:00:58 +02:00
Mark Johnston 24816abb87 syslogd: Limit rights on procdescs
Reviewed by:	jfree, kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D58160
2026-07-10 21:21:59 +00:00
Mark Johnston 8a62a5f77b syslogd: Handle connection errors when setting up forwarding sockets
Since syslogd was converted to run in a Capsicum sandbox, it needs to
explicitly connect() its forwarding sockets rather than using sendmsg().
At the time syslogd starts during boot, some of its forwarding
destinations may not be routable, in which case connect() fails.

Fix this by making connect() failures non-fatal, and use cap_net to
lazily connect sockets once something actually tries logging to the
destination.

Add a regression test.

Reported by:	ae
Reviewed by:	ae
Discussed with:	jfree
Fixes:		4ecbee2760 ("syslogd: Open forwarding socket descriptors")
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57394
2026-06-30 20:15:17 +00:00
Dag-Erling Smørgrav 05e8f2bf09 ttymsg: Overhaul
* Instead of an error string, return the usual 0 or -1 and let the caller
  figure out what, if anything, to tell the user.

* Avoid string manipulations by opening /dev first and using openat()
  with O_RESOLVE_BENEATH.

* Add a boolean argument which, if false, causes ttymsg() to return
  without sending the message if the tty's group-writable bit is not
  set.  This saves programs that respect this setting (like syslogd(8))
  from having to check before calling ttymsg().

* Update all callers.

The observable effect of this change is minimal except for slightly
different error messages when ttymsg() fails.  However, syslogd(8) will
no longer print spurious error messages on the console after trying and
failing to write a log message to an X11 session.

PR:		295171
MFC after:	1 week
Reviewed by:	jfree, markj
Differential Revision:	https://reviews.freebsd.org/D57018
2026-05-25 18:52:15 +02:00
Pat Maddox c783d7181d syslogd: fix memory leak in casper_ttymsg()
nvlist_take_string_array(9) takes ownership of the array and its
strings. casper_ttymsg() freed neither, leaking memory on every
F_CONSOLE and F_TTY message. On long-running systems with high
error-rate syslog traffic routed to /dev/console, syslogd.casper grew
to hundreds of MB.

Use nvlist_get_string_array(9) to borrow the array instead. Update
casper_wallmsg() similarly.

Approved by:    src (des)
Closes:         https://github.com/freebsd/freebsd-src/pull/2222
Fixes:          61a29eca55 ("syslogd: Log messages using libcasper")
MFC after:      3 days
MFC to:         stable/15
PR:             295488
Reported by:    Pat Maddox <[email protected]>
Reviewed by:    markj
Tested by:      dch
2026-05-22 21:45:30 +00:00
tzyt 6904270660 syslogd: Fix ereregex property filters and add test
This change fixes Bug 293879, where ereregex filters in syslogd
did not handle alternation correctly.

The issue appears to come from mixing up two different kinds of
flags: syslogd's internal serialized filter flags in
usr.sbin/syslogd/syslogd.h, and the regex compilation flags from
include/regex.h. ereregex was storing REG_EXTENDED in cmp_flags,
even though cmp_flags is meant to carry syslogd's own FILT_FLAG_*
values for configuration serialization and reconstruction.

REG_EXTENDED has the same bit value as FILT_FLAG_EXCLUDE, so the
filter could be reconstructed with the wrong semantics.

The fix stores FILT_FLAG_EXTENDED instead, allowing syslogd to
correctly REG_EXTENDED when compiling the regex.

A test was also added for both ereregex and !ereregex filters.

PR: 293879
Signed-off-by: tzyt <[email protected]>
Fixes: 2567168dc4
MFC after: 1 week
Reviewed-by: markj, ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2088
2026-03-28 20:43:42 -07:00
Alexander Ziaee 04d58d529a manuals: System message vs kernel message
Wordsmith mentions throughout the manual of syslog and dmesg, to clearly
differentiate them in an externally consisteny way, increasing operator
onboarding speed and elegance.

The daemon that handles general system messages, syslog, describes them
as "system messages", and "messages" is the standard filename. Rewrite
syslog related manual titles to align search results with this, and hier
entries to align the index. Use care to maintain keywords and not add
extra lines. Newsyslog trades "maintain" with "rotate" for visibility.

MFC after:	3 days
Reviewed by:	markj
Closes:		https://github.com/freebsd/freebsd-src/pull/2067
2026-03-26 09:19:01 -04:00
Dag-Erling Smørgrav 828de702ad syslogd: Allow killing when in foreground
Normally, syslogd reacts only to SIGTERM, and ignores SIGINT and SIGQUIT
unless in debug mode.  Extend that to also apply when running in the
foreground.  Take this opportunity to comment the event loop.

MFC after:	1 week
Reviewed by:	jfree
Differential Revision:	https://reviews.freebsd.org/D55886
2026-03-24 11:58:53 +01:00
Siva Mahadevan c721ceeb3e syslogd/tests: use kern.features to detect INET support
This fixes INET feature detection with kernel configs
that do not include the kern.conftxt sysctl, such as
riscv64 currently[0].

[0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/usr.sbin.syslogd/syslogd_forwarded_format_test/O_flag_bsd_forwarded_legacy/

Reviewed by:	markj
Approved by:	emaste (mentor)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D55383
2026-02-19 15:53:26 -05:00
Mark Johnston 29ec3907f1 syslogd: Improve handling of configuration errors
Make parse_selector() print a warning to stderr and continue parsing the
config if it encounters an invalid facility or priority.  Note that
because the parsing is done from a casper service, there isn't a good
mechanism to log errors; the warnings are visible only when syslogd is
started in debug mode.

Reported by:	Doug Hardie <[email protected]>
MFC after:	1 week
Fixes:		f4b4a10abb ("syslogd: Move selector parsing into its own function")
Reviewed by:	jfree, jlduran, eugen, delphij
Differential Revision:	https://reviews.freebsd.org/D55033
2026-02-16 20:16:12 +00:00
Mark Johnston 14dce731d7 syslogd/tests: Fix flakiness in forwarding tests
syslogd_start() waits for the local log socket to appear before
returning, to ensure that the daemon is ready to handle log messages.
Some tests start two daemons, so by default the socket already exists
when the second daemon is started, so syslogd_start() returns early.
The test subsequently sends a message to this second daemon, which
sometimes isn't ready.

Define a separate log socket for the second daemon.  Add a check to
syslogd_start() to help catch this type of bug.

Reviewed by:	jlduran
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D54800
2026-01-22 15:52:00 +00:00
Mark Johnston 92d251472e syslogd/tests: Improve loopback interface initialization
- In syslogd_start(), assign the lo0 address in the specified jail.
- Use the correct netmask.

Reviewed by:	jlduran
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D54799
2026-01-22 15:51:42 +00:00
Mark Johnston 560c22937b syslogd/tests: Address races
I occasionally see failures in the syslogd test suite.  The problem is
that the tests are racy: they send a message using logger(1), then
immediately check whether the message was logged to a log file.  If the
syslogd instance under test doesn't get a chance to run before the
second step, the test fails.

This change reworks things to avoid the race while minimizing the amount
of time sleeping.
1) Each test uses a single logfile, so have them use a new common
   variable, SYSLOGD_LOGFILE, instead of something test-specific.
2) In syslogd_start(), if the configuration references SYSLOGD_LOGFILE,
   wait for it to be created by syslogd before returning.
3) Add a helper syslogd_check_log(), to check for a given log entry in
   the last line of SYSLOGD_LOGFILE, instead of using atf_check
   directly.
4) In syslogd_check_log(), poll the logfile until the desired log entry
   appears, or the test times out.

With this change, I was able to run the tests 1000 times in a loop with
4-way parallelism without seeing any test failures.  Without the change
I usually get a failure within 10 loops.

Reviewed by:	jlduran
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D54779
2026-01-22 15:50:25 +00:00
Mark Johnston ffdbc1bc21 syslogd/tests: Use a helper function to log from within a jail
This is just for consistency with all other logger(1) invocations, which
happen from the syslogd_log() function.

No functional change intended.

Reviewed by:	jlduran
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D54778
2026-01-22 15:50:14 +00:00
Jake Freeland 60ae4e52f3 syslogd: Terminate pipe processes gracefully
Pipe actions spawn a process based on the command provided in the
syslogd configuration file. When a HUP signal is received, enter
the process into the deadq instead of immediately killing it.
This matches the behavior of syslogd prior to it being Capsicumized.

Fixes: d2d180fb77
2026-01-12 12:40:23 +09:00
Lexi Winter 614c8750ce Remove ftpd(8)
This was previously deprecated and is slated for removal in 15.0.
Users who still need ftpd(8) can install the ftp/freebsd-ftpd port.

Retain the ftp(d) PAM services since other FTP daemons use them.

Update /etc/inetd.conf to point to /usr/local.

Add ftpd to ObsoleteFiles, but do not list configuration files since
users may want to preserve these to use with the freebsd-ftpd port.

There is still some language in the manual referring to ftpd(8)
which is relevant to the port, which has been retained but updated
to reference the port.

MFC after:	3 days
Relnotes:	yes
Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D52739
2025-09-29 22:53:34 +01:00
Bryan Drewery cddb9806b5 syslogd: Make some code more clear.
This moves some math to where it logically makes more sense for skipping
over the ": " separator in the message formatted "app[PID]: MSG".

No functional change.

Fixes:		18bcf5a0 ("Restore local kernel "prog" filtering")
Sponsored by:	Dell Inc.
2025-09-17 14:28:18 -07:00
Kristof Provost 47785e6a39 syslogd: EAGAIN and ECONNREFUSED are not permanently fatal
When we're forwarding syslog messages to a remote host we can get temporary
failures such as EAGAIN or ECONNREFUSED from the sendmsg() call. These are not
fatal. Future attempts to send might succeed. Don't mark the remote target as
F_UNUSED so we'll try to log again on future messages.

While here remove the commented out ENOBUFS case, because we actually handle
that (by ignoring it, so we retry with future logs).

Reviewed by:	markj, jfree
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D51995
2025-08-18 17:10:01 +02:00
Lexi Winter c75550e499 syslogd.8: Remove incorrect .Aq
Using .Aq is wrong here, because the protocol says the prefix must use
ASCII <>.

MFC after:	3 days
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D51880
2025-08-15 03:24:23 +01:00
Nathan Huff 3b3a289758 syslogd: Fix function return test
Looks like during the capsicum setup the return value for cap_syslogd
is checked twice rather than checking the return value of cap_net
after initializing the casper service.

Signed-off-by: Nathan Huff <[email protected]>
Fixes: 897240c7d6 ("syslogd: Enter capability mode")
Pull-request: https://github.com/freebsd/freebsd-src/pull/1796
2025-07-30 18:32:05 -04:00
Jose Luis Duran 8d9c25c4e1 syslogd: Fix tests when if_epair is not loaded
Take a cue from vnet.subr and abstract module loading, jail creation and
cleanup.

Note that the way jails are created differs slightly from vnet.subr, to
maintain the current style of the tests.

Reported by:	Jenkins
Reviewed by:	markj
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48949
2025-02-12 14:42:09 +00:00
Mark Johnston ae4f708f0b syslogd: Ensure that forwarded messages are sent from port 514
Prior to commit 4ecbee2760, syslogd used its listening socket(s) to
forward messages to remote hosts, when so configured.  As a consequence,
they are sent from the address+port to which those sockets are bound,
typically 0.0.0.0:514.

When in capability mode, sendto() is not permitted, so we instead
pre-create sockets and connect them to the forwarding addresses, letting
the kernel pick an ephemeral source port.  However, this doesn't match
syslogd's previous behaviour, breaking some setups.

So, restore the old behaviour by binding forwarding sockets to the
addresses on which syslogd is listening.  Since we cannot use the same
sockets for receiving messages and also for forwarding them, use
SO_REUSEPORT to enable duplicate bindings to port 514, relying on the
existing behaviour that the first socket bound to that port is the one
that actually receives messages.

Add some regression tests to cover this and related functionality of
syslogd's -a option.

Reviewed by:	jfree
Reported by:	Michael Butler <[email protected]>
Fixes:		4ecbee2760 ("syslogd: Open forwarding socket descriptors")
Differential Revision:	https://reviews.freebsd.org/D48222
2025-01-14 14:19:56 +00:00
Mark Johnston 526bd072b3 syslogd: Fix resource leaks
- nvlist_append_nvlist_array() makes a copy of the input nvlist, so the
  pattern of nvlist_append_nvlist_array(... cfline(...)) would leak
  memory and descriptors.  Pass the entire config nvlist to cfline()
  instead since this is needed for a future change.
- In parse_action(), free the linked list returned by getaddrinfo().
- Remove some checks at the beginning of close_filed().  For some log
  types we'll always have f->f_file == -1, in which case we wouldn't
  release other resources, such as forwarding sockets.
- After converting a filed to an nvlist, free the filed resources.

Fixes:	2567168dc4 ("syslogd: Refresh configuration using libcasper")
Reviewed by:	jfree
Differential Revision:	https://reviews.freebsd.org/D48250
2025-01-03 01:51:19 +00:00
Mark Johnston 1da99b479a syslogd tests: Permit starting syslogd with multiple -b options 2025-01-03 01:50:59 +00:00
Mark Johnston 3fb2371efd syslogd tests: Use atf_check when sending SIGHUP to syslogd 2025-01-03 01:50:39 +00:00
Michal Scigocki 8cc248fb92 syslogd: Add rfc3164-strict format option
The syslogd bsd/rfc3164 message format does not strictly conform to the
format recommended in RFC 3164 when syslog messages are forwarded from
remote hosts.

The new rfc3164-strict format generates messages that conform with the
RFC 3164 recommended format. The existing format is maintained for
backwards compatibility.

PR:		220246
Reviewed by:	markj
MFC after:	3 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1536
2024-12-23 15:46:14 +00:00
Michal Scigocki 65c61840ee syslogd: Add syslog relayed message format tests
Reviewed by:	markj
MFC after:	3 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1536
2024-12-23 15:45:59 +00:00
Michal Scigocki ee75c991ac syslogd: Add syslog forwarded message format tests
Reviewed by:	markj
MFC after:	3 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1536
2024-12-23 15:45:45 +00:00
Michal Scigocki 66a022a30d syslogd: Add syslog basic message format tests
RFC 3164 and RFC 5424 syslog message format tests and minor refactor of
existing tests to reuse components in new tests.

Reviewed by:	markj
MFC after:	3 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1536
2024-12-23 15:45:12 +00:00
Michal Scigocki aa94868f5e syslogd: Remove is_exclusive metadata from tests
- Tests have been updated to use "jail" execution environment,
  is_exclusive="true" is no longer required.
- tests/Makefile update to style.Makefile(5).

Reviewed by:	markj
MFC after:	3 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1536
2024-12-23 15:44:17 +00:00
Mark Johnston fe29114148 syslogd: Fix issues reported by gcc
- When forwaring a message, don't assume that f->f_num_addr_fds > 0.
- Avoid calling free() on a stack-allocated object.

Fixes:	4ecbee2760 ("syslogd: Open forwarding socket descriptors")
Fixes:	f4b4a10abb ("syslogd: Move selector parsing into its own function")

Reviewed by:	jfree
Differential Revision:	https://reviews.freebsd.org/D47844
2024-11-30 18:52:34 +00:00
Jake Freeland b872bb7206 syslogd: Split up basic test case
The basic case previously tested if messages are correctly logged over
UNIX, INET, and INET6 transport. This single case can be split up into
three separate cases to decrease code complexity and offer more granular
results.

Both INET and INET6 cases will be skipped if the kernel does not
support the corresponding transport.

Reviewed by:	zlei, markj
Differential Revision:	https://reviews.freebsd.org/D47650
2024-11-27 16:26:16 -06:00
Jake Freeland 8b63477e5e syslogd: Add host forwarding test
Test communication between hosts by setting up two syslogd instances,
each binded to their own addresses, and sending a message from one to
the other. The tests passes if the message was delivered and logged
successfully.

This required some tweaking to the syslogd start and stop routines so
they could handle launching multiple syslogd instances with different
runtime files.

Run the tests in jails with an isolated VNET so they don't fail due to
an address bind collision in the host's VNET.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D47649
2024-11-27 16:26:10 -06:00
Jake Freeland 4ecbee2760 syslogd: Open forwarding socket descriptors
Previously, when forwarding a message to a remote address, the target's
addrinfo was saved at config-parse-time. When message-deliver-time came,
the message's addrinfo was passed into sendmsg(2) and delivered by the
first available inet socket.

Passing an addrinfo into sendmsg(2) is prohibited in Capsicum capability
mode, so sockets are now opened and connected to their remote peers at
config-parse-time when executing outside of the capability sandbox.

These connected socket descriptors are saved and passed into sendmsg(2),
allowing forwarding to be performed inside of the capability sandbox.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D47104
2024-11-27 16:26:04 -06:00
Jake Freeland d2d180fb77 syslogd: Watch for dead pipe processes
For each new pipe process, add its process descriptor into the kqueue
with the EVFILT_PROCDESC filter and NOTE_EXIT event. When the pipe
process exits, the main kqueue loop will catch this, logging exit errors
and cleaning up the pipe process' filed node.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41477
2024-11-27 16:26:02 -06:00
Jake Freeland 897240c7d6 syslogd: Enter capability mode
Create syslogd_cap_enter() function, which puts syslogd in capability
mode and opens necessary libcasper channels for resource acquisition.
The `syslogd.casper` and `system.net` services are used.

Substitute capability-mode-unfriendly functions with their libcasper
`cap_` equivalents.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41467
2024-11-27 16:25:57 -06:00
Jake Freeland 24f4019b6a syslogd: Block timezone updating in capability mode
Do not update local timezone data upon reload when syslogd is compiled
with libcasper support. Timezone files are pre-fetched using the
caph_cache_tzdata() function before entering capability mode. Attempts
to re-fetch these files will result in a capability violation.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41466
2024-11-27 16:25:55 -06:00
Jake Freeland 61a29eca55 syslogd: Log messages using libcasper
Some logging operations require access to external resources to
complete. Logging to F_WALL requires on-demand access to the user
accounting database. Logging to F_CONSOLE requires access to the
console. Logging to F_PIPE prompts execution of a command outside
of capability mode.

These operations cannot be performed in capability mode, so the
"p_open", "ttymsg", and "wallmsg" commands may be sent to libcasper to
circumvent these limitations.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41465
2024-11-27 16:25:17 -06:00
Jake Freeland 2567168dc4 syslogd: Refresh configuration using libcasper
When a SIGHUP signal is sent to syslogd, the configuration is reparsed,
leading to new resource acquisition.

If syslogd is running in capability mode and a SIGHUP is received, new
resources cannot be acquired. To mitigate this issue, libcasper is used
to parse the configuration.

The libcasper process runs outside of capability mode and is capable of
parsing syslogd's configuration and obtaining new resources. These
resources are then sent to the syslogd process via nvlist.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41464
2024-11-27 16:25:12 -06:00
Jake Freeland ad607893c9 syslogd: Use anonymous union in struct filed
Do not use macros to access unioned struct members. Use an anonymous
union and access union member names directly.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41703
2024-11-27 16:25:08 -06:00
Jake Freeland 964687879a syslogd: Create syslogd libcasper service
Once in capability mode, resource acquisition is not possible. To
mitigate this, introduce a libcasper service that is responsible for
fetching and returning new, requested resources to syslogd.

Some resources must be packed into an nvlist to be properly transferred
between syslogd and the libcasper process. The filed_to_nvlist() and
nvlist_to_filed() functions are included to ease the packing process for
filed structures.

Two additional syslogd.h and syslogd_cap.h header files are included
with shared declarations.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41463
2024-11-27 16:25:03 -06:00
Mark Johnston 88dd055092 syslogd: Fix handling of unix socket modes
When bind() is called, the process umask is applied, so one has to
either clear the umask before binding or call chmod() to add permissions
after the fact.  Do the former here to ensure that the socket always has
the correct mode.

Reported by:	Lexi Winter <[email protected]>
Fixes:		2b8c3a05e0 ("syslogd: Set unix socket modes atomically")
2024-11-05 18:24:03 +00:00
Mark Johnston 2b8c3a05e0 syslogd: Set unix socket modes atomically
Take advantage of the ability to atomically set unix socket modes to
ensure that /var/run/logpriv always has mode 0600.

MFC after:	1 month
2024-11-03 16:46:53 +00:00
Mark Johnston 5d045d556b syslogd: Ignore getaddrinfo() errors if -ss is specified
This can arise if the jail doesn't have networking configured, and if
-ss is specified, syslogd won't listen on port 514 anyway.

Add a regression test case for this as well.

PR:		238006
MFC after:	1 month
2024-09-19 10:01:37 +00:00
Warner Losh e9ac41698b Remove residual blank line at start of Makefile
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
2024-07-15 16:43:39 -06:00
Lexi Winter dbd0366f34 package: move lpr into its own package
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1171
2024-04-19 16:54:31 -06:00
Warner Losh 0b8224d1cc Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by:		Netflix
2023-11-26 22:23:58 -07:00