Commit graph

2 commits

Author SHA1 Message Date
Steve Beattie
609a262447 binutils/aa-features-abi: fix a couple of minor issues
A small patch set to fix two issues with binutils/aa-features-abi:

1. The `aa-features-abi -f` short argument was not added to the
   `getopt_long()` set of short arguments, resulting in the command
   incorrectly failing when passed -f

2. Due to variable shadowing the file descriptor for the `--file`
   argument was not being autoclosed.

- binutils/aa-features-abi: make -f short arg actually be accepted
- binutils/aa-features-abi: fix failure to close fd due to shadowed
  var decl

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/804


(cherry picked from commit a24cda5ae1)

8137beb2 binutils/aa-features-abi: make -f short arg actually be accepted
ffc6529b binutils/aa-features-abi: fix failure to close fd due to shadowed var decl
2021-09-27 21:38:08 +00:00
John Johansen
11ef957274 binutils: Add tool to enable extraction of the kernel features abi
Add a basic tool for manipulating the apparmor features abi via
libapparmor. This serves as a basic tool and as an example of using
the library api.

Currently its function is limited to extracting the kernel feature
abi and loading a feature abi from a file and then outputing it.

In the future it will pickup the ability to verify the feature
abi, and merge feature abis.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/613
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
2020-09-27 16:28:27 -07:00