mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-06 06:09:22 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user