-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2023-02-02 at 08:54 +0100, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-02-01 19:45, Per Jessen wrote:
Carlos E. R. wrote:
But I want to know why locate doesn't locate them. It should.
Well, if it were me, I would try running updatedb with an strace, to see if it even touches on the directories. The updatedb seems to have permissions, so there has to be some other reason why it is avoiding /lib/modules - if it is indeed avoiding it.
When updatedb is run as root, without parameters, it finds those files.
Right.
And now, back at home, locate finds those files, in auxiliary (old) paths, something that it wasn't doing the other time I tried:
Okay, but that seems to be a tangent, as we are not interested in those paths.
Obviously, but it is another complication, another nail in "locate is acting weird".
I had a hunch, and apparmour is complaining:
Complaining about what? :-) You left out the most useful bit of information ...
I posted the output from AA. That's summarizes what it complains about :-) It needed this: /usr/bin/locate mr, /var/lib/mlocate/mlocate.db r, It seems the terminal I used seems to be gone (I did several reboots for a bugzilla report), so I can not check back. Wait, I have the audit log: Telcontar:~ # grep "usr/bin/locate\|/var/lib/mlocate/mlocate.db" /var/log/audit/* /var/log/audit/audit.log.1:type=AVC msg=audit(1675247354.543:1682): apparmor="DENIED" operation="capable" profile="/usr/bin/locate" pid=26774 comm="locate" capability=6 capname="setgid" /var/log/audit/audit.log.1:type=AVC msg=audit(1675247368.135:1683): apparmor="DENIED" operation="capable" profile="/usr/bin/locate" pid=26782 comm="locate" capability=6 capname="setgid" /var/log/audit/audit.log.1:type=AVC msg=audit(1675286657.200:1789): apparmor="DENIED" operation="capable" profile="/usr/bin/locate" pid=541 comm="locate" capability=6 capname="setgid" /var/log/audit/audit.log.1:type=AVC msg=audit(1675286870.985:1790): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/locate" pid=714 comm="apparmor_parser" /var/log/audit/audit.log.1:type=AVC msg=audit(1675286932.552:1858): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/bin/locate" pid=832 comm="apparmor_parser" /var/log/audit/audit.log.2:type=AVC msg=audit(1669806411.637:4112): apparmor="DENIED" operation="capable" profile="/usr/bin/locate" pid=9731 comm="locate" capability=6 capname="setgid" /var/log/audit/audit.log.2:type=AVC msg=audit(1669807739.641:4211): apparmor="DENIED" operation="capable" profile="/usr/bin/locate" pid=13352 comm="locate" capability=6 capname="setgid" /var/log/audit/audit.log.2:type=AVC msg=audit(1670190817.054:740): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/locate" pid=6620 comm="apparmor_parser" Telcontar:~ # (I had to switch from Thunderbird to Alpine. The former wraps the lines)
--- /etc/apparmor.d/usr.bin.locate 2023-01-19 11:00:57.000000000
If there is an apparmor issue, I think you are looking at the wrong thing. You probably ought to look at 'updatedb'.
Can be both, updatedb and locate. The later checks what permissions has the person that asks, and gives different results based on that. I haven't decided yet which is failing, but I suspect it is updatedb. In any case, what I checked was "aa-logprof", and it said that there were problems with the locate profile or files. I don't remember exactly the wording, but I know I saw the word "locate" somewhere and said AHÁ! :-D
I don't have a 15.4 system, I only have a TW test system with 'locale', but I don't see apparmor complaining about anything related to updatedbd or locate. I updated my own TW test system last night, and it failed to mount root, I'll have to go and fix that.
Ha, that's a more important issue. Me, I'm just having my tea, and preparing to leave for a different location. - -- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCY9uB1hwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVkYkAoJYpb8kDtESge23xJc3L muVBrR4fAJ9859UbGNmNe2KFSn8/iCOioiR/jQ== =+CYq -----END PGP SIGNATURE-----