Page MenuHomeFreeBSD

Fix using more than one files in UID_FILES and GID_FILES.
ClosedPublic

Authored by mat on Jul 17 2017, 10:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 14, 5:52 AM
Unknown Object (File)
Fri, Aug 1, 5:14 AM
Unknown Object (File)
Jul 1 2025, 10:44 PM
Unknown Object (File)
Jun 29 2025, 1:01 AM
Unknown Object (File)
Jun 28 2025, 12:06 AM
Unknown Object (File)
Jun 26 2025, 11:56 AM
Unknown Object (File)
Jun 23 2025, 4:13 AM
Unknown Object (File)
Jun 22 2025, 3:37 PM
Subscribers
None

Details

Summary

Repeat after me: If you change IFS, it will break something unexpected.

The problem is that we use IFS to change read's field separator. This
has the side effect of changing how sh(1) splits all string, including
in command parsing functions.

In this case, if you change IFS, the commands are splitted using IFS's
new value, and no longer whitespace. For example:

$ GID_FILES="foo bar"
$ set -x
$ echo $GID_FILES
+ echo foo bar
foo bar
$ IFS=:
+ IFS=:
$ echo $GID_FILES
+ echo 'foo bar'
foo bar

In the first case, it runs echo with two arguments, first is foo, second is bar.
In the second case, it runs echo with one argument, 'foo bar'.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 10545
Build 10952: arc lint + arc unit

Event Timeline

mail/postfix, for example, still generates the same scripts.

This revision was automatically updated to reflect the committed changes.