Bug#944973: ocsinventory-agent: Module accesses internal dpkg database

Guillem Jover guillem at debian.org
Sun Nov 17 22:02:14 GMT 2019


Source: ocsinventory-agent
Source-Version: 2:2.4.2-3
Severity: important
User: debian-dpkg at lists.debian.org
Usertags: dpkg-db-access-blocker

Hi!

This package ships a module
(«lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Deb.pm»), which
directly accesses the dpkg internal database, instead of using one of
the public interfaces provided by dpkg.

The function run() in the module, should be switched to use something
like:

  «dpkg-query --showformat '${Package} ${db-fsys:Last-Modified}\n' --show»

to get the mtime from all .list files. Or add this virtual field into
the existing dpkg-query call.


This is a problem for several reasons, because even though the layout and
format of the dpkg database is administrator friendly, and it is expected
that those might need to mess with it, in case of emergency, this
“interface” does not extend to other programs besides the dpkg suite of
tools. The admindir can also be configured differently at dpkg build or
run-time. And finally, the contents and its format, will be changing in
the near future.

Thanks,
Guillem



More information about the pkg-perl-maintainers mailing list