Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Handle symlinks (to files/dirs to be deleted) when using 'cuckoo clean' command #3087

Closed
wants to merge 5 commits into from

Conversation

soutzis
Copy link

@soutzis soutzis commented Aug 13, 2020

What I have added/changed is:

One line of code.

  • The real path of the directory (whether a regular dir or a soft link) is retrieved first and any files/directories will recursively be deleted afterwards.
The goal of my change is:

Enhancement closes #3086

When using $ cuckoo clean, if one of the directories under $CWD/storage/ is a soft-link, then an exception will be thrown and the files/directories that the soft-link points to will not be deleted.

What I have tested about my change is:

Before the change:
image

After the change:
image

When using `cuckoo clean`, if one of the directories under `$CWD/storage/` is a symlink, then an exception will be thrown and the files/directories that the symlink points to will not be deleted.

The change here is one line of code and what it does is: 

- The real path of the directory (whether a regular dir or a soft link) is retrieved first and any files/directories will recursively be deleted afterwards.
Handle symlinks when using 'cuckoo clean'
@soutzis soutzis changed the title Handle symlinks when using 'cuckoo clean' command Handle symlinks when using 'cuckoo clean' command (closes #3086) Aug 15, 2020
@soutzis soutzis changed the title Handle symlinks when using 'cuckoo clean' command (closes #3086) Handle symlinks when using 'cuckoo clean' command ( #3086 fix ) Aug 15, 2020
@soutzis soutzis changed the title Handle symlinks when using 'cuckoo clean' command ( #3086 fix ) closes #3086 Handle symlinks when using 'cuckoo clean' command Aug 15, 2020
@soutzis soutzis changed the title closes #3086 Handle symlinks when using 'cuckoo clean' command Handle symlinks (to files/dirs to be deleted) when using 'cuckoo clean' command Aug 15, 2020
* removes m2crypto and replaces with cryptography

- Uses  https://github.com/pyca/cryptography instead of m2crypto
- Copy of @utkonos' commit (cuckoosandbox#2938)

* Update static.py

* Update requirements.rst
@soutzis soutzis closed this Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using 'cuckoo clean' will not remove any files that symlinks point to
1 participant