[action] [PR:13647] [systemd-sonic-generator] Fix overlapping strings being passed to strcpy/strcat#13891
Merged
mssonicbld merged 1 commit intosonic-net:202211from Feb 20, 2023
Conversation
…cpy/strcat (sonic-net#13647) #### Why I did it Fix an issue that services do not start automatically on first boot and start only after hostcfgd enables them. This is due to a bug in systemd-sonic-generator: ``` admin@arc-switch1004:~$ /usr/lib/systemd/system-generators/systemd-sonic-generator dir Failed to open file /usr/lib/systemd/system/database.servcee Error parsing targets for database.servcee Error parsing database.servcee Failed to open file /usr/lib/systemd/system/bgp.servcee Error parsing targets for bgp.servcee Error parsing bgp.servcee Failed to open file /usr/lib/systemd/system/lldp.servcee Error parsing targets for lldp.servcee Error parsing lldp.servcee Failed to open file /usr/lib/systemd/system/swss.servcee Error parsing targets for swss.servcee Error parsing swss.servcee Failed to open file /usr/lib/systemd/system/teamd.servcee Error parsing targets for teamd.servcee Error parsing teamd.servcee Failed to open file /usr/lib/systemd/system/syncd.servcee Error parsing targets for syncd.servcee Error parsing syncd.servcee ``` A wrong file name is generated (e.g database.**servcee**). #### How I did it Fixed overlapping strings being passed to strcpy/strcat that receive restirct* pointers (strings should not overlap). #### How to verify it Perform first boot and observe services start immidiatelly after boot.
8 tasks
Collaborator
Author
|
Original PR: #13647 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.