mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
LibC: The pwd and grp related functions need to preserve empty fieldso
Now that String::split() defaults to keep_empty=false, we need to make sure the pwd and grp functions in LibC keep the empty ones. This fixes "id" moaning about invalid lines in /etc/group.
This commit is contained in:
parent
95504b5850
commit
4aa1b5b40e
2 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ next_entry:
|
|||
if (feof(__pwdb_stream))
|
||||
return nullptr;
|
||||
String line(s, Chomp);
|
||||
auto parts = line.split(':');
|
||||
auto parts = line.split(':', true);
|
||||
if (parts.size() != 7) {
|
||||
fprintf(stderr, "getpwent(): Malformed entry on line %u\n", __pwdb_line_number);
|
||||
goto next_entry;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue