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

Enable fill | write in dir. #126

Merged
merged 11 commits into from
Jan 17, 2022
Merged

Enable fill | write in dir. #126

merged 11 commits into from
Jan 17, 2022

Conversation

Andrewmatilde
Copy link
Member

If path input of disk attack is a dir, we will create a tmp file in the dir & then exec the action.

Signed-off-by: andrewmatilde <davis6813585853062@outlook.com>
Signed-off-by: andrewmatilde <davis6813585853062@outlook.com>
Signed-off-by: andrewmatilde <davis6813585853062@outlook.com>
Signed-off-by: andrewmatilde <davis6813585853062@outlook.com>
Signed-off-by: andrewmatilde <davis6813585853062@outlook.com>
Signed-off-by: andrewmatilde <davis6813585853062@outlook.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 11, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • WangXiangUSTC
  • cwen0

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@Andrewmatilde
Copy link
Member Author

PTAL @cwen0 @WangXiangUSTC .

Signed-off-by: andrewmatilde <davis6813585853062@outlook.com>
@g1eny0ung g1eny0ung requested review from cwen0 and WangXiangUSTC and removed request for Gallardot and g1eny0ung January 12, 2022 03:21
Copy link
Member

@cwen0 cwen0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@WangXiangUSTC WangXiangUSTC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

pkg/core/disk.go Outdated
if fi.IsDir() {
opt.Path, err = utils.CreateTempFile(opt.Path)
if err != nil {
log.Error(fmt.Sprintf("unexpected err when CreateTempFile in action %s with path %s.", opt.Action, opt.Path))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about adding error information in the log?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK,I agree with you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Signed-off-by: andrewmatilde <davis6813585853062@outlook.com>
@WangXiangUSTC
Copy link
Collaborator

LGTM

@WangXiangUSTC
Copy link
Collaborator

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: e956a32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants