Invalid or reserved field name in linux service
nico-jp opened this issue · 2 comments
When I run the 'services()' function on an opened Target image, I get thrown out of the generator eventually after running into the 'Unit_X-Snappy' service. The error itself is as follows: "Field 'Unit_X-Snappy' is an invalid or reserved field name".
When looking at the Dissect code I see the error is thrown at the creation of a 'TargetRecordDescriptor' of the 'ServicesPlugin' function, which is located in the following file: dissect\target\plugins\os\unix\linux\services.py.
In the mean time I can kind of fix it by putting a try-except block around de record creation, but I still miss any services after 'Unit_X-Snappy'. Anybody that can help me with this issue?
Some values are not allowed in a fieldname, such as a hyphen. This issue seems to have been fixed in this commit though: fox-it/dissect.target@ed13639
However, this fix has not yet landed in a tagged release, so you will need to install from prerelease packages to get this fix. Try this command to update to latest development release of dissect:
$ pip3 install --upgrade --pre dissect
Thank you for the quick update. The error is indeed gone.