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 Jari Sundell
parent 019c16a077
commit a5c39566c8
6 changed files with 236 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;