linux-application-whitelisting / fapolicyd

File Access Policy Daemon
GNU General Public License v3.0
192 stars 55 forks source link

Increase buffer size for reading process groups #306

Open skosachiov opened 3 months ago

skosachiov commented 3 months ago

Increase buffer size for reading process groups from /proc/pid/status. In a corporate environment, the number of groups can be quite large. Let's assume that 8192 will allow us to read 512 groups.

skosachiov commented 3 months ago

cat /proc/23548/status ... Uid: 1532536188 1532536188 1532536188 1532536188 Gid: 53800514 53800514 53800514 53800514 FDSize: 128 Groups: 107 114 123 124 64055 53800514 53972353 53981290 148406938 148408882 148415556 148418815 148419489 148419944 148420627 148421600 148424264 148438895 148451737 148451738 148455828 148456759 148468146 148471238 148471244 148500965 148505765 148514592 148514593 148514594 148516968 148516970 148518402 148518403 148524933 148532538 148535274 148535371 148574653 148591098 148591686 593203385 593207143 593207522 593215512 593227237 593228243 593250151 593273328 593273395 593274144 593281502 593281503 593303214 593303374 593324381 593343147 593345568 593355738 593361660 593373815 593376875 593379143 593388230 1447427059 1447438405 1447452845 1447452846 1447452847 1447452848 1447476528 1447482021 1447492176 1447495332 1447495333 1447502055 1447502056 1447502734 1447504793 1469609140 1469663436 1469730655 1469731436 1469737665 1532427666 1532439582 1532460823 1532500173 1532501444 1532520915 1532521629 1532521630 1532521634 1532558983 1532559732 1532567763 1532568554 1532568556 1532572585 1532583861 1532586853 1532590321 1532594776 1532597887
NStgid: 23548 339 1 NSpid: 23548 339 1 ...

radosroka commented 1 month ago

We are using #define instead of const in other parts of the code could you follow it?

skosachiov commented 1 week ago

Added constant #define.