Hello Marc

I did some investigation about the localization for pacct in various
distros and i saw that /var/account is the more widely used (Fedora,
RedHat, Gentoo...). This path is the standard even on {Free,Net,Open}BSD
where this file is called acct. So, i migrated the log files to this new
path.

I uploaded a new revision to salsa.d.o [0] but i am not sure if this bug
fixing worths an upload in the middle of a freeze.

If so, could you consider sponsor the package?

Greetings,

Marcos

[0] https://salsa.debian.org/pkg-security-team/acct/



On 20/2/19 17:46, Marc Haber wrote:
> Hi Marcos,
>
> thanks for your answer.
>
> My suggestion is to have a well documented file in a stable location
> that says where to find the actual accounting file. Currently, atop's
> code is full of constructs like
>
>         for PACCTFILE in /var/account/pacct /var/log/pacct
>         do
>                 if [ -f "$PACCTFILE" ]  # file exists?
>                 then
>
> (which is obviously missing the current plac /var/log/account/pacct)
>
> otoh, if this will be a Debianism, atop's code won't get any easier since atop
> will need to continue handling all those places in other
> distributions.
>
> Greetings
> Marc
>
>
> On Tue, Feb 19, 2019 at 11:44:39PM +0100, Marcos Fouces wrote:
>> From: Marcos Fouces <marcos.fou...@gmail.com>
>> Subject: Re: Bug#922533: please document location of accounting file
>> To: Marc Haber <mh+debian-packa...@zugschlus.de>, 922...@bugs.debian.org,
>>  Debian Bug Tracking System <sub...@bugs.debian.org>
>> Date: Tue, 19 Feb 2019 23:44:39 +0100
>> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
>>  Thunderbird/60.5.0
>> X-Spam-Score: (--) -2.1
>> X-Spam-Report: torres.zugschlus.de  Content analysis details:   (-2.1
>>  points, 5.0 required)   pts  rule name              description  ----
>>  ---------------------- ------------------------------------------- -1.9
>>  BAYES_00               BODY: Bayes spam probability is 0 to 1%
>>                              [score: 0.0000] -0.0 RCVD_IN_DNSWL_NONE
>>      RBL: Sender listed at http://www.dnswl.org/,
>>                              no trust
>>                              [2a00:1450:4864:20:0:0:0:42c listed in]
>>                              [list.dnswl.org]  0.0 FREEMAIL_FROM
>>           Sender email is commonly abused enduser mail
>>                              provider (marcos.fouces[at]gmail.com) -0.0
>>  SPF_PASS               SPF: sender matches SPF record -0.1 DKIM_VALID_AU
>>           Message has a valid DKIM or DK signature from
>>                              author's domain  0.1 DKIM_SIGNED
>>             Message has a DKIM or DK signature, not necessarily
>>                              valid -0.1 DKIM_VALID_EF          Message has
>>  a valid DKIM or DK signature from
>>                              envelope-from domain -0.1 DKIM_VALID
>>              Message has at least one valid DKIM or DK signature
>>
>> Hi Marc
>>
>> In Debian, the pacct file is located in /var/log/account/pacct while in
>> Fedora it is in /var/account/pacct.
>>
>> I don't see the reason to be less parsable in that location.
>>
>> What is your suggestion?
>>
>> Greetings,
>>
>> Marcos
>>
>> On 17/2/19 20:50, Marc Haber wrote:
>>> Package: acct
>>> Version: 6.6.4-2
>>> Severity: wishlist
>>>
>>> Hi,
>>>
>>> my package atop needs to adapt itself to acct being installed or not. If
>>> acct is installed, atop reads from acct's log files, while establishing
>>> its own accounting interface it acct is not installed.
>>>
>>> Historically, the pacct file is found in various different places,
>>> varying across distribution, so atop's upstream code does through
>>> various contortions to find the correct file. It for example acts on
>>> /etc/logrotate.d/psacct to find the file being rotated, which fails on
>>> Debian since Debian's acct package uses savelog in /etc/cron.d/acct.
>>>
>>> atop on Debian is currently growing code to parse for the savelog line
>>> in /etc/cron.d/acct to find out the acct file being used.
>>>
>>> Would it be possible ot have the acct file's location in a more easily
>>> parsable location? Thanks for helping!
>>>
>>> Greetings
>>> Marc
>>>
>>>
>>> -- System Information:
>>> Debian Release: buster/sid
>>>   APT prefers unstable
>>>   APT policy: (500, 'unstable'), (500, 'stable')
>>> Architecture: amd64 (x86_64)
>>> Foreign Architectures: i386
>>>
>>> Kernel: Linux 4.20.8-zgws1 (SMP w/4 CPU cores)
>>> Kernel taint flags: TAINT_OOT_MODULE
>>> Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en 
>>> (charmap=UTF-8)
>>> Shell: /bin/sh linked to /bin/dash
>>> Init: systemd (via /run/systemd/system)
>>>
>>> Versions of packages acct depends on:
>>> ii  dpkg          1.19.4
>>> ii  install-info  6.5.0.dfsg.1-4+b1
>>> ii  libc6         2.28-7
>>> ii  lsb-base      10.2018112800
>>>
>>> acct recommends no packages.
>>>
>>> acct suggests no packages.
>>>

Reply via email to