Lines Matching defs:dataDir
940 int linklib(const char* dataDir, const char* asecLibDir)
946 const size_t libdirLen = strlen(dataDir) + strlen(PKG_LIB_POSTFIX);
952 if (snprintf(libdir, sizeof(libdir), "%s%s", dataDir, PKG_LIB_POSTFIX) != (ssize_t)libdirLen) {
957 if (stat(dataDir, &s) < 0) return -1;
959 if (chown(dataDir, 0, 0) < 0) {
960 LOGE("failed to chown '%s': %s\n", dataDir, strerror(errno));
964 if (chmod(dataDir, 0700) < 0) {
965 LOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
1002 if (chmod(dataDir, s.st_mode) < 0) {
1003 LOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
1007 if (chown(dataDir, s.st_uid, s.st_gid) < 0) {
1008 LOGE("failed to chown '%s' : %s\n", dataDir, strerror(errno));
1015 int unlinklib(const char* dataDir)
1021 const size_t libdirLen = strlen(dataDir) + strlen(PKG_LIB_POSTFIX);
1026 if (snprintf(libdir, sizeof(libdir), "%s%s", dataDir, PKG_LIB_POSTFIX) != (ssize_t)libdirLen) {
1031 if (stat(dataDir, &s) < 0) {
1036 if (chown(dataDir, 0, 0) < 0) {
1037 LOGE("failed to chown '%s': %s\n", dataDir, strerror(errno));
1041 if (chmod(dataDir, 0700) < 0) {
1042 LOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
1079 if (chmod(dataDir, s.st_mode) < 0) {
1080 LOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
1084 if (chown(dataDir, s.st_uid, s.st_gid) < 0) {
1085 LOGE("failed to chown '%s' : %s\n", dataDir, strerror(errno));