Apparmor tests
aa_tmp_prof_prepare();
Prepare apparmor profile directory
aa_tmp_prof_verify();
Verify that program can start with temporary profiles and then restore to the enforce status with normal profiles
aa_tmp_prof_clean();
Remove appamor temporary profiles
get_named_profiled();
Get the named profile for an executable program
aa_status_stdout_check();
Check the output of aa-status: if a given profile belongs to a given mode
ip_fetch();
Fetch ip details
setup_mail_server_postfix_dovecot();
Set up mail server with Postfix and Dovecot:
1. Setting Postfix for outgoing mail by: setting hostname and domain, restart rcnetwork services, double check the setting
2. Setting mail sender/recipient as needed
3. Setting Postfix for outgoing mail (SMTP server with Postfix) by: install Postfix by using zypper_call, start Postfix service, set "/etc/postfix/main.cf" file, output the setting for reference, restart Postfix service, output the status for reference
4. Setting Dovecot for ingoing mail by: set the config files $testfile, restart Dovecot service, output the status for reference
send_mail_smtp();
Send mail with telnet SMTP by using script_run_interactive
retrieve_mail_pop3
Retrieve email with POP3 by using script_run_interactive
retrieve_mail_imap();
Retrieve email with IMAP by using script_run_interactive
mariadb_setup();
Set up Mariadb and test account by using zypper_call, assert_script_run, script_run_interactive
adminer_setup();
Set up Web environment for running Adminer by:
use assert_script_run to enable php7 or php8, restart apache2 and mysql
download Adminer and copy it to directory /srv/www/htdocs/adminer/
test Adminer
clean and start Firefox
exit x11 and turn to console
exit xterm
send "ret" key in case of any pop up message
adminer_database_delete();
Log in Adminer, seletct "test" database and delete it
do some operations on web, e.g., log in, select/delete a database
exit x11 and turn to console
upload_logs_mail();
Upload mail warn, err and info logs for reference
pre_run_hook();
Restart auditd and apparmor in root-console
post_fail_hook();
Run post_fail_hook and upload audit logs