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)
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
Unknown Object (File)
Jun 20 2025, 2:47 AM
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

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

This revision was automatically updated to reflect the committed changes.