saltstack/salt — pull request #9846 by bdenning (2014-01-20 03:54:56+00:00)
Title: Modify file.get_selinux_context to use the python selinux module rather than calling cmd.run

Hi,

This change aims to address the immediate problem documented in: https://github.com/saltstack/salt/issues/9845
More work should probably be done to see if the other selinux related functions in the file module can also use the selinux python module rather than calling commands with cmd.run.

Please have a good look over these changes before accepting (I'm sure you will anyway) as I'm a sysadmin by trade, not a dev. This is also my first pull request (to a rather important module). I think it's fairly safe but would prefer for someone more knowledgeable to go over it thoroughly.

-
Bowen