If tdm_display_init is called by non super user, we don't need to
change the owner and group of a tdm socket file. And also changing
the owner of the tdm socket file which is created by non super user
is not allowed. So we just skip chown in this case.
Change-Id: Ib119becc4b9048f0fcc79c52089cfe04907cac60
return 0;
}
+ /* if not super user, we don't need to change owner and group */
+ if (getuid() != 0)
+ return 1;
+
ret = _tdm_getgrnam_r("root");
if (ret < 0) {
TDM_ERR("getting uid failed");