Skip to content

Commit

Permalink
randomenv: remove /proc/ access
Browse files Browse the repository at this point in the history
The data we try and gather in this file is on a best-effort basis,
however in this instance, for certain users, it's just producing spam.
This could (possibly?) be solved with further snap/apparmor
configuration, however given that no-one is actively working on
packaging, we could instead drop this (one of many), sources of
dynamic environment data.

Closes bitcoin-core/packaging#115.
  • Loading branch information
fanquake committed Oct 25, 2024
1 parent 9a7206a commit 9786eb2
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/randomenv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,6 @@ void RandAddDynamicEnv(CSHA512& hasher)
if (getrusage(RUSAGE_SELF, &usage) == 0) hasher << usage;
#endif

#ifdef __linux__
AddFile(hasher, "/proc/diskstats");
AddFile(hasher, "/proc/vmstat");
AddFile(hasher, "/proc/schedstat");
AddFile(hasher, "/proc/zoneinfo");
AddFile(hasher, "/proc/meminfo");
AddFile(hasher, "/proc/softirqs");
AddFile(hasher, "/proc/stat");
AddFile(hasher, "/proc/self/schedstat");
AddFile(hasher, "/proc/self/status");
#endif

#ifdef HAVE_SYSCTL
# ifdef CTL_KERN
# if defined(KERN_PROC) && defined(KERN_PROC_ALL)
Expand Down

0 comments on commit 9786eb2

Please sign in to comment.