-
Notifications
You must be signed in to change notification settings - Fork 270
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
Create test module: Vsftpd #14909
Create test module: Vsftpd #14909
Conversation
Testing vsftpd and lftp with ssl enabled
tests/security/vsftpd/lftp.pm
Outdated
assert_script_run('ls | grep f1.txt'); | ||
|
||
# Upload a file to directory | ||
assert_script_run('touch f2.txt'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you add some context to f1.txt and f2.txt,
and if possible, md5 check for both file should be better
assert_script_run("mkdir -p $ftp_file_path"); | ||
assert_script_run("chown $user:users $ftp_file_path"); | ||
|
||
# New user needs access to ttyS0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change, l suggest you add more comment for the default permission 620, then we need change it
tests/security/vsftpd/vsftpd.pm
Outdated
|
||
select_console 'root-console'; | ||
|
||
# Create a file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add more comments here?
tests/security/vsftpd/lftp.pm
Outdated
enter_cmd('cd files/'); | ||
enter_cmd('ls'); | ||
enter_cmd('put f2.txt'); | ||
enter_cmd('exit'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These codes could be written in a for
loop to avoid repeating?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and we will enhance the code in the future too.
Thank you.
Testing vsftpd and lftp with ssl enabled. There are bugs related to this test module currently. Thus further code enhancement is anticipated when bugs are fixed or discovered acceptable workarounds. Test verification is expected to fail due to those bugs. And testing mechanisms can be enhanced once bugs are fixed.