summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
da85f48)
Change-Id: I4b88aca7d9b24679356ac05b0b591cba22ce7ce0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
bool is_dup, uid_t uid, char **dev_node)
{
int ret = APP2EXT_SUCCESS;
bool is_dup, uid_t uid, char **dev_node)
{
int ret = APP2EXT_SUCCESS;
char dmcrypt_open_cmd[BUF_SIZE] = { 0, };
char dev_name[BUF_SIZE] = { 0, };
char buf[BUF_SIZE] = { 0, };
char dmcrypt_open_cmd[BUF_SIZE] = { 0, };
char dev_name[BUF_SIZE] = { 0, };
char buf[BUF_SIZE] = { 0, };
_E("app2sd db initialize failed");
return APP2EXT_ERROR_DB_INITIALIZE;
}
_E("app2sd db initialize failed");
return APP2EXT_ERROR_DB_INITIALIZE;
}
- if ((passwd = _app2sd_get_password_from_db(pkgid, uid)) == NULL) {
+
+ passwd = _app2sd_get_password_from_db(pkgid, uid);
+ if (passwd == NULL) {
_E("no password found for [%s]", pkgid);
return APP2EXT_ERROR_SQLITE_REGISTRY;
}
snprintf(dmcrypt_open_cmd, BUF_SIZE, "/bin/echo '%s' | /sbin/cryptsetup -q luksOpen %s %s",
passwd, loopback_device, dev_name);
_E("no password found for [%s]", pkgid);
return APP2EXT_ERROR_SQLITE_REGISTRY;
}
snprintf(dmcrypt_open_cmd, BUF_SIZE, "/bin/echo '%s' | /sbin/cryptsetup -q luksOpen %s %s",
passwd, loopback_device, dev_name);
ret = system(dmcrypt_open_cmd);
if (ret) {
ret = system(dmcrypt_open_cmd);
if (ret) {