From 4a80239541f32f6e063537f70abaa4dec82d143e Mon Sep 17 00:00:00 2001 From: "xiao.wei" Date: Wed, 14 Jun 2023 07:13:20 -0400 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=AD=A3=E6=89=93=E5=8C=85?= =?UTF-8?q?=EF=BC=8C=E7=BC=96=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile.am_server | 166 +++++++++++++++++++-------------------- clouddrive/CloudFile.cpp | 1 + 2 files changed, 80 insertions(+), 87 deletions(-) diff --git a/Makefile.am_server b/Makefile.am_server index bf8fb2ec..627330a0 100644 --- a/Makefile.am_server +++ b/Makefile.am_server @@ -29,7 +29,16 @@ urbackupsrv_SOURCES += urlplugin/dllmain.cpp urlplugin/pluginmgr.cpp urlplugin/U endif if WITH_CRYPTOPLUGIN -urbackupsrv_SOURCES += cryptoplugin/dllmain.cpp cryptoplugin/AESDecryption.cpp cryptoplugin/CryptoFactory.cpp cryptoplugin/pluginmgr.cpp cryptoplugin/AESEncryption.cpp cryptoplugin/ZlibCompression.cpp cryptoplugin/ZlibDecompression.cpp cryptoplugin/AESGCMDecryption.cpp cryptoplugin/AESGCMEncryption.cpp cryptoplugin/ECDHKeyExchange.cpp +urbackupsrv_SOURCES += cryptoplugin/dllmain.cpp \ + cryptoplugin/AESDecryption.cpp \ + cryptoplugin/CryptoFactory.cpp \ + cryptoplugin/pluginmgr.cpp \ + cryptoplugin/AESEncryption.cpp \ + cryptoplugin/ZlibCompression.cpp \ + cryptoplugin/ZlibDecompression.cpp \ + cryptoplugin/AESGCMDecryption.cpp \ + cryptoplugin/AESGCMEncryption.cpp \ + cryptoplugin/ECDHKeyExchange.cpp endif urbackupsrv_SOURCES += luaplugin/dllmain.cpp luaplugin/LuaInterpreter.cpp luaplugin/pluginmgr.cpp @@ -757,72 +766,26 @@ install-exec-hook: chmod +s $(DESTDIR)$(bindir)/urbackup_snapshot_helper chmod +s $(DESTDIR)$(bindir)/urbackup_mount_helper -cryptoplugin_headers = cryptoplugin/AESEncryption.h cryptoplugin/AESDecryption.h cryptoplugin/IAESDecryption.h cryptoplugin/ICryptoFactory.h cryptoplugin/pluginmgr.h cryptoplugin/IAESEncryption.h cryptoplugin/CryptoFactory.h cryptoplugin/IZlibCompression.h cryptoplugin/IZlibDecompression.h cryptoplugin/ZlibCompression.h cryptoplugin/ZlibDecompression.h cryptoplugin/cryptopp_inc.h cryptoplugin/AESGCMDecryption.h cryptoplugin/AESGCMEncryption.h cryptoplugin/ECDHKeyExchange.h cryptoplugin/IAESGCMDecryption.h cryptoplugin/IAESGCMEncryption.h cryptoplugin/IECDHKeyExchange.h +cryptoplugin_headers = cryptoplugin/*.h -fileservplugin_headers = fileservplugin/bufmgr.h fileservplugin/CUDPThread.h fileservplugin/FileServFactory.h fileservplugin/IFileServ.h fileservplugin/packet_ids.h fileservplugin/socket_header.h fileservplugin/CriticalSection.h fileservplugin/FileServ.h fileservplugin/log.h fileservplugin/pluginmgr.h fileservplugin/CClientThread.h fileservplugin/CTCPFileServ.h fileservplugin/IFileServFactory.h fileservplugin/map_buffer.h fileservplugin/settings.h fileservplugin/types.h fileservplugin/chunk_settings.h fileservplugin/ChunkSendThread.h fileservplugin/PipeFile.h fileservplugin/PipeSessions.h fileservplugin/PipeFileBase.h fileservplugin/IPermissionCallback.h fileservplugin/FileMetadataPipe.h fileservplugin/PipeFileTar.h fileservplugin/PipeFileExt.h +fileservplugin_headers = fileservplugin/*.h -fsimageplugin_headers = fsimageplugin/filesystem.h fsimageplugin/FSImageFactory.h fsimageplugin/IFilesystem.h fsimageplugin/IFSImageFactory.h fsimageplugin/IVHDFile.h fsimageplugin/pluginmgr.h fsimageplugin/vhdfile.h fsimageplugin/fs/ntfs.h fsimageplugin/fs/unknown.h fsimageplugin/CompressedFile.h fsimageplugin/LRUMemCache.h common/miniz.h fsimageplugin/cowfile.h fsimageplugin/FileWrapper.h fsimageplugin/ClientBitmap.h fsimageplugin/partclone.h\ - fsimageplugin/vhdxfile.h +fsimageplugin_headers = fsimageplugin/*.h \ + fsimageplugin/fs/*.h -tclap_headers = \ - tclap/CmdLineInterface.h \ - tclap/ArgException.h \ - tclap/CmdLine.h \ - tclap/XorHandler.h \ - tclap/MultiArg.h \ - tclap/UnlabeledMultiArg.h \ - tclap/ValueArg.h \ - tclap/UnlabeledValueArg.h \ - tclap/Visitor.h tclap/Arg.h \ - tclap/HelpVisitor.h \ - tclap/SwitchArg.h \ - tclap/MultiSwitchArg.h \ - tclap/VersionVisitor.h \ - tclap/IgnoreRestVisitor.h \ - tclap/CmdLineOutput.h \ - tclap/StdOutput.h \ - tclap/DocBookOutput.h \ - tclap/ZshCompletionOutput.h \ - tclap/OptionalUnlabeledTracker.h \ - tclap/Constraint.h \ - tclap/ValuesConstraint.h \ - tclap/ArgTraits.h \ - tclap/StandardTraits.h +tclap_headers = tclap/*.h zstd_headers = \ - external/zstd/common/bitstream.h \ - external/zstd/common/compiler.h \ - external/zstd/common/cpu.h \ - external/zstd/common/debug.h \ - external/zstd/common/error_private.h \ - external/zstd/common/fse.h \ - external/zstd/common/huf.h \ - external/zstd/common/mem.h \ - external/zstd/common/pool.h \ - external/zstd/common/threading.h \ - external/zstd/common/xxhash.h \ - external/zstd/common/zstd_errors.h \ - external/zstd/common/zstd_internal.h \ - external/zstd/compress/hist.h \ - external/zstd/compress/zstdmt_compress.h \ - external/zstd/compress/zstd_compress_internal.h \ - external/zstd/compress/zstd_compress_literals.h \ - external/zstd/compress/zstd_compress_sequences.h \ - external/zstd/compress/zstd_double_fast.h \ - external/zstd/compress/zstd_fast.h \ - external/zstd/compress/zstd_lazy.h \ - external/zstd/compress/zstd_ldm.h \ - external/zstd/compress/zstd_opt.h \ - external/zstd/decompress/zstd_ddict.h \ - external/zstd/decompress/zstd_decompress_block.h \ - external/zstd/decompress/zstd_decompress_internal.h \ - external/zstd/deprecated/zbuff.h \ - external/zstd/dictBuilder/cover.h \ - external/zstd/dictBuilder/divsufsort.h \ - external/zstd/dictBuilder/zdict.h \ - external/zstd/zstd.h + external/zstd/common/*.h \ + external/zstd/compress/*.h \ + external/zstd/decompress/*.h \ + external/zstd/deprecated/*.h \ + external/zstd/dictBuilder/*.h \ + external/zstd/*.h -luaplugin_headers = luaplugin/ILuaInterpreter.h luaplugin/LuaInterpreter.h luaplugin/pluginmgr.h luaplugin/src/* luaplugin/lua/dkjson_lua.h +luaplugin_headers = luaplugin/*.h \ + luaplugin/src/* \ + luaplugin/lua/*.h aws_sdk_headers = \ external/aws-cpp-sdk/include/aws/common/allocator.h \ @@ -876,6 +839,7 @@ aws_sdk_headers = \ external/aws-cpp-sdk/include/aws/common/private/array_list.h \ external/aws-cpp-sdk/include/aws/common/private/byte_buf.h \ external/aws-cpp-sdk/include/aws/common/private/hash_table_impl.h \ + external/aws-cpp-sdk/include/aws/common/private/lookup3.inl \ external/aws-cpp-sdk/include/aws/common/config.h \ external/aws-cpp-sdk/include/aws/testing/aws_test_allocators.h \ external/aws-cpp-sdk/include/aws/testing/aws_test_harness.h \ @@ -1374,34 +1338,62 @@ aws_sdk_headers = \ external/aws-cpp-sdk/include/aws/s3/model/UploadPartResult.h \ external/aws-cpp-sdk/include/aws/s3/model/VersioningConfiguration.h \ external/aws-cpp-sdk/include/aws/s3/model/WebsiteConfiguration.h \ - external/aws-cpp-sdk/include/aws/s3/model/WriteGetObjectResponseRequest.h + external/aws-cpp-sdk/include/aws/s3/model/WriteGetObjectResponseRequest.h \ + external/aws-cpp-sdk/include/aws/common/posix/common.inl \ + external/aws-cpp-sdk/include/aws/common/*.inl -clouddrive_headers = \ - clouddrive/Auto.h \ - clouddrive/CdZlibCompressor.h \ - clouddrive/CdZstdCompressor.h \ - clouddrive/ClouddriveFactory.h \ - clouddrive/CloudFile.h \ - clouddrive/CompressEncrypt.h \ - clouddrive/IClouddriveFactory.h \ - clouddrive/ICompressEncrypt.h \ - clouddrive/IKvStoreBackend.h \ - clouddrive/IKvStoreFrontend.h \ - clouddrive/IOnlineKvStore.h \ - clouddrive/KvStoreBackendS3.h \ - clouddrive/KvStoreDao.h \ - clouddrive/KvStoreFrontend.h \ - clouddrive/LzmaCompressor.h \ - clouddrive/ObjectCollector.h \ - clouddrive/pluginmgr.h \ - clouddrive/TransactionalKvStore.h - -noinst_HEADERS=SessionMgr.h WorkerThread.h Helper_win32.h Database.h defaults.h ServiceAcceptor.h Query.h SettingsReader.h file.h file_memory.h MemorySettingsReader.h Condition_lin.h LookupService.h Template.h types.h DBSettingsReader.h stringtools.h ThreadPool.h libs.h vld_.h ServiceWorker.h StreamPipe.h LoadbalancerClient.h socket_header.h FileSettingsReader.h SelectThread.h md5.h vld.h Table.h Client.h MemoryPipe.h Mutex_lin.h AcceptThread.h OutputStream.h Server.h Interface/SessionMgr.h Interface/Service.h Interface/PluginMgr.h Interface/Database.h Interface/Pipe.h Interface/CustomClient.h Interface/User.h Interface/Query.h Interface/SettingsReader.h Interface/Types.h Interface/Template.h Interface/ThreadPool.h Interface/Mutex.h Interface/File.h Interface/Condition.h Interface/Table.h Interface/Plugin.h Interface/Thread.h Interface/Action.h Interface/Object.h Interface/OutputStream.h Interface/Server.h libfastcgi/fastcgi.hpp sqlite/sqlite3.h sqlite/sqlite3ext.h utf8/utf8.h utf8/utf8/checked.h utf8/utf8/core.h utf8/utf8/unchecked.h cryptoplugin/ICryptoFactory.h cryptoplugin/IAESEncryption.h cryptoplugin/IAESDecryption.h Interface/DatabaseFactory.h Interface/DatabaseInt.h SQLiteFactory.h sqlite/shell.h PipeThrottler.h Interface/PipeThrottler.h mt19937ar.h DatabaseCursor.h Interface/DatabaseCursor.h Interface/SharedMutex.h Interface/WebSocket.h SharedMutex_lin.h httpserver/HTTPAction.h httpserver/HTTPClient.h httpserver/HTTPFile.h httpserver/HTTPProxy.h httpserver/HTTPService.h httpserver/IndexFiles.h httpserver/MIMEType.h httpserver/HTTPSocket.h urbackupserver/server_ping.h urbackupserver/server_cleanup.h urbackupcommon/os_functions.h urbackupcommon/json.h urbackupserver/serverinterface/helper.h urbackupserver/serverinterface/action_header.h urbackupserver/serverinterface/actions.h urbackupserver/server_writer.h urbackupcommon/settings.h urbackupserver/server_settings.h urbackupserver/zero_hash.h urbackupserver/server_update.h urbackupserver/server_log.h urbackupserver/server_hash.h urbackupserver/server_status.h urbackupcommon/bufmgr.h urbackupserver/server_update_stats.h urbackupcommon/sha2/sha2.h urbackupcommon/fileclient/FileClient.h common/data.h urbackupcommon/fileclient/socket_header.h urbackupcommon/fileclient/tcpstack.h urbackupcommon/fileclient/packet_ids.h urbackupserver/database.h urbackupserver/mbr_code.h urbackupserver/action_header.h urbackupcommon/escape.h urbackupserver/server.h urbackupserver/server_running.h urbackupserver/server_prepare_hash.h urbackupserver/actions.h urbackupserver/server_channel.h urbackupserver/ClientMain.h urbackupserver/treediff/TreeDiff.h urbackupserver/treediff/TreeNode.h urbackupserver/treediff/TreeReader.h fileservplugin/IFileServFactory.h fileservplugin/IFileServ.h urlplugin/IUrlFactory.h urbackupcommon/capa_bits.h cryptoplugin/ICryptoFactory.h urbackupcommon/fileclient/FileClientChunked.h urbackupserver/ChunkPatcher.h urbackupcommon/CompressedPipe.h urbackupcommon/InternetServicePipe.h urbackupcommon/InternetServicePipe2.h urbackupcommon/InternetServiceIDs.h urbackupserver/InternetServiceConnector.h md5.h urbackupcommon/settingslist.h urbackupserver/server_archive.h cryptoplugin/IZlibCompression.h cryptoplugin/IZlibDecompression.h cryptoplugin/ICryptoFactory.h cryptoplugin/IAESEncryption.h cryptoplugin/IAESDecryption.h fileservplugin/chunk_settings.h urbackupcommon/internet_pipe_capabilities.h urbackupcommon/mbrdata.h urbackupserver/filedownload.h urbackupserver/snapshot_helper.h urbackupserver/apps/cleanup_cmd.h urbackupserver/apps/repair_cmd.h urbackupserver/dao/ServerCleanupDao.h urbackupserver/lmdb/lmdb.h urbackupserver/lmdb/midl.h urbackupserver/LMDBFileIndex.h urbackupserver/create_files_index.h urbackupserver/FileIndex.h urbackupserver/serverinterface/rights.h urbackupserver/server_dir_links.h urbackupserver/dao/ServerBackupDao.h urbackupserver/apps/app.h urbackupserver/apps/export_auth_log.h urbackupserver/serverinterface/login.h urbackupserver/ServerDownloadThread.h urbackupserver/ServerDownloadThreadGroup.h common/adler32.h urbackupcommon/file_metadata.h urbackupcommon/filelist_utils.h urbackupserver/Backup.h urbackupserver/ImageBackup.h urbackupserver/FileBackup.h urbackupserver/IncrFileBackup.h urbackupserver/FullFileBackup.h urbackupserver/ContinuousBackup.h urbackupserver/ThrottleUpdater.h urbackupcommon/glob.h urbackupserver/FileMetadataDownloadThread.h urbackupserver/restore_client.h urbackupcommon/chunk_hasher.h urbackupcommon/WalCheckpointThread.h urbackupcommon/CompressedPipe2.h urlplugin/IUrlFactory.h urlplugin/pluginmgr.h urlplugin/UrlFactory.h StaticPluginRegistration.h $(cryptoplugin_headers) $(fileservplugin_headers) $(fsimageplugin_headers) $(tclap_headers) urbackupserver/backup_server_db.h urbackupcommon/SparseFile.h urbackupcommon/ExtentIterator.h urbackupserver/dao/ServerLinkDao.h urbackupserver/dao/ServerLinkJournalDao.h urbackupcommon/server_compat.h urbackupserver/dao/ServerFilesDao.h urbackupserver/apps/skiphash_copy.h urbackupserver/apps/check_files_index.h urbackupserver/apps/patch.h urbackupserver/serverinterface/backups.h urbackupserver/server_continuous.h urbackupcommon/change_ids.h urbackupcommon/TreeHash.h urbackupserver/copy_storage.h urbackupserver/ImageMount.h common/bitmap.h $(cryptopp_headers) common/miniz.h urbackupserver/DataplanDb.h common/lrucache.h urbackupserver/PhashLoad.h fileservplugin/IPipeFileExt.h urbackupserver/Alerts.h urbackupserver/Mailer.h urbackupserver/alert_lua.h urbackupserver/alert_pulseway_lua.h $(luaplugin_headers) urbackupserver/LogReport.h urbackupserver/report_lua.h urbackupcommon/CompressedPipeZstd.h blockalign_src/main.cpp blockalign_src/crc32c-adler.cpp blockalign_src/crc.cpp blockalign_src/crc.h urbackupserver/WebSocketConnector.h urbackupcommon/WebSocketPipe.h\ - urbackupcommon/backup_url_parser.h \ - urbackupserver/LocalBackup.h \ - OpenSSLPipe.cpp \ + +clouddrive_headers = clouddrive/*.h + +interface_headers = Interface/*.h + +sqlite_headers = sqlite/*.h + +urbackupserver_headers = urbackupserver/*.h \ + urbackupserver/apps/*.h \ + urbackupserver/dao/*.h \ + urbackupserver/lmdb/*.h \ + urbackupserver/serverinterface/*.h \ + urbackupserver/treediff/*.h + +urbackupcommon_headers = urbackupcommon/*.h \ + urbackupcommon/fileclient/*.h \ + urbackupcommon/sha2/*.h + +utf8_headers = utf8/utf8.h \ + utf8/utf8/checked.h \ + utf8/utf8/core.h \ + utf8/utf8/unchecked.h + +urlplugin_headers = urlplugin/*.h + +common_headers = common/*.h + +httpserver_headers = httpserver/*.h + +blockalign_src_headers = blockalign_src/*.h\ + blockalign_src/*.cpp + +other_headers = *.h + +noinst_HEADERS=libfastcgi/fastcgi.hpp \ + $(urbackupcommon_headers) \ + $(urbackupserver_headers) \ $(zstd_headers) \ $(aws_sdk_headers) \ - $(clouddrive_headers) + $(clouddrive_headers) \ + $(interface_headers) \ + $(sqlite_headers) \ + $(cryptoplugin_headers) \ + $(luaplugin_headers) \ + $(fileservplugin_headers) \ + $(fsimageplugin_headers) \ + $(tclap_headers) \ + $(utf8_headers) \ + $(urlplugin_headers) \ + $(common_headers) \ + $(httpserver_headers) \ + $(blockalign_src_headers) \ + $(other_headers) EXTRA_DIST=docs/urbackupsrv.1 init.d_server defaults_server logrotate_urbackupsrv urbackup-server.service urbackup-server-firewalld.xml urbackup/status.htm urbackupserver/www/js/*.js urbackupserver/www/js/vs/* urbackupserver/www/*.htm urbackupserver/www/*.ico urbackupserver/www/css/*.css urbackupserver/www/images/*.png urbackupserver/www/images/*.gif urbackupserver/www/*.ico urbackupserver/urbackup_ecdsa409k1.pub urbackupserver/www/swf/* urbackupserver/www/fonts/* tclap/COPYING tclap/AUTHORS server-license.txt urbackup/dataplan_db.txt diff --git a/clouddrive/CloudFile.cpp b/clouddrive/CloudFile.cpp index c76ad7d7..59df6763 100644 --- a/clouddrive/CloudFile.cpp +++ b/clouddrive/CloudFile.cpp @@ -111,6 +111,7 @@ int eventfd_write(int fd, int value) { #include #include #include +#include const int64 min_cachesize = 1LL * 1024* 1024* 1024LL; // 1GB const int64 min_free_size = 20LL * 1024* 1024* 1024LL; // 20GB