[SWDEV-495057] Update check to ignore sudo (#150)
Change-Id: Id4f24c254e805647782ae68667903a8d467c49b1
Signed-off-by: adapryor <Adam.pryor@amd.com>
[ROCm/amdsmi commit: ace5162735]
Этот коммит содержится в:
@@ -992,6 +992,11 @@ class AMDSMIHelpers():
|
||||
Check if the current user is a member of the required groups.
|
||||
If not, log a warning.
|
||||
"""
|
||||
|
||||
# Skip check if running as root.
|
||||
if os.geteuid() == 0:
|
||||
return
|
||||
|
||||
required_groups = {'video', 'render'}
|
||||
try:
|
||||
user_groups = {grp.getgrgid(gid).gr_name for gid in os.getgroups()}
|
||||
|
||||
Ссылка в новой задаче
Block a user