ALARM_MGR_LOG_PRINT("[TIMESTAMP]Set the timezone to %s.", tzpath_str);
- if (stat(tzpath_str, &statbuf) == -1 && errno == ENOENT) {
+ if (lstat(tzpath_str, &statbuf) == -1 && errno == ENOENT) {
ALARM_MGR_EXCEPTION_PRINT("Invalid tzpath, %s", tzpath_str);
return_code = ERR_ALARM_INVALID_PARAM;
goto done;
}
- retval = stat(TIMEZONE_INFO_LINK_PATH, &statbuf);
+ retval = lstat(TIMEZONE_INFO_LINK_PATH, &statbuf);
if (retval == 0 || (retval == -1 && errno != ENOENT)) {
/* unlink the current link */
if (unlink(TIMEZONE_INFO_LINK_PATH) < 0) {