Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 535980 - sys-apps/portage: CONTENTS: add owner, group, permission
Summary: sys-apps/portage: CONTENTS: add owner, group, permission
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 193766
  Show dependency tree
 
Reported: 2015-01-08 00:54 UTC by Fpemud
Modified: 2017-01-08 17:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fpemud 2015-01-08 00:54:42 UTC
/var/db/pkg/<category>/<package>/CONTENTS contains 3 object types: dir, obj, sym.
For type "dir", it has only a "path" property.
For type "obj", which represents a file, it has property "path", "md5 checksum" and "mtime"
For type "sym", it has property "path" and "mtime".

My request is to add new properties for these object types:
1. "dir": add owner, group, permission
2. "obj": add owner, group, permission
3. "sym": add owner, group

Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2015-01-08 01:03:40 UTC
What's the use for this? Note that if you use emerge --buildpkg, those file attributes are available in the tbz2 files.
Comment 2 Fpemud 2015-01-08 01:09:41 UTC
I have a post on gentoo forum about this thought before:
https://forums.gentoo.org/viewtopic-t-946868-highlight-fpemud.html

I think with these additional properties, CONTENTS file can be a more accurate representation of the package status.

I'm willing to contribute.


CORRECTION:
For type "sym", it has property "path" and "mtime".
=>
For type "sym", it has property "path", "target" and "mtime".
Comment 3 Fpemud 2015-01-08 01:14:17 UTC
(In reply to Zac Medico from comment #1)
> What's the use for this? Note that if you use emerge --buildpkg, those file
> attributes are available in the tbz2 files.

For me, I want to use these information to check if any of the installed files are modified by mistake, either content, permission or owner/group.

It is not enough for intrusion detection, but is enough for misoperation detection.

tbz2 files are big.
Comment 4 Sam 2017-01-08 17:21:29 UTC
I'd like to express interest in this as well.

Checking integrity of configuration files is (sorta kinda) covered with the md5sums. Checking confidentiality of configuration files is currently hard to do correctly, as there is no way to determine the baseline of what it should be.

To me, using buildpkgs doesn't sound very elegant. The point of the CONTENTS file is that you don't have to reconstruct everything, but rather portage exports once allowing for easy access later.