Fix for bug #9128: issue with salt-master ttys with lvdisplay command

lvdisplay checks the file flags of the ttys file descriptors.
Currently all three stds file descriptor are set write only.

This fix :
+ set stdin as read only
+ set stdout, stderr as write only
Updated fix for #9128

Better use 'r+' while opening stdin as recommanded by s0undt3ch
Revert "Updated fix for #9128"

This reverts commit 29f86cbc010600f54e54c10fceb1bb776bf248d5.
Revert "Fix for bug #9128: issue with salt-master ttys with lvdisplay command"

This reverts commit 7ca28147a74d11d03df9e96bc9febe1624c13f2f.
Fix for bug #9128: stdin issue with lvdisplay command

lvm related command breaks while checking the filedescriptor flags.
Setting flags to 'r+' fixes it.

'r+' Open for reading and writing.  The stream is positioned at the
beginning of the file. (cf fopen man page)
Merge pull request #9227 from blackduckx/develop

Fix for bug #9128: issue with salt-master ttys with lvdisplay command