aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authordimaandreev <dimaandreev@yandex-team.ru>2022-02-10 16:49:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:30 +0300
commite7b1f21afb7d922ce8aff97a44f7f5385d33051f (patch)
tree633deb13d5a49b73d7151193f2284694f947d5e4 /library/cpp
parentbec923d0b27a4ce1e6e308c3d415b6a1db751a3f (diff)
downloadydb-e7b1f21afb7d922ce8aff97a44f7f5385d33051f.tar.gz
Restoring authorship annotation for <dimaandreev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/tvmauth/client/misc/api/threaded_updater.cpp2
-rw-r--r--library/cpp/tvmauth/client/misc/disk_cache.cpp14
-rw-r--r--library/cpp/tvmauth/src/ut/service_ut.cpp2
-rw-r--r--library/cpp/tvmauth/src/ut/user_ut.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/tvmauth/client/misc/api/threaded_updater.cpp b/library/cpp/tvmauth/client/misc/api/threaded_updater.cpp
index a7df49c05d..dea915d8a2 100644
--- a/library/cpp/tvmauth/client/misc/api/threaded_updater.cpp
+++ b/library/cpp/tvmauth/client/misc/api/threaded_updater.cpp
@@ -162,7 +162,7 @@ namespace NTvmAuth::NTvmApi {
}
RetrySettingsFilepath_ = path + "retry_settings";
- } else {
+ } else {
LogInfo("Disk cache disabled. Please set disk cache directory in settings for best reliability");
}
}
diff --git a/library/cpp/tvmauth/client/misc/disk_cache.cpp b/library/cpp/tvmauth/client/misc/disk_cache.cpp
index 3c01be4a83..7f991f6e56 100644
--- a/library/cpp/tvmauth/client/misc/disk_cache.cpp
+++ b/library/cpp/tvmauth/client/misc/disk_cache.cpp
@@ -10,7 +10,7 @@
#include <util/stream/file.h>
#include <util/stream/str.h>
#include <util/system/fs.h>
-#include <util/system/sysstat.h>
+#include <util/system/sysstat.h>
#include <util/system/tempfile.h>
#include <exception>
@@ -122,12 +122,12 @@ namespace NTvmAuth {
try {
{
- if (NFs::Exists(Filename_)) {
- Chmod(Filename_.c_str(),
- S_IRUSR | S_IWUSR); // 600
- }
-
- TFile file(Filename_, CreateAlways | WrOnly | Seq | AWUser | ARUser);
+ if (NFs::Exists(Filename_)) {
+ Chmod(Filename_.c_str(),
+ S_IRUSR | S_IWUSR); // 600
+ }
+
+ TFile file(Filename_, CreateAlways | WrOnly | Seq | AWUser | ARUser);
file.Flock(LOCK_EX | LOCK_NB);
TFileOutput output(file);
diff --git a/library/cpp/tvmauth/src/ut/service_ut.cpp b/library/cpp/tvmauth/src/ut/service_ut.cpp
index 5b6b5143bd..c9968104e1 100644
--- a/library/cpp/tvmauth/src/ut/service_ut.cpp
+++ b/library/cpp/tvmauth/src/ut/service_ut.cpp
@@ -115,7 +115,7 @@ Y_UNIT_TEST_SUITE_IMPLEMENTATION(ServiceTestSuite) {
Y_UNIT_TEST(TicketProtoTest) {
ticket2::Ticket protobufTicket;
- UNIT_ASSERT(protobufTicket.ParseFromString(NUtils::Base64url2bin(SERVICE_TICKET_PROTOBUF)));
+ UNIT_ASSERT(protobufTicket.ParseFromString(NUtils::Base64url2bin(SERVICE_TICKET_PROTOBUF)));
TTestServiceTicketImpl checkedTicket(ETicketStatus::Ok, std::move(protobufTicket));
UNIT_ASSERT_EQUAL(ETicketStatus::Ok, checkedTicket.GetStatus());
UNIT_ASSERT_VALUES_EQUAL(std::numeric_limits<time_t>::max(), checkedTicket.GetExpirationTime());
diff --git a/library/cpp/tvmauth/src/ut/user_ut.cpp b/library/cpp/tvmauth/src/ut/user_ut.cpp
index c040e94974..31629aaa9a 100644
--- a/library/cpp/tvmauth/src/ut/user_ut.cpp
+++ b/library/cpp/tvmauth/src/ut/user_ut.cpp
@@ -133,7 +133,7 @@ Y_UNIT_TEST_SUITE_IMPLEMENTATION(UserTestSuite) {
Y_UNIT_TEST(TicketProtoTest) {
ticket2::Ticket protobufTicket;
- UNIT_ASSERT(protobufTicket.ParseFromString(NUtils::Base64url2bin(USER_TICKET_PROTOBUF)));
+ UNIT_ASSERT(protobufTicket.ParseFromString(NUtils::Base64url2bin(USER_TICKET_PROTOBUF)));
TTestUserTicketImpl userTicket(ETicketStatus::Ok, std::move(protobufTicket));
UNIT_ASSERT_EQUAL(ETicketStatus::Ok, userTicket.GetStatus());
UNIT_ASSERT_EQUAL(std::numeric_limits<time_t>::max(), userTicket.GetExpirationTime());