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:
2021-06-30 20:35:27 +02:00
committed by vanhofen
parent 29ec36cd81
commit 6ea802b34f

View File

@@ -570,6 +570,10 @@ bool exec_controlscript(std::string script)
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;
if (system_command == "service")
{