[Kimchi-devel] [PATCH] Make sure that only root user runs kimchi

Ramon Medeiros ramonn at linux.vnet.ibm.com
Tue Feb 18 12:58:10 UTC 2014


Modify server.py to accept only root user to run kimchi. This will avoid some 
message errors if non-root users tries to run.

Test: 

ramonn at jarvis:~/Gittrees/KIMCHI (master *)$ ./src/kimchid 
You need root privileges to run this script.
Exiting.
ramonn at jarvis:~/Gittrees/KIMCHI (master *)$ $?
bash: 1: command not found...
ramonn at jarvis:~/Gittrees/KIMCHI (master *)$ sudo ./src/kimchid 
Loading YumUpdate features.
[18/Feb/2014:09:54:05] ENGINE Bus STARTING
[18/Feb/2014:09:54:05] ENGINE Started monitor thread 'Autoreloader'.
[18/Feb/2014:09:54:05] ENGINE Started monitor thread '_TimeoutMonitor'.
WebSocket server settings:
  - Listen on :64667
  - Flash security policy server
  - No SSL/TLS support (no cert file)
  - proxying from :64667 to targets in /var/lib/kimchi/vnc-tokens

[18/Feb/2014:09:54:05] ENGINE Serving on 0.0.0.0:8000
[18/Feb/2014:09:54:05] ENGINE Serving on 0.0.0.0:8001
*** Running feature tests ***
127.0.0.1 - - [18/Feb/2014:09:54:05] "HEAD /images/icon-fedora.png HTTP/1.1" 200 4449 "" ""
127.0.0.1 - - [18/Feb/2014:09:54:05] "GET /images/icon-fedora.png HTTP/1.1" 206 4449 "" ""
127.0.0.1 - - [18/Feb/2014:09:54:05] "HEAD /images/icon-fedora.png HTTP/1.1" 200 4449 "" ""
127.0.0.1 - - [18/Feb/2014:09:54:05] "GET /images/icon-fedora.png HTTP/1.1" 206 4449 "" ""
*** Feature tests completed ***

Ramon Medeiros (1):
  Forbid non-root users to start kimchi

 src/kimchi/server.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

-- 
1.8.3.1




More information about the Kimchi-devel mailing list