#include <fontconfig/fontconfig.h>
#include <Elementary.h>
#include <pkgmgr-info.h>
+#include <security-server.h>
#include "system_settings.h"
return ret;
}
}
- ret = lsetxattr(path, "security.SMACK64", "_", 1, 0);
+ ret = security_server_label_access(path, "_");
if (ret < 0)
{
- DEBUG_ERROR("lsetxattr is failed %s\n",path);
+ DEBUG_ERROR("security_server_label_access is failed %s\n",path);
return ret;
}
goto FAIL;
}
- ret = lsetxattr(destdir, "security.SMACK64", "_", 1, 0);
+ ret = security_server_label_access(destdir, "_");
if (ret < 0)
{
- DEBUG_ERROR("lsetxattr is failed %s\n",destdir);
+ DEBUG_ERROR("security_server_label_access is failed %s\n",destdir);
goto FAIL;
}
}
goto FAIL;
}
- ret = lsetxattr(destdir, "security.SMACK64", "_", 1, 0);
+ ret = security_server_label_access(destdir, "_");
if (ret < 0)
{
- DEBUG_ERROR("lsetxattr is failed %s\n",destdir);
+ DEBUG_ERROR("security_server_label_access is failed %s\n",destdir);
goto FAIL;
}
}
chmod (ELM_PROFILE_CFG, 0777);
}
- ret = lsetxattr(ELM_PROFILE_CFG, "security.SMACK64", "system::homedir", 15, 0);
+ ret = security_server_label_access(ELM_PROFILE_CFG, "system::homedir");
if (ret < 0)
{
chmod (ELM_PROFILE_CFG, 0777);
chmod (file_full_path, 0777);
}
- ret = lsetxattr(file_full_path, "security.SMACK64", "system::homedir", 15, 0);
+ ret = security_server_label_access(file_full_path, "system::homedir");
if (ret < 0)
{
DEBUG_LOG("chsmack is failed %s", file_full_path);