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)
Tue, Apr 16, 4:39 AM
Unknown Object (File)
Thu, Apr 4, 12:32 PM
Unknown Object (File)
Apr 2 2024, 8:47 AM
Unknown Object (File)
Mar 31 2024, 4:22 AM
Unknown Object (File)
Mar 31 2024, 12:04 AM
Unknown Object (File)
Mar 30 2024, 11:51 PM
Unknown Object (File)
Mar 30 2024, 12:19 PM
Unknown Object (File)
Mar 30 2024, 11:52 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.