commit | c23b3ff44948416d67ff30f38116bed3b2efb6e5 | [log] [tgz] |
---|---|---|
author | Eli Lipsitz <elipsitz@google.com> | Fri Jan 20 19:51:11 2023 +0000 |
committer | Rob Landley <rob@landley.net> | Fri Jan 20 22:22:45 2023 -0600 |
tree | 8e339fd399aa20d0619a156836990a9fe7ca8b3e | |
parent | c3127b5f9f3099ea526fe6da571ddf77bd72871d [diff] |
init: Remove trailing newline when parsing inittab Commit 05e4f52c3c modified init to use the standard getline instead of get_line when parsing the inittab. However, these functions have different behavior that wasn't properly accounted for: get_line strips the trailing newline, and getline keeps it (if it exists, i.e. not EOF). This led to a bug where every command in the inittab is parsed as ending with "\n". This commit corrects init to remove the newline, fixing this issue.