Export pins mode

瀏覽次數:12 次
跳到第一則未讀訊息

Tom Enos

未讀,
2015年6月27日 凌晨3:44:052015/6/27
收件者:lightsh...@googlegroups.com
So everyone, I'm done a basic clean up of the code and for readability and sphinx complaint docstrings.
And well I just got to hardware_controller.py and I have found a few over-sites. 

Export pins mode works, but only in limited situation.
First:
If you have already run lightshowpi with sudo, then you have generated log files,  these must be deleted or        you will receive an IOError.
 Notation should be made that you should delete all of your old logs.

Second:
This will also break SMS support. SMS was setup to be run under root.  I have not checked if it can be run as a non-root user (it should work either way).  If it can be then maybe we should change the default behavior of check_sms.py to run as a not-root user all the time.  The only problem there to overcome is making the state file available to non-root users.  But that could happen with a simple "touch" and "chown" during the install and then some checks for ownership at run time.  From a security stand point that would be "linux way" todo it.  It also requires changing the auth files from root to user (but that is also simple, run the setup as a user and do it in the user home directory instead of root).

Third:
The start and stop scripts would need some tweaking.  Right now everything works because they start everything as root anyway and the whole exporting of the pins happens as root making the option not really do what is meant to do.  

Fourth:
Should we keep it?  As it is it is really just a broken option.  But I think we should keep it, It has value.  A lot of shows will not use more then 16 channels, a lot of shows will not use softPwm.  This option is targeted at these shows and allows for linux to retain one of it't biggest security features.  I didn't like it at first (I have to stop looking at the code it self sometimes and look at the idea), but I took another look at the idea, cleaned up the code a little and now think it is something that we should keep.

It will be a good little bit of work to get it working properly, but I think it would be worth it.  Should we continue with it working as only a partial working option (and just document is as so), should we get it fully working with lightshowPI, or just drop it as more effort then reward?  I leave it up to the majority.  It's a good idea in my opinion, a big impact on future work maybe.  But I am not the only one that will be updating the code, and leaving it as-is or getting ride of it would be an easy out for future work.   

Todd Giles

未讀,
2015年6月27日 上午8:50:362015/6/27
收件者:lightsh...@googlegroups.com
Micah added the export_pins support, so perhaps he can chime in on his desire to keep it (or not).  I personally use the soft pwm feature of wiringPi which requires root to be performant (as such I always run with export_pins = False).  I also am not personally as concerned about security for my show, as I don't plan to open up my RaspberryPi to the world and will keep it behind a firewall.


--
http://www.lightshowpi.org/
---
You received this message because you are subscribed to the Google Groups "LightShow Pi Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lightshowpi-d...@googlegroups.com.
To post to this group, send email to lightsh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightshowpi-dev/ca16b304-9bc9-4c0d-a79f-c84b1a1612e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
回覆所有人
回覆作者
轉寄
0 則新訊息