Fix bug in group handling 97/36097/2 accepted/tizen_3.0.2015.q1_common tizen_3.0.2015.q1_common accepted/tizen/3.0.2015.q1/common/20150317.132301 accepted/tizen/common/20150316.134729 accepted/tizen/common/20150323.135018 accepted/tizen/mobile/20150324.004910 accepted/tizen/tv/20150324.014503 accepted/tizen/tv/20150324.014939 accepted/tizen/wearable/20150323.005716 accepted/tizen/wearable/20150324.004312 submit/tizen/20150323.081920 submit/tizen_3.0.2015.q1_common/20150316.105130 submit/tizen_3.0.2015.q1_common/20150316.112029 submit/tizen_common/20150316.105034 submit/tizen_common/20150316.111955 submit/tizen_tv/20150320.000001 submit/tizen_wearable/20150320.000000
authorJosé Bollo <jose.bollo@open.eurogiciel.org>
Mon, 2 Mar 2015 09:39:15 +0000 (10:39 +0100)
committerDominig ar Foll <dominig.arfoll@fridu.net>
Mon, 16 Mar 2015 10:45:42 +0000 (03:45 -0700)
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 user.

Change-Id: I6feabd899c95fcdf4824d0b4fd4920b7fd0dffef
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
src/common/media-common-external-storage.c

index 3f5bdf7..93e98bb 100755 (executable)
@@ -84,7 +84,7 @@ ms_make_default_path_mmc(void)
                        if (ret != 0) {
                                MS_DBG_ERR("chmod failed [%s]", strerror(errno));
                        }
-                       ret = chown(default_path[i], tzplatform_getuid(TZ_USER_NAME), tzplatform_getgid(TZ_SYS_USER_GROUP));
+                       ret = chown(default_path[i], tzplatform_getuid(TZ_USER_NAME), tzplatform_getgid(TZ_USER_NAME));
                        if (ret != 0) {
                                MS_DBG_ERR("chown failed [%s]", strerror(errno));
                        }