[apparmor] [patch] utils: handle versioned ruby interpreters
Steve Beattie
steve at nxnw.org
Tue Jan 26 00:17:46 UTC 2016
On Mon, Jan 25, 2016 at 04:14:29PM -0800, Steve Beattie wrote:
> On Debian and Ubuntu it's possible to have multiple ruby interpreters
> installed, and the default to use is handled by the ruby-defaults
> package, which includes a symlink from /usr/bin/ruby to the versioned
> ruby interpreter.
>
> This patch makes aa.py:get_interpreter_and_abstraction() take that into
> account by using a regex to match possible versions of ruby. Testcases
> are included. (I noticed this lack of support because on Ubuntu the ruby
> test was failing because get_interpreter_and_abstraction() would get the
> complete path, which on my 16.04 laptop would get /usr/bin/ruby2.2.)
>
> Signed-off-by: Steve Beattie <steve at nxnw.org>
Oh, nominated for trunk and 2.10. 2.9 needs similar surgery, but the
code had not been abstracted out into get_interpreter_and_abstraction()
there.
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160125/a2e607f6/attachment.pgp>
More information about the AppArmor
mailing list