Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize_access to File [/usr/bin] issue #234

Closed
hdep opened this issue Jan 8, 2020 · 5 comments
Closed

Minimize_access to File [/usr/bin] issue #234

hdep opened this issue Jan 8, 2020 · 5 comments
Labels

Comments

@hdep
Copy link
Contributor

hdep commented Jan 8, 2020

Describe the bug

on some system we got :

//server.domain.net//Stage[main]/Os_hardening::Minimize_access/File[/usr/bin]
Failed to generate additional resources using 'eval_generate': No such file or directory @ rb_file_s_stat - /usr/bin/clhsdb

Looking at the file is a symlink :

root@server:/usr/bin# ls -ltr /usr/bin/clhsdb
lrwxrwxrwx 1 root root 24 juil. 30 09:53 /usr/bin/clhsdb -> /etc/alternatives/clhsdb

Expected behavior
should compile without error

Actual behavior

compilation failed

OS / Environment
Debian 9
mod 'hardening-os_hardening', '2.2.5'

Puppet Version

5.5.17

Best regards,

@mcgege mcgege added the bug label Jan 15, 2020
@mcgege
Copy link
Member

mcgege commented Jan 15, 2020

@hdep Does the file /etc/alternatives/clhsdb (link target) exist on the system?

@hdep
Copy link
Contributor Author

hdep commented Jan 17, 2020

Hi,
yes

:~$ ls -ltr /etc/alternatives/clhsdb
lrwxrwxrwx 1 root root 48 oct.  11 15:30 /etc/alternatives/clhsdb -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb

this affects all my server with java.

@mcgege
Copy link
Member

mcgege commented Jan 18, 2020

Well, yes, but this is once again a link :-)
Please check if this second target also exists: ls -l /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb
I remember a similar problem where the (final) link target was not existent ...

@hdep
Copy link
Contributor Author

hdep commented Jan 18, 2020

Oh sorry :)

indeed I never check the full path it is broken links :

root@server:~# ls -la /usr/bin/clhsdb
lrwxrwxrwx 1 root root 24 juil. 30 09:53 /usr/bin/clhsdb -> /etc/alternatives/clhsdb
root@server:~# ls -ltr /etc/alternatives/clhsdb
lrwxrwxrwx 1 root root 48 juil. 30 09:53 /etc/alternatives/clhsdb -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb
root@server:~# ls -ltr /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb
ls: impossible d'accéder à '/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb': Aucun fichier ou dossier de ce type

at least I know why I got this message now...

@mcgege
Copy link
Member

mcgege commented Jan 18, 2020

This is an undocumented feature of this module: Find broken links :-)
I'd like to prevent these Puppet errors, but haven't found a way yet ... If you fix this file link on your system, this error should vanish.

@mcgege mcgege closed this as completed Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants