Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[systemd-sonic-generator] Fix overlapping strings being passed to str…
…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.
- Loading branch information