mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
heipers.cpp: use getuid() instead getenv()
Enabled only on generic hardware.
Thanks seife for hint.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 33a282527c
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-06-30 (Wed, 30 Jun 2021)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -570,6 +570,10 @@ bool exec_controlscript(std::string script)
|
|||||||
|
|
||||||
bool exec_initscript(std::string script, std::string command, std::string system_command)
|
bool exec_initscript(std::string script, std::string command, std::string system_command)
|
||||||
{
|
{
|
||||||
|
#if HAVE_GENERIC_HARDWARE
|
||||||
|
if (getuid())
|
||||||
|
dprintf(DEBUG_NORMAL,"[helpers] [%s - %d] WARNING: current user is not root!\n", __func__, __LINE__);
|
||||||
|
#endif
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
if (system_command == "service")
|
if (system_command == "service")
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user