Write session files with O_NOFOLLOW and mode 0600

Also make directory_entry::is_file() report the real type so symlinks are skipped.
This commit is contained in:
xirvik
2026-09-19 01:55:14 +00:00
committed by rakshasa
parent d16263701a
commit 47eb1432b6
5 changed files with 234 additions and 25 deletions
+2 -2
View File
@@ -2,14 +2,14 @@
#define RTORRENT_UTILS_DIRECTORY_H
#include <cstdint>
#include <dirent.h>
#include <string>
#include <vector>
namespace utils {
struct directory_entry {
// Fix.
bool is_file() const { return true; }
bool is_file() const { return s_type == DT_REG; }
// The name and types should match POSIX.
uint32_t s_fileno;