Skip to content

Lazily load apparmor support #1113

@bertptrs

Description

@bertptrs

Describe the feature you'd like see implemented in sudo-rs

Version 0.2.6 added apparmor support, which links to libapparmor.so. Enabling this feature creates a hard dependency on that library at runtime, even if the apparmor features aren't being used.

It would be nice if sudo-rs were to opportunistically load libapparmor as available, and don't use it otherwise. This can be achieved with dlopen and friends.

What problem can be solved with this feature?

To distribute sudo-rs as part of a linux distro, it is generally desirable to both:

  • have limited dependencies, and
  • be feature complete

Often these are in conflict, but optional dependencies, that are not required for the software to work but do enhance it, is often a solution.

Describe alternatives you've considered

Shipping both sudo-rs and sudo-rs-apparmor, or make apparmor a hard dependency of sudo-rs.

Additional context

I am the package maintainer of sudo-rs for Arch Linux.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions