The function tzplatform_getgid expects the id of a variable
matching a user name, not a group name.
The group set here will now be the group of the current userr.,
It is valid because the mode set using chmod is 0777.
Change-Id: Ie1afde4f08fd1a9cc8a37199611194d4bfea6ae3
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
return -1;
}
- ret = chown(ACC_SOCK_PATH,tzplatform_getuid(TZ_USER_NAME),tzplatform_getgid(TZ_SYS_USER_GROUP));
+ ret = chown(ACC_SOCK_PATH,tzplatform_getuid(TZ_USER_NAME),tzplatform_getgid(TZ_USER_NAME));
if (ret < 0) {
- USB_LOG("FAIL: chown(ACC_SOCK_PATH, tzplatform_getuid(TZ_USER_NAME),tzplatform_getgid(TZ_SYS_USER_GROUP))");
+ USB_LOG("FAIL: chown(ACC_SOCK_PATH, tzplatform_getuid(TZ_USER_NAME),tzplatform_getgid(TZ_USER_NAME))");
close(sock_local);
return -1;
}