UidGidResolver
UidGidResolver
The UidGidResolver
resolves user ids and group ids to their corresponding names.
This is done by reading /etc/passwd
and /etc/group
on the host.
Therefore any UID
inside a container might not properly match the username inside the container.
Since the path is hardcoded usernames provided through ldap
, nss-systemd
, systemd units with DynamicUser=yes
, … will not be resolved correctly.
Usage
Classic gadgets
- Implement the UidResolverInterface for the
event struct
to resolve a UID. TheUID
which is returned byGetUid()
will be resolved to the corresponding username and is passed intoSetUserName(...)
type UidResolverInterface interface { GetUid() uint32 SetUserName(string) }
- Implement the GidResolverInterface for the
event struct
to a resolve GID. TheGID
which is returned byGetGid()
will be resolved to the corresponding groupname and is passed intoSetGroupName(...)
type GidResolverInterface interface { GetGid() uint32 SetGroupName(string) }
Image based gadgets
TODO