mirror of
https://github.com/ps5-payload-dev/ftpsrv.git
synced 2026-10-19 02:10:54 -05:00
cosmetics
This commit is contained in:
1 parent
5050503072
commit
9f0a2a9822
3 files changed
+5
-5
No files matched your search
@@ -92,8 +92,6 @@ main() {
|
||||
syscall(SYS_thr_set_name, -1, "ftpsrv.elf");
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
FTP_LOG_PRINTF("FTP server was compiled at %s %s\n", __DATE__, __TIME__);
|
||||
|
||||
while(1) {
|
||||
ftp_serve(port, notify_user);
|
||||
notify_user = 0;
|
||||
|
||||
@@ -31,14 +31,14 @@ along with this program; see the file COPYING. If not, see
|
||||
|
||||
|
||||
/**
|
||||
* This global lock is used to address race conditions that may occur when
|
||||
* A global lock that address race conditions that may occur when
|
||||
* threads atempt to read several SELF files at the same time.
|
||||
**/
|
||||
static pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
|
||||
/**
|
||||
* Decrypt and copy an ELF segment.
|
||||
* Decrypt and copy an encrypted ELF segment.
|
||||
**/
|
||||
static int
|
||||
decrypt_segment(int self_fd, int elf_fd, const Elf64_Phdr* phdr, size_t ind) {
|
||||
@@ -324,7 +324,7 @@ self_extract_elf(int self_fd, int elf_fd) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Decrypt and/or copy the segment
|
||||
// Decrypt and copy the segment
|
||||
if(entry->props.is_encrypted || entry->props.is_compressed) {
|
||||
if(decrypt_segment(self_fd, elf_fd, &phdr, i)) {
|
||||
free(entries);
|
||||
|
||||
@@ -298,6 +298,8 @@ ftp_serve(uint16_t port, int notify_user) {
|
||||
puts("| |_| |");
|
||||
printf("| %-16s Copyright (C) 2025 John Törnblom & drakmor |\n", VERSION_TAG);
|
||||
puts("'-------------------------------------------------------------'");
|
||||
puts("");
|
||||
printf("compiled at %s %s, running on port %d\n", __DATE__, __TIME__, port);
|
||||
}
|
||||
|
||||
if(getifaddrs(&ifaddr) == -1) {
|
||||
|
||||
Reference in new issue
Block a user