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

Remove link following in minimize_access file resource #64

Merged

Conversation

rooprob
Copy link
Contributor

@rooprob rooprob commented Aug 27, 2015

This patch resolves Issue: #60

From this page, Ubuntu containing the symlink /usr/bin/X11 -> . is by design:
http://askubuntu.com/questions/191654/why-are-there-infinitely-many-x11-subdirectories-in-usr-bin-x11

This patch removes links => follow to prevent recursing down links. The caller defines the directories to apply the File resource to, so defining the scope. Any files lying in directories outside this scope should not be touched, covering symlink targets outside.

Issue: dev-sec#60

From this page ubuntu linking ```/usr/bin/X11 -> .``` is by design:
http://askubuntu.com/questions/191654/why-are-there-infinitely-many-x11-subdirectories-in-usr-bin-x11

This modification says ```links => follow``` is inappropriate.  The
specification of directories to apply this file resource is good, so it
should cover the desired scope: that any files contained herein should
be set as per the resource. Any files outside, including symlink targets
should be untouched.  Any files which are symlinked to other files
inside will be caught, and any symlinks, self-referential or otherwise,
will be ignored. This would resolve issue 60.
@poolski poolski mentioned this pull request Nov 13, 2015
@rooprob
Copy link
Contributor Author

rooprob commented Nov 20, 2015

Bump!

@poolski
Copy link

poolski commented Feb 17, 2016

Boop!

@rooprob
Copy link
Contributor Author

rooprob commented Mar 6, 2016

What can we do to get this PR to the next step? I'll take any feedback please.

@rooprob
Copy link
Contributor Author

rooprob commented May 19, 2016

No feedback?

@rndmh3ro
Copy link
Member

Sorry, I'm going to take a look this week.

@rndmh3ro
Copy link
Member

I think removing "follow links" is a viable option. Most symlinks in the bin-directories link to binaries in other bin-directories. There are of course symlinks that lie outside a bin-directory, e.g. virtualbox-binaries or systemd-links. These should be handled by the user (maybe we should add an info to the readme, stating that binaries otuside the usual bin-directories should be handled by the user).

However I think these do not justify breaking this task, so I think we should merge this change. @chris-rock, @arlimus what do you think?

@tuxmea
Copy link
Contributor

tuxmea commented May 30, 2016

+1 will merge this evening if noone disagrees.

@ajcrowe
Copy link

ajcrowe commented Aug 1, 2016

@tuxmea is it possible for this be merged?

@tuxmea tuxmea merged commit cde2034 into dev-sec:master Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants