Page MenuHomeFreeBSD

rc: Disable pathname expansion when calling run_rc_command()
Needs ReviewPublic

Authored by hrs on Jul 3 2024, 9:09 AM.
Tags
Referenced Files
Unknown Object (File)
Thu, Feb 27, 9:40 AM
Unknown Object (File)
Mon, Feb 24, 1:52 AM
Unknown Object (File)
Sun, Feb 23, 11:40 PM
Unknown Object (File)
Sun, Feb 23, 8:30 AM
Unknown Object (File)
Sat, Feb 22, 1:04 AM
Unknown Object (File)
Thu, Feb 6, 4:13 PM
Unknown Object (File)
Jan 29 2025, 2:13 PM
Unknown Object (File)
Jan 28 2025, 2:32 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Variables for command-line options like $foo_flags can contain characters
that perform pathname expansions, such as '[', ']', and '*'. They were
passed without escaping, and the matched entries in the working directory
affected the command-line options. This change turns off the expansion
when run_rc_command() is called.

While this changes the current behavior, an invocation of a service
program should not depend on entries in the working directory.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58472
Build 55360: arc lint + arc unit