Fix database permission
authorChengwei Yang <chengwei.yang@intel.com>
Thu, 1 Aug 2013 07:37:47 +0000 (15:37 +0800)
committerChengwei Yang <chengwei.yang@intel.com>
Thu, 1 Aug 2013 09:36:32 +0000 (17:36 +0800)
This looks like some kind of typo, however will cause app application
failed to update desktop entry in database.

For example, starter will update sat-ui entry in database once it's
ready, while starter running as 'app' privilege, which is a member of
group 'db_menu'.

Change-Id: I3ff02609e5412b4004edd2fcb7007616983e8b7e
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
initdb/src/initdb.c

index 0cade32..ea17385 100755 (executable)
@@ -182,7 +182,7 @@ static int initdb_change_perm(const char *db_file)
                        return AIL_ERROR_FAIL;
                }
 
-               ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+               ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
                if (ret == -1) {
                        strerror_r(errno, buf, sizeof(buf));
                        _E("FAIL : chmod %s 0664, because %s", db_file, buf);