<div dir="ltr">Missing your Signed-off-by and Upstream-Status in the patch.<div><br></div><div>Ross</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 14 Jan 2019 at 07:47, He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">admin_tools test group has been removed from upstream. Backport to fix the<br>
following failures.<br>
<br>
at_deny01 1 TFAIL : ltpapicmd.c:188: At denyed user to execute test job<br>
at_allow01 1 TFAIL : ltpapicmd.c:188: At did not allow user to execute job<br>
<br>
Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com" target="_blank">zhe.he@windriver.com</a>&gt;<br>
---<br>
 .../ltp/ltp/0001-Remove-admin_tools-test.patch     | 3037 ++++++++++++++++++++<br>
 meta/recipes-extended/ltp/<a href="http://ltp_20180926.bb" rel="noreferrer" target="_blank">ltp_20180926.bb</a>          |    1 +<br>
 2 files changed, 3038 insertions(+)<br>
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-Remove-admin_tools-test.patch<br>
<br>
diff --git a/meta/recipes-extended/ltp/ltp/0001-Remove-admin_tools-test.patch b/meta/recipes-extended/ltp/ltp/0001-Remove-admin_tools-test.patch<br>
new file mode 100644<br>
index 0000000000..b740f22355<br>
--- /dev/null<br>
+++ b/meta/recipes-extended/ltp/ltp/0001-Remove-admin_tools-test.patch<br>
@@ -0,0 +1,3037 @@<br>
+From 0fc9b8624bea8acfdb408bf5ff4916b1453e3daa Mon Sep 17 00:00:00 2001<br>
+From: Petr Vorel &lt;<a href="mailto:pvorel@suse.cz" target="_blank">pvorel@suse.cz</a>&gt;<br>
+Date: Thu, 27 Sep 2018 16:57:20 +0200<br>
+Subject: [PATCH] Remove admin_tools test<br>
+<br>
+Removing cron, at, su related tests as they don&#39;t really fit into<br>
+&quot;kernel testing&quot;, it&#39;d be better to have them in some &quot;LTP userspace&quot;<br>
+project.<br>
+ACL are considered as &quot;kernel tests&quot;, but it would be easier to write<br>
+something from scratch, thus remove them as well.<br>
+<br>
+Signed-off-by: Petr Vorel &lt;<a href="mailto:pvorel@suse.cz" target="_blank">pvorel@suse.cz</a>&gt;<br>
+Acked-by: Xiao Yang &lt;<a href="mailto:yangx.jy@cn.fujitsu.com" target="_blank">yangx.jy@cn.fujitsu.com</a>&gt;<br>
+Acked-by: Jan Stancek &lt;<a href="mailto:jstancek@redhat.com" target="_blank">jstancek@redhat.com</a>&gt;<br>
+Acked-by: Cyril Hrubis &lt;<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a><br>
+---<br>
+ runtest/admin_tools                             |   9 -<br>
+ runtest/commands                                |   1 -<br>
+ scenario_groups/default                         |   1 -<br>
+ testcases/commands/.gitignore                   |   1 -<br>
+ testcases/commands/at/Makefile                  |  31 --<br>
+ testcases/commands/at/at_allow01                | 188 ---------<br>
+ testcases/commands/at/at_deny01                 | 195 ----------<br>
+ testcases/commands/cron/00_Descriptions.txt     |   4 -<br>
+ testcases/commands/cron/Makefile                |  29 --<br>
+ testcases/commands/cron/README.tests            |  25 --<br>
+ testcases/commands/cron/cron02                  |  80 ----<br>
+ testcases/commands/cron/cron03                  |  83 ----<br>
+ testcases/commands/cron/cron_allow01            | 202 ----------<br>
+ testcases/commands/cron/cron_deny01             | 192 ----------<br>
+ testcases/commands/cron/cron_dirs_check.c       |  44 ---<br>
+ testcases/commands/cron/cron_dirs_checks01      |  46 ---<br>
+ testcases/commands/cron/cron_illegal_cron_lines |  39 --<br>
+ testcases/commands/cron/cron_neg_tests.sh       | 141 -------<br>
+ testcases/commands/cron/cron_pos_tests.sh       | 118 ------<br>
+ testcases/commands/cron/cron_tests.sh           | 276 --------------<br>
+ testcases/commands/su/Makefile                  |  31 --<br>
+ testcases/commands/su/su01                      | 181 ---------<br>
+ testcases/commands/su/su01_s1                   | 486 ------------------------<br>
+ testcases/commands/su/su_set_passwd             |  14 -<br>
+ testcases/kernel/fs/acls/.gitignore             |   2 -<br>
+ testcases/kernel/fs/acls/Makefile               |  40 --<br>
+ testcases/kernel/fs/acls/acl_file_test.c        |  73 ----<br>
+ testcases/kernel/fs/acls/acl_link_test.c        |  56 ---<br>
+ testcases/kernel/fs/acls/acl_test01             | 186 ---------<br>
+ 29 files changed, 2774 deletions(-)<br>
+ delete mode 100644 runtest/admin_tools<br>
+ delete mode 100644 testcases/commands/at/Makefile<br>
+ delete mode 100755 testcases/commands/at/at_allow01<br>
+ delete mode 100755 testcases/commands/at/at_deny01<br>
+ delete mode 100644 testcases/commands/cron/00_Descriptions.txt<br>
+ delete mode 100644 testcases/commands/cron/Makefile<br>
+ delete mode 100644 testcases/commands/cron/README.tests<br>
+ delete mode 100755 testcases/commands/cron/cron02<br>
+ delete mode 100755 testcases/commands/cron/cron03<br>
+ delete mode 100755 testcases/commands/cron/cron_allow01<br>
+ delete mode 100755 testcases/commands/cron/cron_deny01<br>
+ delete mode 100644 testcases/commands/cron/cron_dirs_check.c<br>
+ delete mode 100755 testcases/commands/cron/cron_dirs_checks01<br>
+ delete mode 100644 testcases/commands/cron/cron_illegal_cron_lines<br>
+ delete mode 100755 testcases/commands/cron/cron_neg_tests.sh<br>
+ delete mode 100755 testcases/commands/cron/cron_pos_tests.sh<br>
+ delete mode 100644 testcases/commands/cron/cron_tests.sh<br>
+ delete mode 100644 testcases/commands/su/Makefile<br>
+ delete mode 100755 testcases/commands/su/su01<br>
+ delete mode 100755 testcases/commands/su/su01_s1<br>
+ delete mode 100755 testcases/commands/su/su_set_passwd<br>
+ delete mode 100644 testcases/kernel/fs/acls/.gitignore<br>
+ delete mode 100644 testcases/kernel/fs/acls/Makefile<br>
+ delete mode 100644 testcases/kernel/fs/acls/acl_file_test.c<br>
+ delete mode 100644 testcases/kernel/fs/acls/acl_link_test.c<br>
+ delete mode 100755 testcases/kernel/fs/acls/acl_test01<br>
+<br>
+diff --git a/runtest/admin_tools b/runtest/admin_tools<br>
+deleted file mode 100644<br>
+index 0a46468c8..000000000<br>
+--- a/runtest/admin_tools<br>
++++ /dev/null<br>
+@@ -1,9 +0,0 @@<br>
+-su01 export TCbin=$LTPROOT/testcases/bin;su01<br>
+-#cron01 cron01<br>
+-cron02 cron02<br>
+-cron_deny01 cron_deny01<br>
+-cron_allow01 cron_allow01<br>
+-cron_dirs_checks01 cron_dirs_checks01<br>
+-at_deny01 at_deny01<br>
+-at_allow01 at_allow01<br>
+-acl_test01 acl_test01<br>
+diff --git a/runtest/commands b/runtest/commands<br>
+index ee7e9f440..462633017 100644<br>
+--- a/runtest/commands<br>
++++ b/runtest/commands<br>
+@@ -5,7 +5,6 @@ ldd01 ldd01<br>
+ nm01 nm01<br>
+ file01 file01.sh<br>
+ tar01  tar_tests.sh<br>
+-cron cron_tests.sh<br>
+ logrotate export TCdat=$LTPROOT/testcases/bin; logrotate_tests.sh<br>
+ cpio01 cpio_tests.sh<br>
+ unzip01 unzip01.sh<br>
+diff --git a/scenario_groups/default b/scenario_groups/default<br>
+index 5658a618b..b1739b77e 100644<br>
+--- a/scenario_groups/default<br>
++++ b/scenario_groups/default<br>
+@@ -17,7 +17,6 @@ filecaps<br>
+ cap_bounds<br>
+ fcntl-locktests<br>
+ connectors<br>
+-admin_tools<br>
+ timers<br>
+ power_management_tests<br>
+ numa<br>
+diff --git a/testcases/commands/.gitignore b/testcases/commands/.gitignore<br>
+index 9aa1caf6c..0ed343881 100644<br>
+--- a/testcases/commands/.gitignore<br>
++++ b/testcases/commands/.gitignore<br>
+@@ -1,5 +1,4 @@<br>
+ /ldd/datafiles/lddfile.out<br>
+ /ldd/datafiles/*.obj.so<br>
+-/cron/cron_dirs_check<br>
+ /eject/eject_check_tray<br>
+ /insmod/ltp_insmod01.ko<br>
+diff --git a/testcases/commands/at/Makefile b/testcases/commands/at/Makefile<br>
+deleted file mode 100644<br>
+index ca3fb04fe..000000000<br>
+--- a/testcases/commands/at/Makefile<br>
++++ /dev/null<br>
+@@ -1,31 +0,0 @@<br>
+-#<br>
+-#    commands/at testcases Makefile.<br>
+-#<br>
+-#    Copyright (C) 2009, Cisco Systems Inc.<br>
+-#<br>
+-#    This program is free software; you can redistribute it and/or modify<br>
+-#    it under the terms of the GNU General Public License as published by<br>
+-#    the Free Software Foundation; either version 2 of the License, or<br>
+-#    (at your option) any later version.<br>
+-#<br>
+-#    This program is distributed in the hope that it will be useful,<br>
+-#    but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+-#    GNU General Public License for more details.<br>
+-#<br>
+-#    You should have received a copy of the GNU General Public License along<br>
+-#    with this program; if not, write to the Free Software Foundation, Inc.,<br>
+-#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.<br>
+-#<br>
+-# Ngie Cooper, July 2009<br>
+-#<br>
+-<br>
+-top_srcdir            ?= ../../..<br>
+-<br>
+-include $(top_srcdir)/include/mk/<a href="http://env_pre.mk" rel="noreferrer" target="_blank">env_pre.mk</a><br>
+-<br>
+-INSTALL_TARGETS               := at_allow01 at_deny01<br>
+-<br>
+-MAKE_TARGETS          :=<br>
+-<br>
+-include $(top_srcdir)/include/mk/<a href="http://generic_leaf_target.mk" rel="noreferrer" target="_blank">generic_leaf_target.mk</a><br>
+diff --git a/testcases/commands/at/at_allow01 b/testcases/commands/at/at_allow01<br>
+deleted file mode 100755<br>
+index c0e9335cf..000000000<br>
+--- a/testcases/commands/at/at_allow01<br>
++++ /dev/null<br>
+@@ -1,188 +0,0 @@<br>
+-#!/bin/sh -u<br>
+-#<br>
+-#   Copyright (C) 2008 CAI Qian &lt;<a href="mailto:caiqian@cclom.cn" target="_blank">caiqian@cclom.cn</a>&gt;<br>
+-#   Copyright (c) International Business Machines  Corp., 2003<br>
+-#<br>
+-#   This program is free software; you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful, but<br>
+-#   WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br>
+-#   General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program; if not, write to the Free Software<br>
+-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307<br>
+-#   USA<br>
+-#<br>
+-#   FILE: /etc/at.allow<br>
+-#<br>
+-#   PURPOSE: Test that /etc/at.allow , only allows those in the file to<br>
+-#   run cron jobs.<br>
+-#<br>
+-#   HISTORY:<br>
+-#                04/03 Jerone Young (<a href="mailto:jyoung5@us.ibm.com" target="_blank">jyoung5@us.ibm.com</a>)<br>
+-#<br>
+-<br>
+-export TCID=at_allow01<br>
+-export TST_TOTAL=1<br>
+-export TST_COUNT=1<br>
+-TMP=${TMP:=/tmp}<br>
+-allow=&quot;/etc/at.allow&quot;<br>
+-test_user1=&quot;test_user_1&quot;<br>
+-test_user2=&quot;test_user_2&quot;<br>
+-test_user1_home=&quot;/home/${test_user1}&quot;<br>
+-test_user2_home=&quot;/home/${test_user2}&quot;<br>
+-tmpfile=&quot;$TMP/at_allow_test&quot;<br>
+-<br>
+-if [ &quot;$(id -ru)&quot; = 0 ]; then<br>
+-      . cmdlib.sh<br>
+-fi<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_setup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_setup()<br>
+-{<br>
+-      # Move any files that may get in the way.<br>
+-      rm &quot;${tmpfile}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      mv &quot;${allow}&quot; &quot;${allow}.old&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-<br>
+-      # Remove users for clean enviroment.<br>
+-      rm -rf &quot;${test_user1_home}&quot; &quot;${test_user2_home}&quot;<br>
+-      userdel -r &quot;${test_user1}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      userdel -r &quot;${test_user2}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-<br>
+-      # Create the 1st user.<br>
+-      if ! useradd -g users -d &quot;${test_user1_home}&quot; -m &quot;${test_user1}&quot;; then<br>
+-              echo &quot;Could not add test user ${test_user1} to system.&quot;<br>
+-              exit 1<br>
+-      fi<br>
+-<br>
+-      # Create the 2nd user.<br>
+-      if ! useradd -g users -d &quot;${test_user2_home}&quot; -m &quot;${test_user2}&quot;; then<br>
+-              echo &quot;Could not add test user ${test_user2} to system.&quot;<br>
+-              exit 1<br>
+-      fi<br>
+-<br>
+-      # This is the workaround for a potential bug.<br>
+-      # [Bug 468337] At Refuse to Work with Non-login Shell<br>
+-      # <a href="https://bugzilla.redhat.com/show_bug.cgi?id=468337" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=468337</a><br>
+-      # As we are running in non-login shell now, we cannot run the script<br>
+-      # by simply given it a relative path. Therefore, we copy it to test<br>
+-      # users&#39; home directories, and run it from there.<br>
+-      cp &quot;$0&quot; &quot;${test_user1_home}/.&quot; &amp;&amp;<br>
+-      cp &quot;$0&quot; &quot;${test_user2_home}/.&quot; &amp;&amp;<br>
+-      echo &quot;export LTPROOT=&#39;$LTPROOT&#39;&quot; &gt; &quot;${test_user1_home}/cached_ltproot&quot; &amp;&amp;<br>
+-      echo &quot;export LTPROOT=&#39;$LTPROOT&#39;&quot; &gt; &quot;${test_user2_home}/cached_ltproot&quot;<br>
+-      if [ $? -ne 0 ]; then<br>
+-              tst_resm TBROK &quot;Couldn&#39;t copy over req&#39;d files for test users&quot;<br>
+-              exit 1<br>
+-      fi<br>
+-<br>
+-      restart_daemon atd<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_cleanup<br>
+-#-----------------------------------------------------------------------<br>
+-do_cleanup()<br>
+-{<br>
+-      # We forcefully remove those files anyway. Otherwise userdel may<br>
+-      # give us bad warnings.<br>
+-      rm -rf &quot;${test_user1_home}&quot; &quot;${test_user2_home}&quot;<br>
+-      userdel -r &quot;${test_user1}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      userdel -r &quot;${test_user2}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      rm &quot;${allow}&quot;<br>
+-      mv &quot;${allow}.old&quot; &quot;${allow}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      rm &quot;${tmpfile}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  run_test<br>
+-#-----------------------------------------------------------------------<br>
+-run_test()<br>
+-{<br>
+-      if [ $(whoami) = &quot;${test_user1}&quot; ]; then<br>
+-              . &quot;${test_user1_home}/cached_ltproot&quot; || exit 1<br>
+-              export PATH=&quot;$PATH:$LTPROOT/testcases/bin&quot;<br>
+-<br>
+-              echo &quot;TEST: $allow should allow only those who in the file to run jobs.&quot;<br>
+-              echo &quot;(1) TEST THAT PERSON IN ${allow} IS ABLE TO RUN JOB.&quot;<br>
+-              echo &quot;echo &#39;TEST JOB RAN&#39; &gt;&gt;\&quot;${tmpfile}\&quot; 2&gt;&amp;1&quot; |<br>
+-              if ! at -m now + 1 minutes ; then<br>
+-                      echo &quot;Error while adding job using at for user ${test_user1}.&quot;<br>
+-                      exit 1<br>
+-              fi<br>
+-              echo &quot; Sleeping for 75 seconds....&quot;<br>
+-              sleep 75<br>
+-<br>
+-              exit_code=1<br>
+-              test -e &quot;${tmpfile}&quot; &amp;&amp; exit_code=0<br>
+-              if [ ${exit_code} -eq 1 ]; then<br>
+-                      tst_resm TFAIL &quot;At did not allow user to execute job&quot;<br>
+-              else<br>
+-                      tst_resm TPASS &quot;At allowed user to execute test job&quot;<br>
+-              fi<br>
+-<br>
+-              rm -f &quot;${tmpfile}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-              exit ${exit_code}<br>
+-<br>
+-      elif [ $(whoami) = &quot;${test_user2}&quot; ]; then<br>
+-<br>
+-              . &quot;${test_user2_home}/cached_ltproot&quot; || exit 1<br>
+-              export PATH=&quot;$PATH:$LTPROOT/testcases/bin&quot;<br>
+-<br>
+-              echo &quot;(2) TEST PERSON THAT IS NOT IN ${allow} IS NOT ABLE TO RUN JOB.&quot;<br>
+-<br>
+-              echo &quot;echo &#39;TEST JOB RAN&#39; &gt;&gt;\&quot;${tmpfile}\&quot; 2&gt;&amp;1&quot; |<br>
+-              if ! at -m now + 1 minutes; then<br>
+-                      echo &quot;Expected error while adding job user at for user ${test_user2}&quot;<br>
+-              fi<br>
+-              echo &quot;Sleeping for 75 seconds....&quot;<br>
+-              sleep 75<br>
+-<br>
+-              exit_code=1<br>
+-              test -e &quot;${tmpfile}&quot; || exit_code=0<br>
+-              if [ ${exit_code} -eq 1 ]; then<br>
+-                      tst_resm TFAIL &quot;At allowed user to execute test job&quot;<br>
+-              else<br>
+-                      tst_resm TPASS &quot;At did not allow user to execute job&quot;<br>
+-              fi<br>
+-<br>
+-              rm -f &quot;${tmpfile}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-              exit ${exit_code}<br>
+-<br>
+-      fi<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION: main<br>
+-#-----------------------------------------------------------------------<br>
+-if ! type at &gt; /dev/null; then<br>
+-      tst_resm TCONF &quot;at command not found on system&quot;<br>
+-elif [ &quot;$(id -ru)&quot; = 0 ]; then<br>
+-      if do_setup; then<br>
+-<br>
+-              if ! echo &quot;${test_user1}&quot; &gt;&quot;${allow}&quot;; then<br>
+-                      exit_code=1<br>
+-              elif ! su &quot;${test_user1}&quot; -lc &quot;${test_user1_home}/${0##*/}&quot;; then<br>
+-                      exit_code=1<br>
+-              elif ! su &quot;${test_user2}&quot; -lc &quot;${test_user2_home}/${0##*/}&quot;; then<br>
+-                      exit_code=1<br>
+-              else<br>
+-                      exit_code=0<br>
+-              fi<br>
+-              do_cleanup<br>
+-      else<br>
+-              exit_code=1<br>
+-      fi<br>
+-      exit ${exit_code}<br>
+-else<br>
+-      run_test<br>
+-      exit 0<br>
+-fi<br>
+diff --git a/testcases/commands/at/at_deny01 b/testcases/commands/at/at_deny01<br>
+deleted file mode 100755<br>
+index 176da14f6..000000000<br>
+--- a/testcases/commands/at/at_deny01<br>
++++ /dev/null<br>
+@@ -1,195 +0,0 @@<br>
+-#!/bin/sh -u<br>
+-#<br>
+-#   Copyright (C) 2008 CAI Qian &lt;<a href="mailto:caiqian@cclom.cn" target="_blank">caiqian@cclom.cn</a>&gt;<br>
+-#   Copyright (c) International Business Machines  Corp., 2003<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program.  If not, see &lt;<a href="http://www.gnu.org/licenses/" rel="noreferrer" target="_blank">http://www.gnu.org/licenses/</a>&gt;.<br>
+-#<br>
+-#   FILE: /etc/at.deny<br>
+-#<br>
+-#   PURPOSE: Test that /etc/at.deny , does not allow those in the file<br>
+-#   to run cron jobs.<br>
+-#<br>
+-#   HISTORY:<br>
+-#             04/03 Jerone Young (<a href="mailto:jyoung5@us.ibm.com" target="_blank">jyoung5@us.ibm.com</a>)<br>
+-#<br>
+-<br>
+-export TCID=at_deny01<br>
+-export TST_TOTAL=1<br>
+-export TST_COUNT=1<br>
+-TMP=${TMP:=/tmp}<br>
+-deny=&quot;/etc/at.deny&quot;<br>
+-test_user1=&quot;test_user_1&quot;<br>
+-test_user2=&quot;test_user_2&quot;<br>
+-test_user1_home=&quot;/home/${test_user1}&quot;<br>
+-test_user2_home=&quot;/home/${test_user2}&quot;<br>
+-tmpfile=&quot;$TMP/at_deny_test&quot;<br>
+-<br>
+-if [ &quot;$(id -ru)&quot; = 0 ]; then<br>
+-      . cmdlib.sh<br>
+-fi<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_setup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_setup()<br>
+-{<br>
+-      # Move any files that may get in the way.<br>
+-      rm &quot;${tmpfile}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      mv &quot;${deny}&quot; &quot;${deny}.old&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-<br>
+-      # if /etc/at.allow is there, /etc/at.deny will be ignored. So, we<br>
+-      # need to remove it first.<br>
+-      if [ -f &quot;/etc/at.allow&quot; ]; then<br>
+-              mv /etc/at.allow /etc/at.allow.old<br>
+-      fi<br>
+-<br>
+-      # Remove users for clean enviroment.<br>
+-      rm -rf &quot;${test_user1_home}&quot; &quot;${test_user2_home}&quot;<br>
+-      userdel -r &quot;${test_user1}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      userdel -r &quot;${test_user2}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-<br>
+-      # Create the 1st user.<br>
+-      if ! useradd -g users -d &quot;${test_user1_home}&quot; -m &quot;${test_user1}&quot;; then<br>
+-              echo &quot;Could not add test user ${test_user1} to system.&quot;<br>
+-              exit 1<br>
+-      fi<br>
+-<br>
+-      # Create the 2nd user.<br>
+-      if ! useradd -g users -d &quot;${test_user2_home}&quot; -m &quot;${test_user2}&quot;; then<br>
+-              echo &quot;Could not add test user ${test_user2} to system.&quot;<br>
+-              exit 1<br>
+-      fi<br>
+-<br>
+-      # This is the workaround for a potential bug.<br>
+-      # [Bug 468337] At Refuse to Work with Non-login Shell<br>
+-      # <a href="https://bugzilla.redhat.com/show_bug.cgi?id=468337" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=468337</a><br>
+-      # As we are running in non-login shell now, we cannot run the script<br>
+-      # by simply given it a relative path. Therefore, we copy it to test<br>
+-      # users&#39; home directories, and run it from there.<br>
+-      cp &quot;$0&quot; &quot;${test_user1_home}/.&quot; &amp;&amp;<br>
+-      cp &quot;$0&quot; &quot;${test_user2_home}/.&quot; &amp;&amp;<br>
+-      echo &quot;export LTPROOT=&#39;$LTPROOT&#39;&quot; &gt; &quot;${test_user1_home}/cached_ltproot&quot; &amp;&amp;<br>
+-      echo &quot;export LTPROOT=&#39;$LTPROOT&#39;&quot; &gt; &quot;${test_user2_home}/cached_ltproot&quot;<br>
+-      if [ $? -ne 0 ]; then<br>
+-              tst_resm TBROK &quot;Couldn&#39;t copy over req&#39;d files for test users&quot;<br>
+-              exit 1<br>
+-      fi<br>
+-<br>
+-      restart_daemon atd<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_cleanup<br>
+-#-----------------------------------------------------------------------<br>
+-do_cleanup()<br>
+-{<br>
+-      # We forcefully remove those files anyway. Otherwise userdel may<br>
+-      # give us bad warnings.<br>
+-      rm -rf &quot;${test_user1_home}&quot; &quot;${test_user2_home}&quot;<br>
+-      userdel -r &quot;${test_user1}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      userdel -r &quot;${test_user2}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      rm &quot;${deny}&quot;<br>
+-      mv &quot;${deny}.old&quot; &quot;${deny}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-      rm &quot;${tmpfile}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-<br>
+-      if [ -f /etc/at.allow.old ]; then<br>
+-              mv /etc/at.allow.old /etc/at.allow<br>
+-      fi<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  run_test<br>
+-#-----------------------------------------------------------------------<br>
+-run_test()<br>
+-{<br>
+-      if [ $(whoami) = &quot;${test_user1}&quot; ]; then<br>
+-              . &quot;${test_user1_home}/cached_ltproot&quot; || exit 1<br>
+-              export PATH=&quot;$PATH:$LTPROOT/testcases/bin&quot;<br>
+-<br>
+-              echo &quot;TEST: ${deny} should deny only those who are not in the file to run jobs.&quot;<br>
+-              echo &quot;(1) TEST THAT PERSON NOT IN ${deny} IS ABLE TO RUN JOB.&quot;<br>
+-              echo &quot;echo &#39;TEST JOB RAN&#39; &gt;&gt;\&quot;${tmpfile}\&quot; 2&gt;&amp;1&quot; |<br>
+-              if ! at -m now + 1 minutes; then<br>
+-                      echo &quot;Error while adding job using at for user ${test_user1}.&quot;<br>
+-                      exit 1<br>
+-              fi<br>
+-              echo &quot; Sleeping for 75 seconds....&quot;<br>
+-              sleep 75<br>
+-<br>
+-              exit_code=1<br>
+-              test -e &quot;${tmpfile}&quot; &amp;&amp; exit_code=0<br>
+-              if [ ${exit_code} -eq 1 ]; then<br>
+-                      tst_resm TFAIL &quot;At denyed user to execute test job&quot;<br>
+-              else<br>
+-                      tst_resm TPASS &quot;At did not deny user to execute job&quot;<br>
+-              fi<br>
+-<br>
+-              rm -f &quot;${tmpfile}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-              exit ${exit_code}<br>
+-<br>
+-      elif [ $(whoami) = &quot;${test_user2}&quot; ]; then<br>
+-<br>
+-              . &quot;${test_user2_home}/cached_ltproot&quot; || exit 1<br>
+-              export PATH=&quot;$PATH:$LTPROOT/testcases/bin&quot;<br>
+-<br>
+-              echo &quot;(2) TEST THAT PERSON IN ${deny} IS NOT ABLE TO RUN JOB.&quot;<br>
+-<br>
+-              echo &quot;echo &#39;TEST JOB RAN&#39; &gt;&gt;\&quot;${tmpfile}\&quot; 2&gt;&amp;1&quot; |<br>
+-              if ! at -m now + 1 minutes; then<br>
+-                      echo &quot;Expected error while adding job user at for user ${test_user2}&quot;<br>
+-              fi<br>
+-              echo &quot;Sleeping for 75 seconds....&quot;<br>
+-              sleep 75<br>
+-<br>
+-              exit_code=1<br>
+-              test -e &quot;${tmpfile}&quot; || exit_code=0<br>
+-              if [ ${exit_code} -eq 1 ]; then<br>
+-                      echo &quot;At did not deny user to execute job, TEST FAILED.&quot;<br>
+-              else<br>
+-                      echo &quot;At denyed user to execute test job, TEST PASSED.&quot;<br>
+-              fi<br>
+-<br>
+-              rm -f &quot;${tmpfile}&quot; &gt;/dev/null 2&gt;&amp;1<br>
+-              exit ${exit_code}<br>
+-<br>
+-      fi<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION: main<br>
+-#-----------------------------------------------------------------------<br>
+-if ! type at &gt; /dev/null; then<br>
+-      tst_resm TCONF &quot;at command not found on system&quot;<br>
+-elif [ &quot;$(id -ru)&quot; = 0 ]; then<br>
+-      if do_setup ; then<br>
+-              if ! echo &quot;${test_user2}&quot; &gt;&quot;${deny}&quot;; then<br>
+-                      exit_code=1<br>
+-              elif ! su &quot;${test_user1}&quot; -lc &quot;${test_user1_home}/${0##*/}&quot;; then<br>
+-                      exit_code=1<br>
+-              elif ! su &quot;${test_user2}&quot; -lc &quot;${test_user2_home}/${0##*/}&quot;; then<br>
+-                      exit_code=1<br>
+-              else<br>
+-                      exit_code=0<br>
+-              fi<br>
+-              do_cleanup<br>
+-      else<br>
+-              exit_code=1<br>
+-      fi<br>
+-      exit ${exit_code}<br>
+-else<br>
+-      run_test<br>
+-      exit 0<br>
+-fi<br>
+diff --git a/testcases/commands/cron/00_Descriptions.txt b/testcases/commands/cron/00_Descriptions.txt<br>
+deleted file mode 100644<br>
+index 9566e0aaa..000000000<br>
+--- a/testcases/commands/cron/00_Descriptions.txt<br>
++++ /dev/null<br>
+@@ -1,4 +0,0 @@<br>
+-cron01<br>
+-      Test that crontab &lt;filename&gt; installs the cron-job-file and cron will<br>
+-      schedule the job correctly.<br>
+-<br>
+diff --git a/testcases/commands/cron/Makefile b/testcases/commands/cron/Makefile<br>
+deleted file mode 100644<br>
+index 4969ec7bb..000000000<br>
+--- a/testcases/commands/cron/Makefile<br>
++++ /dev/null<br>
+@@ -1,29 +0,0 @@<br>
+-#<br>
+-#    commands/cron testcases Makefile.<br>
+-#<br>
+-#    Copyright (C) 2009, Cisco Systems Inc.<br>
+-#<br>
+-#    This program is free software; you can redistribute it and/or modify<br>
+-#    it under the terms of the GNU General Public License as published by<br>
+-#    the Free Software Foundation; either version 2 of the License, or<br>
+-#    (at your option) any later version.<br>
+-#<br>
+-#    This program is distributed in the hope that it will be useful,<br>
+-#    but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+-#    GNU General Public License for more details.<br>
+-#<br>
+-#    You should have received a copy of the GNU General Public License along<br>
+-#    with this program; if not, write to the Free Software Foundation, Inc.,<br>
+-#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.<br>
+-#<br>
+-# Ngie Cooper, July 2009<br>
+-#<br>
+-<br>
+-top_srcdir            ?= ../../..<br>
+-<br>
+-include $(top_srcdir)/include/mk/<a href="http://env_pre.mk" rel="noreferrer" target="_blank">env_pre.mk</a><br>
+-<br>
+-INSTALL_TARGETS               := cron0[23] cron_illegal_cron_lines cron_allow01 cron_deny01 cron_dirs_checks01 *.sh<br>
+-<br>
+-include $(top_srcdir)/include/mk/<a href="http://generic_leaf_target.mk" rel="noreferrer" target="_blank">generic_leaf_target.mk</a><br>
+diff --git a/testcases/commands/cron/README.tests b/testcases/commands/cron/README.tests<br>
+deleted file mode 100644<br>
+index 0d5db7113..000000000<br>
+--- a/testcases/commands/cron/README.tests<br>
++++ /dev/null<br>
+@@ -1,25 +0,0 @@<br>
+-This directory contains two scripts and one data file to test cron. Both<br>
+-shouldn&#39;t be run as root but they warn for themselves. If a username is<br>
+-given as parameter they run as this user.<br>
+-<br>
+-Both scripts save the current crontab and restore it after finishing.<br>
+-<br>
+-* Positive tests<br>
+-<br>
+-      cron_pos_tests.sh [username]<br>
+-<br>
+-      - add new job<br>
+-      - check correct execution of job<br>
+-      - delete job<br>
+-<br>
+-* Negative tests<br>
+-<br>
+-      cron_neg_tests.sh [username]<br>
+-<br>
+-      - try to edit the crontab of root<br>
+-      - try to set illegal or nondefined execution times<br>
+-        Here the script uses file illegal_cron_lines which contains two<br>
+-        fields per line: the cron line to be tested (without script name),<br>
+-        and the description of this test. The description is written to<br>
+-        stdout during execution of the test.<br>
+-      - try to do things you aren&#39;t allowed as non-root (cron runs as root)<br>
+diff --git a/testcases/commands/cron/cron02 b/testcases/commands/cron/cron02<br>
+deleted file mode 100755<br>
+index 16b425de3..000000000<br>
+--- a/testcases/commands/cron/cron02<br>
++++ /dev/null<br>
+@@ -1,80 +0,0 @@<br>
+-#!/bin/sh<br>
+-#*********************************************************************<br>
+-#   Copyright (c) International Business Machines  Corp., 2000<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program;  if not, write to the Free Software<br>
+-#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<br>
+-#<br>
+-#  FILE   : cron02<br>
+-#<br>
+-#  PURPOSE: Test a postive cron job<br>
+-#                     - add new job<br>
+-#             - check correct execution of job<br>
+-#             - delete job<br>
+-#<br>
+-#  HISTORY:<br>
+-#             SUSE<br>
+-#<br>
+-<br>
+-TEST_USER=&quot;c01_user&quot;<br>
+-TEST_USER_GROUP=&quot;users&quot;<br>
+-TEST_USER_HOMEDIR=&quot;/home/$TEST_USER&quot;<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_setup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_setup(){<br>
+-      #erase any data from potential defunt cron test<br>
+-      rm -rf /tmp/crontest &gt; /dev/null 2&gt;&amp;1<br>
+-<br>
+-    #erase user if he may exist , so we can have a clean env<br>
+-        rm -rf /home/$TEST_USER<br>
+-        userdel $TEST_USER<br>
+-      sleep 1<br>
+-<br>
+-        useradd -m -g $TEST_USER_GROUP $TEST_USER<br>
+-        if [ $? != 0 ]<br>
+-        then {<br>
+-                echo &quot;Could not add test user $TEST_USER to system $RHOST.&quot;<br>
+-                exit 1<br>
+-        }<br>
+-        fi<br>
+-<br>
+-      if [ -n &quot;$CROND_DAEMON&quot; ]; then<br>
+-              restart_daemon $CROND_DAEMON<br>
+-      else<br>
+-              tst_brkm TBROK &quot;Couldn&#39;t find crond or cron&quot;<br>
+-      fi<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_cleanup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_cleanup(){<br>
+-        rm -rf /home/$TEST_USER<br>
+-        userdel $TEST_USER<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  MAIN<br>
+-#-----------------------------------------------------------------------<br>
+-. cmdlib.sh<br>
+-<br>
+-do_setup<br>
+-cron_pos_tests.sh $TEST_USER<br>
+-EXIT_CODE=$?<br>
+-do_cleanup<br>
+-exit $EXIT_CODE<br>
+diff --git a/testcases/commands/cron/cron03 b/testcases/commands/cron/cron03<br>
+deleted file mode 100755<br>
+index 7ba7bf40c..000000000<br>
+--- a/testcases/commands/cron/cron03<br>
++++ /dev/null<br>
+@@ -1,83 +0,0 @@<br>
+-#!/bin/sh<br>
+-#*********************************************************************<br>
+-#   Copyright (c) International Business Machines  Corp., 2000<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program;  if not, write to the Free Software<br>
+-#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<br>
+-#<br>
+-#  FILE   : cron<br>
+-#<br>
+-#  PURPOSE: Test a bad (negative) cron job<br>
+-#                     - try to edit the crontab of root<br>
+-#             - try to set illegal or nondefined execution times<br>
+-#                       Here the script uses file illegal_cron_lines which contains two<br>
+-#                       fields per line: the cron line to be tested (without script name),<br>
+-#                       and the description of this test. The description is written to<br>
+-#                       stdout during execution of the test.<br>
+-#             - try to do things you aren&#39;t allowed as non-root (cron runs as root)<br>
+-<br>
+-#<br>
+-#  HISTORY:<br>
+-#             SUSE<br>
+-#<br>
+-<br>
+-<br>
+-TEST_USER=&quot;c02_user&quot;<br>
+-TEST_USER_GROUP=&quot;users&quot;<br>
+-TEST_USER_HOMEDIR=&quot;/home/$TEST_USER&quot;<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_setup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_setup(){<br>
+-<br>
+-    #erase user if he may exist , so we can have a clean env<br>
+-        rm -rf /home/$TEST_USER<br>
+-        userdel $TEST_USER<br>
+-      sleep 1<br>
+-<br>
+-        useradd -m -g $TEST_USER_GROUP $TEST_USER<br>
+-        if [ $? != 0 ]<br>
+-        then {<br>
+-                echo &quot;Could not add test user $TEST_USER to system $RHOST.&quot;<br>
+-                exit 1<br>
+-        }<br>
+-        fi<br>
+-        # restart cron daemon<br>
+-      # Red Hat uses crond, SuSE/Other uses cron.<br>
+-      if [ -f /etc/init.d/crond ]; then<br>
+-              /etc/init.d/crond restart<br>
+-      else<br>
+-              /etc/init.d/cron restart<br>
+-      fi<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_cleanup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_cleanup(){<br>
+-        rm -rf /home/$TEST_USER<br>
+-        userdel $TEST_USER<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  MAIN<br>
+-#-----------------------------------------------------------------------<br>
+-do_setup<br>
+-cron_neg_tests.sh $TEST_USER<br>
+-EXIT_CODE=$?<br>
+-do_cleanup<br>
+-exit $EXIT_CODE<br>
+diff --git a/testcases/commands/cron/cron_allow01 b/testcases/commands/cron/cron_allow01<br>
+deleted file mode 100755<br>
+index 9a5e4d240..000000000<br>
+--- a/testcases/commands/cron/cron_allow01<br>
++++ /dev/null<br>
+@@ -1,202 +0,0 @@<br>
+-#!/bin/bash<br>
+-#<br>
+-#   Copyright (c) International Business Machines  Corp., 2003<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program;  if not, write to the Free Software<br>
+-#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<br>
+-#<br>
+-#     FILE: /var/spool/cron/allow<br>
+-#<br>
+-#     PURPOSE: Test that /var/spool/cron/allow , only allows those in the file to run cron jobs.<br>
+-#<br>
+-#     HISTORY:<br>
+-#             04/03 Jerone Young (<a href="mailto:jyoung5@us.ibm.com" target="_blank">jyoung5@us.ibm.com</a>)<br>
+-#<br>
+-<br>
+-echo &quot;This script contains bashism that needs to be fixed!&quot;<br>
+-<br>
+-iam=`whoami`<br>
+-<br>
+-tvar=${MACHTYPE%-*}<br>
+-tvar=${tvar#*-}<br>
+-<br>
+-if [ &quot;$tvar&quot; = &quot;redhat&quot; -o &quot;$tvar&quot; = &quot;redhat-linux&quot; ]<br>
+-then<br>
+-CRON_ALLOW=&quot;/etc/cron.allow&quot;<br>
+-else<br>
+-CRON_ALLOW=&quot;/var/spool/cron/allow&quot;<br>
+-fi<br>
+-<br>
+-TEST_USER1=&quot;ca_user1&quot;<br>
+-TEST_USER1_HOME=&quot;/home/$TEST_USER1&quot;<br>
+-TEST_USER2=&quot;ca_user2&quot;<br>
+-TEST_USER2_HOME=&quot;/home/$TEST_USER2&quot;<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_setup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_setup() {<br>
+-      #move any files that may get in the way<br>
+-      rm /tmp/cron_allow_test &gt; /dev/null 2&gt;&amp;1<br>
+-      rm /tmp/cron_allow_test1 &gt; /dev/null 2&gt;&amp;1<br>
+-      mv $CRON_ALLOW $CRON_ALLOW.old &gt; /dev/null 2&gt;&amp;1<br>
+-<br>
+-      #remove users for clean enviroment<br>
+-    su $TEST_USER1 -c &quot;crontab -r&quot;<br>
+-    su $TEST_USER2 -c &quot;crontab -r&quot;<br>
+-        rm -rf /home/$TEST_USER1<br>
+-        rm -rf /home/$TEST_USER2<br>
+-      userdel $TEST_USER1<br>
+-      userdel $TEST_USER2<br>
+-      sleep 1<br>
+-<br>
+-#create 1st user<br>
+-      useradd -m -g users $TEST_USER1<br>
+-      if [ $? != 0 ]<br>
+-    then {<br>
+-        echo &quot;Could not add test user $TEST_USER1 to system.&quot;<br>
+-        exit 1<br>
+-    }<br>
+-    fi<br>
+-<br>
+-#create 2nd user<br>
+-      useradd -m -g users $TEST_USER2<br>
+-    if [ $? != 0 ]<br>
+-    then {<br>
+-        echo &quot;Could not add test user $TEST_USER2 to system.&quot;<br>
+-        exit 1<br>
+-    }<br>
+-    fi<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_cleanup<br>
+-#-----------------------------------------------------------------------<br>
+-do_cleanup(){<br>
+-    su $TEST_USER1 -c &quot;crontab -r&quot;<br>
+-    su $TEST_USER2 -c &quot;crontab -r&quot;<br>
+-        rm -rf /home/$TEST_USER1<br>
+-        rm -rf /home/$TEST_USER2<br>
+-      userdel $TEST_USER1<br>
+-      userdel $TEST_USER2<br>
+-      rm $CRON_ALLOW<br>
+-      mv $CRON_ALLOW.old $CRON_ALLOW &gt; /dev/null 2&gt;&amp;1<br>
+-      rm /tmp/cron_allow_test &gt;/dev/null 2&gt;&amp;1<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  run_test<br>
+-#-----------------------------------------------------------------------<br>
+-run_test() {<br>
+-<br>
+-if [ $iam = $TEST_USER1 ]<br>
+-then<br>
+-      echo &quot;TEST: $CRON_ALLOW should only allow those in the file to<br>
+-run cron jobs.&quot;<br>
+-<br>
+-      echo &quot;(1) TEST THAT PERSON IN $CRON_ALLOW IS ABLE TO RUN JOB.&quot;<br>
+-<br>
+-      echo &quot;backup crontab....&quot;<br>
+-    crontab -l | grep &#39;^[^#]&#39; &gt; /tmp/crontab-cronallow-save-$iam<br>
+-<br>
+-      crontab - &lt;&lt; EOF<br>
+-        `date &#39;+%M&#39; | awk &#39;{ORS=&quot;&quot;; print ($1+2)%60 &quot; * * * * &quot;}&#39;` echo &quot;TEST JOB RAN&quot; &gt;&gt; /tmp/cron_allow_test 2&gt;&amp;1<br>
+-EOF<br>
+-      if [ $? != 0 ]; then<br>
+-      echo Error while adding crontab for user $TEST_USER1<br>
+-      exit 1<br>
+-      fi<br>
+-<br>
+-      echo &quot;sleeping for 130 seconds....&quot;<br>
+-      sleep 130<br>
+-<br>
+-      EXIT_CODE=1<br>
+-      test -e /tmp/cron_allow_test &amp;&amp; EXIT_CODE=0<br>
+-<br>
+-      if [ $EXIT_CODE = 1 ]; then<br>
+-              echo &quot;Cron did not allow user to execute job , TEST FAILED&quot;<br>
+-      else<br>
+-              echo &quot;Cron allowed user to execute test job, TEST PASSED&quot;<br>
+-      fi<br>
+-<br>
+-       echo &quot;restore old crontab...&quot;<br>
+-     crontab /tmp/crontab-cronallow-save-$iam<br>
+-     rm -f /tmp/crontab-cronallow-save-$iam<br>
+-<br>
+-<br>
+-      rm -f /tmp/cron_allow_test<br>
+-<br>
+-      exit $EXIT_CODE<br>
+-fi<br>
+-<br>
+-if [ $iam = $TEST_USER2 ]<br>
+-then<br>
+-        echo &quot;(2) TEST THAT PERSON NOT IN $CRON_ALLOW IS NOT ABLE TO RUN JOB.&quot;<br>
+-<br>
+-              echo &quot;backup crontab....&quot;<br>
+-      crontab -l | grep &#39;^[^#]&#39; &gt; /tmp/crontab-cronallow-save-$iam<br>
+-<br>
+-        crontab - &lt;&lt; EOF<br>
+-        `date &#39;+%M&#39; | awk &#39;{ORS=&quot;&quot;; print ($1+2)%60 &quot; * * * * &quot;}&#39;` echo &quot;TEST JOB RAN&quot; &gt;&gt; /tmp/cron_allow_test1 2&gt;&amp;1<br>
+-EOF<br>
+-        if [ $? != 0 ]; then<br>
+-        echo Error while adding crontab for user $TEST_USER2<br>
+-        fi<br>
+-<br>
+-        echo &quot;sleeping for 130 seconds....&quot;<br>
+-        sleep 130<br>
+-<br>
+-        EXIT_CODE=0<br>
+-        test -e /tmp/cron_allow_test1 &amp;&amp; EXIT_CODE=1<br>
+-<br>
+-        if [ $EXIT_CODE = 0 ]; then<br>
+-                echo &quot;Cron did not allow user to execute job , TEST PASSED&quot;<br>
+-        else<br>
+-                echo &quot;Cron allowed user to execute test job, TEST FAILED&quot;<br>
+-        fi<br>
+-<br>
+-              echo &quot;restore old crontab...&quot;<br>
+-      crontab /tmp/crontab-cronallow-save-$iam<br>
+-      rm -f /tmp/crontab-cronallow-save-$iam<br>
+-<br>
+-        rm -f /tmp/cron_allow_test1<br>
+-<br>
+-        exit $EXIT_CODE<br>
+-fi<br>
+-<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION: main<br>
+-#-----------------------------------------------------------------------<br>
+-if [ $iam = &quot;root&quot; ]<br>
+-then<br>
+-      do_setup<br>
+-      echo $TEST_USER1 &gt; $CRON_ALLOW<br>
+-      EXIT_CODE=0<br>
+-      su $TEST_USER1 -c &quot;$0&quot;<br>
+-      if [ $? != 0 ]<br>
+-      then<br>
+-         EXIT_CODE=1<br>
+-      fi<br>
+-      su $TEST_USER2 -c &quot;$0&quot;<br>
+-      if [ $? != 0 ]<br>
+-      then EXIT_CODE=1<br>
+-      fi<br>
+-      do_cleanup<br>
+-      exit $EXIT_CODE<br>
+-else<br>
+-      run_test<br>
+-fi<br>
+diff --git a/testcases/commands/cron/cron_deny01 b/testcases/commands/cron/cron_deny01<br>
+deleted file mode 100755<br>
+index 9d3203925..000000000<br>
+--- a/testcases/commands/cron/cron_deny01<br>
++++ /dev/null<br>
+@@ -1,192 +0,0 @@<br>
+-#!/bin/bash<br>
+-#<br>
+-#   Copyright (c) International Business Machines  Corp., 2003<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program;  if not, write to the Free Software<br>
+-#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<br>
+-#<br>
+-#     FILE: /var/spool/cron/allow<br>
+-#<br>
+-#     PURPOSE: Test that /var/spool/cron/deny , does not allow those in the file to run cron jobs.<br>
+-#<br>
+-#     HISTORY:<br>
+-#             04/03 Jerone Young (<a href="mailto:jyoung5@us.ibm.com" target="_blank">jyoung5@us.ibm.com</a>)<br>
+-#<br>
+-<br>
+-echo &quot;This script contains bashism that needs to be fixed!&quot;<br>
+-<br>
+-iam=`whoami`<br>
+-<br>
+-tvar=${MACHTYPE%-*}<br>
+-tvar=${tvar#*-}<br>
+-<br>
+-if [ &quot;$tvar&quot; = &quot;redhat&quot; -o &quot;$tvar&quot; = &quot;redhat-linux&quot; ]<br>
+-then<br>
+-CRON_DENY=&quot;/etc/cron.deny&quot;<br>
+-CRON_ALLOW=&quot;/etc/cron.allow&quot;<br>
+-else<br>
+-CRON_DENY=&quot;/var/spool/cron/deny&quot;<br>
+-CRON_ALLOW=&quot;/var/spool/cron/allow&quot;<br>
+-fi<br>
+-<br>
+-TEST_USER1=&quot;cd_user1&quot;<br>
+-TEST_USER1_HOME=&quot;/home/$TEST_USER1&quot;<br>
+-TEST_USER2=&quot;cd_user2&quot;<br>
+-TEST_USER2_HOME=&quot;/home/$TEST_USER2&quot;<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_setup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_setup() {<br>
+-      #move any files that may get in the way<br>
+-      rm /tmp/cron_deny_test &gt; /dev/null 2&gt;&amp;1<br>
+-        rm /tmp/cron_deny_test1 &gt; /dev/null 2&gt;&amp;1<br>
+-<br>
+-      mv $CRON_DENY $CRON_DENY.old &gt; /dev/null 2&gt;&amp;1<br>
+-      mv $CRON_ALLOW $CRON_ALLOW.old &gt; /dev/null 2&gt;&amp;1<br>
+-<br>
+-      #remove users for clean enviroment<br>
+-    su $TEST_USER1 -c &quot;crontab -r&quot;<br>
+-    su $TEST_USER2 -c &quot;crontab -r&quot;<br>
+-        rm -rf /home/$TEST_USER1<br>
+-        rm -rf /home/$TEST_USER2<br>
+-      userdel $TEST_USER1<br>
+-      userdel $TEST_USER2<br>
+-      sleep 1<br>
+-<br>
+-#create 1st user<br>
+-      useradd -m -g users $TEST_USER1<br>
+-      if [ $? != 0 ]<br>
+-    then {<br>
+-        echo &quot;Could not add test user $TEST_USER1 to system.&quot;<br>
+-        exit 1<br>
+-    }<br>
+-    fi<br>
+-<br>
+-#create 2nd user<br>
+-      useradd -m -g users $TEST_USER2<br>
+-    if [ $? != 0 ]<br>
+-    then {<br>
+-        echo &quot;Could not add test user $TEST_USER2 to system.&quot;<br>
+-        exit 1<br>
+-    }<br>
+-    fi<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_cleanup<br>
+-#-----------------------------------------------------------------------<br>
+-do_cleanup(){<br>
+-    su $TEST_USER1 -c &quot;crontab -r&quot;<br>
+-    su $TEST_USER2 -c &quot;crontab -r&quot;<br>
+-        rm -rf /home/$TEST_USER1<br>
+-        rm -rf /home/$TEST_USER2<br>
+-      userdel $TEST_USER1<br>
+-      userdel $TEST_USER2<br>
+-      rm $CRON_DENY<br>
+-      mv $CRON_DENY.old $CRON_DENY &gt; /dev/null 2&gt;&amp;1<br>
+-      mv $CRON_ALLOW.old $CRON_ALLOW &gt; /dev/null 2&gt;&amp;1<br>
+-      rm /tmp/cron_allow_test &gt;/dev/null 2&gt;&amp;1<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  run_test<br>
+-#-----------------------------------------------------------------------<br>
+-run_test() {<br>
+-<br>
+-if [ $iam = $TEST_USER1 ]<br>
+-then<br>
+-      echo &quot;TEST: $CRON_DENY should allow only allow those who are not in the file to<br>
+-run cron jobs.&quot;<br>
+-<br>
+-      echo &quot;(1) TEST THAT PERSON NOT IN $CRON_DENY IS ABLE TO RUN JOB.&quot;<br>
+-<br>
+-      crontab - &lt;&lt; EOF<br>
+-      `date &#39;+%M&#39; | awk &#39;{ORS=&quot;&quot;; print ($1+2)%60&quot; * * * * &quot;}&#39;` echo &quot;TEST JOB RAN&quot; &gt;&gt; /tmp/cron_deny_test 2&gt;&amp;1<br>
+-EOF<br>
+-      if [ $? != 0 ]; then<br>
+-      echo Error while adding crontab for user $TEST_USER1<br>
+-      exit 1<br>
+-      fi<br>
+-<br>
+-      echo &quot;sleeping for 130 seconds....&quot;<br>
+-      sleep 130<br>
+-<br>
+-      EXIT_CODE=1<br>
+-      test -e /tmp/cron_deny_test &amp;&amp; EXIT_CODE=0<br>
+-<br>
+-      if [ $EXIT_CODE = 1 ]; then<br>
+-              echo &quot;Cron did not allow user to execute job , TEST FAILED&quot;<br>
+-      else<br>
+-              echo &quot;Cron allowed user to execute test job, TEST PASSED&quot;<br>
+-      fi<br>
+-<br>
+-      rm -f /tmp/cron_deny_test<br>
+-<br>
+-      exit $EXIT_CODE<br>
+-fi<br>
+-<br>
+-if [ $iam = $TEST_USER2 ]<br>
+-then<br>
+-        echo &quot;(2) TEST THAT PERSON IN $CRON_DENY IS NOT ABLE TO RUN JOB.&quot;<br>
+-<br>
+-        crontab - &lt;&lt; EOF<br>
+-        `date &#39;+%M&#39; | awk &#39;{ORS=&quot;&quot;; print ($1+2)%60 &quot; * * * * &quot;}&#39;` echo &quot;TEST JOB RAN&quot; &gt;&gt; /tmp/cron_deny_test 2&gt;&amp;1<br>
+-EOF<br>
+-        if [ $? != 0 ]; then<br>
+-        echo Error while adding crontab for user $TEST_USER2<br>
+-        fi<br>
+-<br>
+-        echo &quot;sleeping for 130 seconds....&quot;<br>
+-        sleep 130<br>
+-<br>
+-        EXIT_CODE=0<br>
+-        test -e /tmp/cron_deny_test1 &amp;&amp; EXIT_CODE=1<br>
+-<br>
+-        if [ $EXIT_CODE = 0 ]; then<br>
+-                echo &quot;Cron did not allow user to execute job , TEST PASSED&quot;<br>
+-        else<br>
+-                echo &quot;Cron allowed user to execute test job, TEST FAILED&quot;<br>
+-        fi<br>
+-<br>
+-        rm -f /tmp/cron_deny_test1<br>
+-<br>
+-        exit $EXIT_CODE<br>
+-fi<br>
+-<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION: main<br>
+-#-----------------------------------------------------------------------<br>
+-if [ $iam = &quot;root&quot; ]<br>
+-then<br>
+-      do_setup<br>
+-      echo $TEST_USER2 &gt; $CRON_DENY<br>
+-      EXIT_CODE=0<br>
+-      su $TEST_USER1 -c &quot;$0&quot;<br>
+-      if [ $? != 0 ]<br>
+-      then<br>
+-         EXIT_CODE=1<br>
+-      fi<br>
+-      su $TEST_USER2 -c &quot;$0&quot;<br>
+-      if [ $? != 0 ]<br>
+-      then EXIT_CODE=1<br>
+-      fi<br>
+-      do_cleanup<br>
+-      exit $EXIT_CODE<br>
+-else<br>
+-      run_test<br>
+-fi<br>
+diff --git a/testcases/commands/cron/cron_dirs_check.c b/testcases/commands/cron/cron_dirs_check.c<br>
+deleted file mode 100644<br>
+index cc9e0ad25..000000000<br>
+--- a/testcases/commands/cron/cron_dirs_check.c<br>
++++ /dev/null<br>
+@@ -1,44 +0,0 @@<br>
+-#include &lt;sys/types.h&gt;<br>
+-#include &lt;sys/param.h&gt;<br>
+-#include &lt;sys/stat.h&gt;<br>
+-#include &lt;stdio.h&gt;<br>
+-#include &lt;unistd.h&gt;<br>
+-<br>
+-/* Check directory Access */<br>
+-int check_directory_access(char *directory)<br>
+-{<br>
+-<br>
+-      struct stat statbuf;<br>
+-<br>
+-      printf(&quot;Checking %s\n&quot;, directory);<br>
+-<br>
+-      if (stat(directory, &amp;statbuf) == -1) {<br>
+-              printf(&quot;FAIL: %s. Could not obtain directory status\n&quot;,<br>
+-                     directory);<br>
+-              return 1;<br>
+-      }<br>
+-<br>
+-      if (statbuf.st_uid != 0) {<br>
+-              printf(&quot;FAIL: %s. Invalid owner\n&quot;, directory);<br>
+-              return 1;<br>
+-      }<br>
+-<br>
+-      if ((statbuf.st_mode &amp; S_IWGRP) || (statbuf.st_mode &amp; S_IWOTH)) {<br>
+-              printf(&quot;FAIL: %s. Invalid write access\n&quot;, directory);<br>
+-              return 1;<br>
+-      }<br>
+-<br>
+-      printf(&quot;PASS: %s\n&quot;, directory);<br>
+-      return 0;<br>
+-}<br>
+-<br>
+-int main(int argc, char *argv[])<br>
+-{<br>
+-<br>
+-      if (argc != 2) {<br>
+-              printf(&quot;Please enter target directory&quot;);<br>
+-              return 1;<br>
+-      }<br>
+-<br>
+-      return check_directory_access(argv[1]);<br>
+-}<br>
+diff --git a/testcases/commands/cron/cron_dirs_checks01 b/testcases/commands/cron/cron_dirs_checks01<br>
+deleted file mode 100755<br>
+index ea1215e8d..000000000<br>
+--- a/testcases/commands/cron/cron_dirs_checks01<br>
++++ /dev/null<br>
+@@ -1,46 +0,0 @@<br>
+-#!/bin/sh<br>
+-#*********************************************************************<br>
+-#   Copyright (c) International Business Machines  Corp., 2000<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program;  if not, write to the Free Software<br>
+-#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<br>
+-#<br>
+-#  FILE   : cron<br>
+-#<br>
+-#  PUROPOSE: Ensure that the following directories only have root write access<br>
+-#                     /etc/cron.d<br>
+-#                     /etc/cron.daily<br>
+-#                     /etc/cron.hourly<br>
+-#                     /etc/cron.monthly<br>
+-#                     /etc/cron.weekly<br>
+-#                     /var/spool/cron<br>
+-#     HISTORY:<br>
+-#             Jerone Young (<a href="mailto:jyoung5@us.ibm.com" target="_blank">jyoung5@us.ibm.com</a>)<br>
+-#<br>
+-<br>
+-DIRS=&quot;/etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /var/spool/cron&quot;<br>
+-<br>
+-EXIT_CODE=0<br>
+-for i in $DIRS<br>
+-do<br>
+-      cron_dirs_check $i<br>
+-      if [ $? != 0 ]<br>
+-      then<br>
+-              echo &quot;$i FAILED TEST!!!!!&quot;<br>
+-              EXIT_CODE=1<br>
+-      fi<br>
+-<br>
+-done<br>
+-<br>
+-exit $EXIT_CODE<br>
+diff --git a/testcases/commands/cron/cron_illegal_cron_lines b/testcases/commands/cron/cron_illegal_cron_lines<br>
+deleted file mode 100644<br>
+index 3b32dc844..000000000<br>
+--- a/testcases/commands/cron/cron_illegal_cron_lines<br>
++++ /dev/null<br>
+@@ -1,39 +0,0 @@<br>
+-# Collection of illegal cron lines<br>
+-# Comment lines must habe its &#39;#&#39; as first character.<br>
+-# The cron conf line and its description is seperated by &#39;|&#39;.<br>
+-# cron job command &#39;true&#39; is appended automatically<br>
+-<br>
+-# Illegal Minutes<br>
+-61 * * * * | Minute 61<br>
+--1 * * * * | Minute -1 (might be interpreted as range)<br>
+-0.5 * * * * | Minute 0.5<br>
+--1-10 * * * *| Minute Range -1-10<br>
+-0-61 * * * * | Minute Range 0-61<br>
+-<br>
+-# Illegal hours<br>
+-0 25 * * * | Hour 25<br>
+-0 -2 * * * | Hour -2<br>
+-0 3.5 * * *| Hour 3.5<br>
+-0 -4-10 * * *| Hour Range -4-10<br>
+-0 0-25 * * * | Hour Range 0-25<br>
+-<br>
+-# Illegal day of month<br>
+-0 0 32 * * | Day 32<br>
+-0 0 -1 * * | Day -1<br>
+-0 0 3.5 * *| Day 3.5<br>
+-0 0 -3-3 * *| Day Range -3-3<br>
+-0 0 0-32 * *| Day Range 0-32<br>
+-<br>
+-# Illegal month<br>
+-0 0 1 13 * | Month 13<br>
+-0 0 1 -1 * | Month -1<br>
+-0 0 1 2.5 * | Month 2.5<br>
+-0 0 1 -2-3 * | Month Range -2-3<br>
+-0 0 1 0-13 * | Month Range 0-13<br>
+-<br>
+-# Illegal day of week<br>
+-0 0 * * 8 | Day of Week 8<br>
+-0 0 * * -2 | Day of Week -2<br>
+-0 0 * * 2.5 | Day of Week 2.5<br>
+-0 0 * * -7-7 | Day of Week Range -7-7<br>
+-0 0 * * 0-8 | Day of Week Range 0-8<br>
+diff --git a/testcases/commands/cron/cron_neg_tests.sh b/testcases/commands/cron/cron_neg_tests.sh<br>
+deleted file mode 100755<br>
+index 9c3d6f6c7..000000000<br>
+--- a/testcases/commands/cron/cron_neg_tests.sh<br>
++++ /dev/null<br>
+@@ -1,141 +0,0 @@<br>
+-#!/bin/bash<br>
+-########################################################<br>
+-#<br>
+-# CHANGE ACTIVITY<br>
+-#<br>
+-#    10/01/04  Kris Wilson    RHEL4 only allows super user<br>
+-#                               to use crontab.<br>
+-#                               to use crontab.<br>
+-#    12/03/04  Marty Ridgeway Pull RHEl4 tests out from script<br>
+-########################################################<br>
+-<br>
+-iam=`whoami`<br>
+-<br>
+-if [ $iam = &quot;root&quot; ]; then<br>
+-      if [ $# -lt 1 ] ; then<br>
+-              echo Either do not run this script as root or start it like<br>
+-              echo &quot;  $0 &lt;user&gt;&quot;<br>
+-              exit 1<br>
+-      fi<br>
+-<br>
+-      su $1 -c &quot;$0 $*&quot;<br>
+-      exit $?<br>
+-fi<br>
+-<br>
+-#<br>
+-# 1. root einen cronjob unterjubeln<br>
+-#<br>
+-<br>
+-finalrc=0<br>
+-<br>
+-<br>
+-crontab -u root - &lt;&lt; EOF<br>
+-0 * * * * true<br>
+-EOF<br>
+-<br>
+-rc=$?<br>
+-<br>
+-if [ $rc = &quot;0&quot; ]; then<br>
+-      echo root has now an interesting cron job<br>
+-      echo &quot;crontab has a severe security breach (FAIL)&quot;<br>
+-      echo<br>
+-      finalrc=1<br>
+-else<br>
+-      echo &quot;Editing a crontab of another user failed successfully (PASS)&quot;<br>
+-      echo<br>
+-fi<br>
+-<br>
+-<br>
+-#<br>
+-# 2. write some illegal crontabs<br>
+-#<br>
+-<br>
+-# Save crontab<br>
+-<br>
+-#crontab -l &gt; /dev/null 2&gt; /dev/null<br>
+-#if [ $? = &quot;0&quot; ]; then<br>
+-#     echo Saving current crontab...<br>
+-#     echo<br>
+-#     crontab -l &gt; /tmp/save-crontab-`whoami`<br>
+-#     savedcrontab=1<br>
+-#     crontab -r<br>
+-#fi<br>
+-<br>
+-#for line in `cat cron_illegal_cron_lines | grep &#39;^[^#]&#39; | sed -e &#39;s/[ \t][ \t]*/_/g&#39;` ; do<br>
+-#     line=`echo $line | sed -e &#39;s/_/ /g&#39;`<br>
+-      # echo Line: &quot;$line&quot;<br>
+-#     cronconf=`echo &quot;$line&quot; | cut -f 1 -d &#39;|&#39;`<br>
+-#     desc=`echo &quot;$line&quot; | cut -f 2 -d &#39;|&#39;`<br>
+-<br>
+-#     echo &quot;Test: $desc&quot;<br>
+-#     echo &quot;$cronconf true&quot; | crontab -<br>
+-      # echo &quot;$cronconf&quot;<br>
+-#     if [ $? = &quot;0&quot; ]; then<br>
+-#             echo &#39;Test FAILED (or crontab returned wrong exit code)&#39;<br>
+-#             echo &#39;crontab -l:&#39;<br>
+-#             crontab -l<br>
+-#             finalrc=1<br>
+-#     fi<br>
+-#     echo<br>
+-#done<br>
+-<br>
+-<br>
+-# Test whether cron uses setuid correctly<br>
+-<br>
+-echo<br>
+-echo setuid test<br>
+-echo<br>
+-<br>
+-tmpscript=cron_neg01_test<br>
+-rm -rf $tmpscript.out &gt;/dev/null 2&gt;&amp;1<br>
+-<br>
+-<br>
+-cat &gt; /tmp/$tmpscript &lt;&lt; EOF<br>
+-touch /root/halloichwarhier<br>
+-sleep 1<br>
+-cat /root/halloichwarhier ; echo &quot;res:$?&quot;<br>
+-rm /root/halloichwarhier<br>
+-EOF<br>
+-<br>
+-chmod 755 /tmp/$tmpscript<br>
+-<br>
+-#<br>
+-cronline=`date &#39;+%M&#39; | awk &#39;{print ($1+2)%60 &quot; * * * * &quot;}&#39;`<br>
+-(echo &quot;$cronline /tmp/$tmpscript &gt;&gt; /tmp/$tmpscript.out 2&gt;&gt; /tmp/$tmpscript.out&quot; ; \<br>
+- echo &quot;$cronline /tmp/$tmpscript &gt;&gt; /$tmpscript.out 2&gt;&gt; /$tmpscript.out&quot;) \<br>
+- | crontab -<br>
+-<br>
+-echo &quot;sleeping 130 secs...&quot;<br>
+-sleep 130<br>
+-<br>
+-echo<br>
+-echo &quot;Results:&quot;<br>
+-if [ &quot;1&quot; = `cat /tmp/$tmpscript.out | grep &quot;res:0&quot; | wc -l` ]; then<br>
+-      echo &quot;setuid test part 1 successfully failed (PASS)&quot;<br>
+-else<br>
+-      echo &quot;cron executed scripts have root privileges! (FAIL)&quot;<br>
+-      finalrc=1<br>
+-fi<br>
+-<br>
+-CODE=0<br>
+-test -e /tmp/$tmpscript.out &amp;&amp; CODE=1<br>
+-if [ $CODE = &quot;1&quot; ]; then<br>
+-      echo &quot;setuid test part 2 successfully failed (PASS)&quot;<br>
+-else<br>
+-      echo &quot;cron writes script output with root privileges! (FAIL)&quot;<br>
+-      finalrc=1<br>
+-fi<br>
+-echo<br>
+-<br>
+-rm /tmp/$tmpscript* &gt;/dev/null 2&gt;&amp;1<br>
+-crontab -r<br>
+-<br>
+-# Restore crontab<br>
+-<br>
+-if [ &quot;$savedcrontab&quot; = &quot;1&quot; ]; then<br>
+-      echo &quot;Restoring crontab...&quot;<br>
+-      cat /tmp/save-crontab-`whoami` | grep &#39;^[^#]&#39; | crontab -<br>
+-      # rm -r /tmp/save-crontab-`whoami`<br>
+-fi<br>
+-<br>
+-exit $finalrc<br>
+diff --git a/testcases/commands/cron/cron_pos_tests.sh b/testcases/commands/cron/cron_pos_tests.sh<br>
+deleted file mode 100755<br>
+index ece114c84..000000000<br>
+--- a/testcases/commands/cron/cron_pos_tests.sh<br>
++++ /dev/null<br>
+@@ -1,118 +0,0 @@<br>
+-#!/bin/bash<br>
+-<br>
+-# Positive tests for cron, that means these tests have to pass<br>
+-<br>
+-iam=`whoami`<br>
+-<br>
+-tvar=${MACHTYPE%-*}<br>
+-tvar=${tvar#*-}<br>
+-<br>
+-if [ &quot;$tvar&quot; = &quot;redhat&quot; -o &quot;$tvar&quot; = &quot;redhat-linux&quot; ]<br>
+-then<br>
+-      CRON_ALLOW=&quot;/etc/cron.allow&quot;<br>
+-else<br>
+-      CRON_ALLOW=&quot;/var/spool/cron/allow&quot;<br>
+-fi<br>
+-<br>
+-<br>
+-if [ $iam = &quot;root&quot; ]; then<br>
+-      if [ $# -lt 1 ] ; then<br>
+-              echo Either do not run this script as root or start it like<br>
+-              echo &quot;  $0 &lt;user&gt;&quot;<br>
+-              exit 1<br>
+-      fi<br>
+-<br>
+-      mv $CRON_ALLOW $CRON_ALLOW.old &gt;/dev/null 2&gt;&amp;1<br>
+-      su $1 -c &quot;$0 $*&quot;<br>
+-        RC=$?<br>
+-      mv $CRON_ALLOW.old $CRON_ALLOW &gt;/dev/null 2&gt;&amp;1<br>
+-      exit $RC<br>
+-fi<br>
+-<br>
+-function restorecrontab () {<br>
+-      test -e /tmp/crontab-save-$iam &amp;&amp; \<br>
+-              crontab /tmp/crontab-save-$iam &amp;&amp; \<br>
+-              rm -f /tmp/crontab-save-$iam &amp;&amp; \<br>
+-              echo restored old crontab<br>
+-}<br>
+-<br>
+-echo Running as user $iam...<br>
+-<br>
+-# Save current users crontab<br>
+-<br>
+-test -e /tmp/crontab-save-$iam &amp;&amp; rm -f /tmp/crontab-save-$iam<br>
+-<br>
+-if [ &quot;0&quot; -lt `crontab -l 2&gt;/dev/null | wc -l` ]; then<br>
+-<br>
+-      echo &#39;crontab of this user exists -&gt; creating backup&#39;<br>
+-      crontab -l | grep &#39;^[^#]&#39; &gt; /tmp/crontab-save-$iam<br>
+-fi<br>
+-<br>
+-<br>
+-# Do tests<br>
+-<br>
+-# 1. Add new job<br>
+-<br>
+-rm -rf /tmp/crontest &gt;/dev/null 2&gt;&amp;1<br>
+-mkdir -p /tmp/crontest<br>
+-<br>
+-cat &gt; /tmp/crontest/testjob_cron01 &lt;&lt; EOF<br>
+-echo Testjob running<br>
+-date<br>
+-EOF<br>
+-<br>
+-chmod 755 /tmp/crontest/testjob_cron01<br>
+-<br>
+-crontab - &lt;&lt; EOF<br>
+-`date &#39;+%M&#39; | awk &#39;{ print ($1+2)%60 &quot; * * * * &quot;<br>
+-}&#39;` /tmp/crontest/testjob_cron01 &gt;&gt; /tmp/crontest/output_cron01 2&gt;&amp;1<br>
+-EOF<br>
+-<br>
+-rc=$?<br>
+-<br>
+-if [ $rc = &quot;1&quot; ]; then<br>
+-      echo Error while adding crontab for user $iam<br>
+-      restorecrontab<br>
+-      exit 1<br>
+-fi<br>
+-<br>
+-echo new job added successfully<br>
+-<br>
+-# 2. Wait for execution of job<br>
+-<br>
+-echo &#39;sleeping for 130 seconds...&#39;<br>
+-sleep 130<br>
+-<br>
+-rc=1<br>
+-test -e /tmp/crontest/output_cron01 &amp;&amp; rc=0<br>
+-<br>
+-if [ $rc = &quot;1&quot; ]; then<br>
+-      echo Job has not been executed<br>
+-      restorecrontab<br>
+-      exit 1<br>
+-fi<br>
+-<br>
+-grep &quot;Testjob running&quot; /tmp/crontest/output_cron01<br>
+-rc=$?<br>
+-if [ $rc = &quot;1&quot; ]; then<br>
+-      echo Job has not produced valid output<br>
+-      restorecrontab<br>
+-fi<br>
+-<br>
+-echo &#39;job has been executed :-)&#39;<br>
+-echo &quot;testjob&#39;s output:&quot;<br>
+-echo<br>
+-<br>
+-rm -rf /tmp/crontest<br>
+-<br>
+-# 3. Delete crontab<br>
+-<br>
+-crontab -r<br>
+-<br>
+-echo removed crontab<br>
+-<br>
+-# Restore old crontab file<br>
+-<br>
+-restorecrontab<br>
+-<br>
+-exit $rc<br>
+diff --git a/testcases/commands/cron/cron_tests.sh b/testcases/commands/cron/cron_tests.sh<br>
+deleted file mode 100644<br>
+index 47614f9e3..000000000<br>
+--- a/testcases/commands/cron/cron_tests.sh<br>
++++ /dev/null<br>
+@@ -1,276 +0,0 @@<br>
+-#!/bin/sh<br>
+-<br>
+-# Copyright (c) International Business Machines Corp., 2001<br>
+-# Copyright (c) 2017 Petr Vorel &lt;<a href="mailto:pvorel@suse.cz" target="_blank">pvorel@suse.cz</a>&gt;<br>
+-#<br>
+-# This program is free software; you can redistribute it and/or<br>
+-# modify it under the terms of the GNU General Public License as<br>
+-# published by the Free Software Foundation; either version 2 of<br>
+-# the License, or (at your option) any later version.<br>
+-#<br>
+-# This program is distributed in the hope that it would be useful,<br>
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+-# GNU General Public License for more details.<br>
+-#<br>
+-# You should have received a copy of the GNU General Public License<br>
+-# along with this program; if not, write the Free Software Foundation,<br>
+-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA<br>
+-#<br>
+-# Author: Manoj Iyer &lt;<a href="mailto:manjo@mail.utexas.edu" target="_blank">manjo@mail.utexas.edu</a>&gt;<br>
+-<br>
+-TST_CNT=3<br>
+-TST_TESTFUNC=do_test<br>
+-TST_NEEDS_TMPDIR=1<br>
+-TST_SETUP=setup<br>
+-TST_CLEANUP=cleanup<br>
+-. tst_test.sh<br>
+-<br>
+-. daemonlib.sh<br>
+-<br>
+-SYSLOG_STARTED=<br>
+-CROND_STARTED=<br>
+-LOGS=<br>
+-<br>
+-grep_logs()<br>
+-{<br>
+-      local pattern=&quot;$1&quot;<br>
+-      local fail_msg=&quot;$2&quot;<br>
+-      local pass_msg=&quot;${3:-}&quot;<br>
+-      local n=&quot;${4:-10}&quot;<br>
+-<br>
+-      local lines=10<br>
+-      local out=out.$$<br>
+-      local err=err.$$<br>
+-      local i ret<br>
+-<br>
+-      for i in $(seq 1 $n); do<br>
+-              if [ &quot;$LOGS&quot; ]; then<br>
+-                      tail -n $lines $LOGS | grep &quot;$pattern&quot; &gt; $out 2&gt; $err<br>
+-              else<br>
+-                      journalctl -n $lines | grep &quot;$pattern&quot; &gt; $out 2&gt; $err<br>
+-              fi<br>
+-              ret=$?<br>
+-              [ $ret -eq 0 ] &amp;&amp; break<br>
+-              sleep 1<br>
+-      done<br>
+-<br>
+-      if [ $ret -ne 0 ]; then<br>
+-              tst_res TFAIL &quot;$fail_msg: `cat $err`&quot;<br>
+-      else<br>
+-              [ &quot;$pass_msg&quot; ] &amp;&amp; tst_res TPASS &quot;$pass_msg&quot;<br>
+-      fi<br>
+-}<br>
+-<br>
+-create_crontab()<br>
+-{<br>
+-      local crontab=cronjob.cron<br>
+-      local script=$1<br>
+-      local out=out.$$<br>
+-<br>
+-      tst_res TINFO &quot;creating crontab: $script&quot;<br>
+-<br>
+-      cat &gt; $crontab &lt;&lt;EOF<br>
+-* * * * * $script<br>
+-EOF<br>
+-<br>
+-      tst_res TINFO &quot;installing crontab file&quot;<br>
+-      crontab $crontab &gt; $out 2&gt;&amp;1<br>
+-      if [ $? -ne 0 ]; then<br>
+-              tst_brk TBROK &quot;crontab: error while installing crontab file: `cat $out`&quot;<br>
+-              return 1<br>
+-      fi<br>
+-      return 0<br>
+-}<br>
+-<br>
+-remove_crontab()<br>
+-{<br>
+-      local out=out.$$<br>
+-      tst_res TINFO &quot;removing crontab file&quot;<br>
+-      crontab -r &gt; $out 2&gt;&amp;1<br>
+-      if [ $? -ne 0 ]; then<br>
+-              tst_brk TBROK &quot;crontab: error while removing crontab file `cat $out`&quot;<br>
+-              return 1<br>
+-      fi<br>
+-      return 0<br>
+-}<br>
+-<br>
+-create_hello_script()<br>
+-{<br>
+-      local script=$1<br>
+-<br>
+-      cat &gt; $script &lt;&lt;EOF<br>
+-#!/bin/sh<br>
+-echo &quot;Hello Hell&quot;<br>
+-exit 0<br>
+-EOF<br>
+-      chmod +x $script<br>
+-}<br>
+-<br>
+-install_cron_test()<br>
+-{<br>
+-      local script=$PWD/cronprg.sh<br>
+-      local cron_out=$PWD/tst1_cron.out<br>
+-      local err=err.log<br>
+-      local sleep_sec<br>
+-      local ts_min1 ts_min2 fail<br>
+-<br>
+-      tst_res TINFO &quot;test install cron job&quot;<br>
+-<br>
+-      cat &gt; $script &lt;&lt;EOF<br>
+-#! /bin/sh<br>
+-DATE=\`LC_ALL=C date\`<br>
+-echo &quot;Hello Hell today is \$DATE&quot; &gt; $cron_out 2&gt;&amp;1<br>
+-exit 0<br>
+-EOF<br>
+-      chmod +x $script<br>
+-<br>
+-      create_crontab $script 2&gt; $err<br>
+-<br>
+-      if [ $? -ne 0 ]; then<br>
+-              tst_brk TBROK &quot;crontab: error while creating cron job: `cat $err`&quot;<br>
+-      else<br>
+-              tst_res TINFO &quot;cron job installed successfully&quot;<br>
+-      fi<br>
+-<br>
+-      grep_logs &#39;crontab.*REPLACE&#39; \<br>
+-              &quot;cron activity not recorded&quot; \<br>
+-              &quot;cron activity logged&quot;<br>
+-<br>
+-      # Sleep 3s after next minute since the loop below sleeps for 62 seconds, we<br>
+-      # should start this 5-iteration loop closely following the start of a<br>
+-      # minute.<br>
+-      sleep_sec=$((123-`date +%-S`))<br>
+-      tst_res TINFO &quot;sleep for ${sleep_sec}s&quot;<br>
+-      sleep $sleep_sec<br>
+-<br>
+-      # $script executed by the cron job will record the date and time into file<br>
+-      # $cron_out. Get the minute recorded by the program, sleep to allow the cron<br>
+-      # job to update file after 1m, and check if the value is advanced by 1.<br>
+-      for i in $(seq 1 5); do<br>
+-              tst_res TINFO &quot;loop: $i: start&quot;<br>
+-<br>
+-              if [ ! -f &quot;$cron_out&quot; ]; then<br>
+-                      tst_res TFAIL &quot;loop $i: file $cron_out doesn&#39;t exist&quot;<br>
+-                      fail=1<br>
+-                      break<br>
+-              fi<br>
+-<br>
+-              ts_min1=$(awk &#39;{print $8}&#39; $cron_out | awk -F: &#39;{printf(&quot;%d&quot;, $2);}&#39;)<br>
+-<br>
+-              # wait for the cron job to update output file<br>
+-              sleep 62<br>
+-<br>
+-              # Check the time recorded in output file, this should be 1 minute ahead of<br>
+-              # what was recored earlier.<br>
+-              ts_min2=$(awk &#39;{print $8}&#39; $cron_out | awk -F: &#39;{printf(&quot;%d&quot;, $2);}&#39;)<br>
+-<br>
+-              if [ &quot;x${ts_min1}&quot; = &quot;x&quot; ] || [ &quot;x${ts_min2}&quot; = &quot;x&quot; ]; then<br>
+-                      tst_res TFAIL &quot;loop $i: failed to get time: ts_min1: $ts_min1, ts_min2: $ts_min2&quot;<br>
+-                      fail=1<br>
+-                      break<br>
+-              fi<br>
+-<br>
+-              [ $ts_min1 -eq 59 ] &amp;&amp; ts_min1=0 || ts_min1=$(( $ts_min1+1 ))<br>
+-<br>
+-              if [ $ts_min2 -ne $ts_min1 ]; then<br>
+-                      tst_res TFAIL &quot;loop $i: failed to update every minute: expected: $ts_min1, received: $ts_min2&quot;<br>
+-                      fail=1<br>
+-                      break<br>
+-              fi<br>
+-      done<br>
+-<br>
+-      if [ ! &quot;$fail&quot; ]; then<br>
+-              grep_logs &quot;CMD ($script)&quot; \<br>
+-                      &quot;failed to install cron job installed and execute it&quot; \<br>
+-                      &quot;cron job installed and executed&quot; 1<br>
+-      fi<br>
+-<br>
+-      remove_crontab<br>
+-}<br>
+-<br>
+-remove_cron_job_test()<br>
+-{<br>
+-      local script=$PWD/cronprg.sh<br>
+-<br>
+-      tst_res TINFO &quot;test remove cron job&quot;<br>
+-<br>
+-      create_hello_script $script<br>
+-      create_crontab $script<br>
+-<br>
+-      grep_logs &#39;crontab.*REPLACE&#39; \<br>
+-              &quot;crontab activity not recorded&quot;<br>
+-<br>
+-      remove_crontab &amp;&amp; grep_logs DELETE \<br>
+-              &quot;crontab activity not recorded&quot; \<br>
+-              &quot;crontab removed the cron job&quot; 1<br>
+-}<br>
+-<br>
+-list_cron_jobs_test()<br>
+-{<br>
+-      local script=$PWD/cronprg.sh<br>
+-      local out=cron.out<br>
+-<br>
+-      tst_res TINFO &quot;test list installed cron jobs&quot;<br>
+-<br>
+-      create_hello_script $script<br>
+-      create_crontab $script<br>
+-<br>
+-      tst_res TINFO &quot;crontab: listing cron jobs&quot;<br>
+-      crontab -l | grep &quot;$script&quot; &gt; $out 2&gt;&amp;1 || \<br>
+-              tst_brk TBROK &quot;crontab failed while listing installed cron jobs: `cat $out`&quot;<br>
+-<br>
+-      remove_crontab<br>
+-<br>
+-      crontab -l &gt; $out 2&gt;&amp;1<br>
+-      if [ $? -ne 0 ]; then<br>
+-              grep -q &quot;no crontab for&quot; $out<br>
+-              if [ $? -ne 0 ]; then<br>
+-                      tst_res TFAIL &quot;crontab failed removing cron job: `cat $out`&quot;<br>
+-              else<br>
+-                      tst_res TPASS &quot;crontab did not list any cron jobs&quot;<br>
+-              fi<br>
+-      else<br>
+-              tst_res TFAIL &quot;crontab failed removing cron job: `cat $out`&quot;<br>
+-      fi<br>
+-}<br>
+-<br>
+-setup()<br>
+-{<br>
+-      if [ &quot;$SYSLOG_DAEMON&quot; ]; then<br>
+-              status_daemon $SYSLOG_DAEMON<br>
+-              if [ $? -ne 0 ]; then<br>
+-                      restart_daemon $SYSLOG_DAEMON<br>
+-                      SYSLOG_STARTED=1<br>
+-              fi<br>
+-      fi<br>
+-<br>
+-      if [ &quot;$CROND_DAEMON&quot; ]; then<br>
+-              status_daemon $CROND_DAEMON<br>
+-              if [ $? -ne 0 ]; then<br>
+-                      restart_daemon $CROND_DAEMON<br>
+-                      CROND_STARTED=1<br>
+-              fi<br>
+-      fi<br>
+-<br>
+-      for f in /var/log/syslog /var/log/messages /var/log/cron /var/log/cron.log; do<br>
+-              [ -f &quot;$f&quot; ] &amp;&amp; LOGS=&quot;$f $LOGS&quot;<br>
+-      done<br>
+-}<br>
+-<br>
+-cleanup()<br>
+-{<br>
+-      [ &quot;$SYSLOG_STARTED&quot; = &quot;1&quot; ] &amp;&amp; stop_daemon $SYSLOG_DAEMON<br>
+-      [ &quot;$CROND_STARTED&quot; = &quot;1&quot; ] &amp;&amp; stop_daemon $CROND_DAEMON<br>
+-}<br>
+-<br>
+-do_test()<br>
+-{<br>
+-      case $1 in<br>
+-      1) install_cron_test;;<br>
+-      2) remove_cron_job_test;;<br>
+-      3) list_cron_jobs_test;;<br>
+-      esac<br>
+-}<br>
+-<br>
+-tst_run<br>
+diff --git a/testcases/commands/su/Makefile b/testcases/commands/su/Makefile<br>
+deleted file mode 100644<br>
+index da2ff036f..000000000<br>
+--- a/testcases/commands/su/Makefile<br>
++++ /dev/null<br>
+@@ -1,31 +0,0 @@<br>
+-#<br>
+-#    commands/su testcases Makefile.<br>
+-#<br>
+-#    Copyright (C) 2009, Cisco Systems Inc.<br>
+-#<br>
+-#    This program is free software; you can redistribute it and/or modify<br>
+-#    it under the terms of the GNU General Public License as published by<br>
+-#    the Free Software Foundation; either version 2 of the License, or<br>
+-#    (at your option) any later version.<br>
+-#<br>
+-#    This program is distributed in the hope that it will be useful,<br>
+-#    but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+-#    GNU General Public License for more details.<br>
+-#<br>
+-#    You should have received a copy of the GNU General Public License along<br>
+-#    with this program; if not, write to the Free Software Foundation, Inc.,<br>
+-#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.<br>
+-#<br>
+-# Ngie Cooper, July 2009<br>
+-#<br>
+-<br>
+-top_srcdir            ?= ../../..<br>
+-<br>
+-include $(top_srcdir)/include/mk/<a href="http://env_pre.mk" rel="noreferrer" target="_blank">env_pre.mk</a><br>
+-<br>
+-INSTALL_TARGETS               := su01 su01_s1 su_set_passwd<br>
+-<br>
+-MAKE_TARGETS          :=<br>
+-<br>
+-include $(top_srcdir)/include/mk/<a href="http://generic_leaf_target.mk" rel="noreferrer" target="_blank">generic_leaf_target.mk</a><br>
+diff --git a/testcases/commands/su/su01 b/testcases/commands/su/su01<br>
+deleted file mode 100755<br>
+index 34386d937..000000000<br>
+--- a/testcases/commands/su/su01<br>
++++ /dev/null<br>
+@@ -1,181 +0,0 @@<br>
+-#!/bin/bash<br>
+-#*********************************************************************<br>
+-#   Copyright (c) International Business Machines  Corp., 2003, 2004<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program;  if not, write to the Free Software<br>
+-#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<br>
+-#<br>
+-#  FILE   : su<br>
+-#<br>
+-#  PURPOSE: Tests the basic functionality of `su`.<br>
+-#<br>
+-#  SETUP: The program `/usr/bin/expect&#39; MUST be installed.<br>
+-#<br>
+-#  HISTORY:<br>
+-#    03/03    Dustin Kirkland (<a href="mailto:dkirklan@us.ibm.com" target="_blank">dkirklan@us.ibm.com</a>)<br>
+-#    03/03    Jerone Young    (<a href="mailto:jeroney@us.ibm.com" target="_blank">jeroney@us.ibm.com</a>)<br>
+-#    10/01/04 Kris Wilson     Port to Red Hat<br>
+-#<br>
+-#*********************************************************************<br>
+-<br>
+-echo &quot;This script contains bashism that needs to be fixed!&quot;<br>
+-<br>
+-if [ -z ${TCbin} ]<br>
+-then<br>
+-   export TCbin=$PWD<br>
+-fi<br>
+-<br>
+-export TEST_USER1=&quot;su_usr1&quot;<br>
+-<br>
+-tvar=${MACHTYPE%-*}<br>
+-tvar=${tvar#*-}<br>
+-<br>
+-# need to export tvar for su01_s1<br>
+-export tvar<br>
+-printf &quot;Machine type is: $tvar\n\n&quot;<br>
+-<br>
+-if [ &quot;$tvar&quot; = &quot;redhat&quot; -o &quot;$tvar&quot; = &quot;redhat-linux&quot; ]<br>
+-# Need to also set group for TEST_USER2<br>
+-then<br>
+-export TEST_USER1_GROUP=&quot;wheel&quot;<br>
+-export TEST_USER2_GROUP=&quot;wheel&quot;<br>
+-else<br>
+-export TEST_USER1_GROUP=&quot;trusted&quot;<br>
+-export TEST_USER2_GROUP=&quot;trusted&quot;<br>
+-fi<br>
+-export TEST_USER1_PASSWD=&quot;eal&quot;<br>
+-export TEST_USER1_ENCRYPTED_PASSWD=&quot;42VmxaOByKwlA&quot;<br>
+-export TEST_USER1_NEW_PASSWD=&quot;a_very_good_and_long_password&quot;<br>
+-export TEST_USER1_HOMEDIR=&quot;/home/$TEST_USER1&quot;<br>
+-<br>
+-export TEST_USER2=&quot;su_usr2&quot;<br>
+-# Group needs to be trusted for Red Hat.<br>
+-#export TEST_USER2_GROUP=&quot;trusted&quot;<br>
+-export TEST_USER2_PASSWD=&quot;eal&quot;<br>
+-export TEST_USER2_ENCRYPTED_PASSWD=&quot;42VmxaOByKwlA&quot;<br>
+-export TEST_USER2_HOMEDIR=&quot;/home/$TEST_USER2&quot;<br>
+-<br>
+-#This is for enviroment test<br>
+-export TEST_LINE=&quot;YOU_HAVE_THE_VARIABLE&quot;<br>
+-export TEST_ENV_FILE=&quot;/tmp/TEST_ENV_FILE_ROOT&quot;<br>
+-export TEST_ENV_FILE_USER=&quot;/tmp/TEST_ENV_FILE_USER&quot;<br>
+-export TEST_ENV_FILE2=&quot;/tmp/TEST_ENV_FILE_ROOT2&quot;<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_setup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_setup(){<br>
+-<br>
+-#REMOVE ANY TEMPOARY FILES THAT MAY STILL BE AROUND<br>
+-rm -f $TEST_ENV_FILE_USER &gt; /dev/null 2&gt;&amp;1<br>
+-rm -f $TEST_ENV_FILE2 &gt; /dev/null 2&gt;&amp;1<br>
+-rm -f $TEST_ENV_FILE &gt; /dev/null 2&gt;&amp;1<br>
+-<br>
+-<br>
+-#Create 1st test user<br>
+-    #erase user if he may exist , so we can have a clean en<br>
+-        rm -rf /home/$TEST_USER1<br>
+-        getent passwd $TEST_USER1 &gt; /dev/null 2&gt;&amp;1 &amp;&amp; userdel $TEST_USER1<br>
+-      sleep 1<br>
+-<br>
+-        useradd -m -g users $TEST_USER1<br>
+-        if [ $? != 0 ]<br>
+-        then {<br>
+-                echo &quot;Could not add test user $TEST_USER1.&quot;<br>
+-                exit 1<br>
+-        }<br>
+-        fi<br>
+-<br>
+-              usermod -G users,$TEST_USER1_GROUP $TEST_USER1<br>
+-<br>
+-      #create users home directory (SLES 8 does not do this, even when specified in adduser)<br>
+-# Only do this if not RH; RH creates the directory.<br>
+-      if [ &quot;$tvar&quot; != &quot;redhat&quot; -a &quot;$tvar&quot; != &quot;redhat-linux&quot; ]<br>
+-      then {<br>
+-          USER_UID=`id -u $TEST_USER1`<br>
+-          USER_GID=`id -g $TEST_USER1`<br>
+-          mkdir -p $TEST_USER1_HOMEDIR<br>
+-          chown -R $USER_UID.$USER_GID $TEST_USER1_HOMEDIR<br>
+-      }<br>
+-      fi<br>
+-<br>
+-        usermod -p $TEST_USER1_ENCRYPTED_PASSWD $TEST_USER1 &gt; /dev/null 2&gt;&amp;1<br>
+-        if [ $? != 0 ]<br>
+-        then {<br>
+-                echo &quot;Could not set password for test user $TEST_USER1&quot;<br>
+-                exit 1<br>
+-        }<br>
+-        fi<br>
+-<br>
+-#Create 2nd test user<br>
+-      #erase user if he may exist , so we can have a clean en<br>
+-        rm -rf /home/$TEST_USER2<br>
+-        getent passwd $TEST_USER2 &gt; /dev/null 2&gt;&amp;1 &amp;&amp; userdel $TEST_USER2<br>
+-      sleep 1<br>
+-<br>
+-        useradd -m -g users $TEST_USER2<br>
+-<br>
+-        if [ $? != 0 ]<br>
+-        then {<br>
+-                echo &quot;Could not add test user $TEST_USER2.&quot;<br>
+-                exit 1<br>
+-        }<br>
+-        fi<br>
+-<br>
+-              usermod -G users,$TEST_USER2_GROUP $TEST_USER2<br>
+-<br>
+-      #create users home diretory (SLES 8 does not do this, even when specified in adduser)<br>
+-# Only do this if not RH; RH creates the directory.<br>
+-        if [ &quot;$tvar&quot; != &quot;redhat&quot; -a &quot;$tvar&quot; != &quot;redhat-linux&quot; ]<br>
+-        then {<br>
+-          USER_UID=`id -u $TEST_USER2`<br>
+-          USER_GID=`id -g $TEST_USER2`<br>
+-          mkdir -p $TEST_USER2_HOMEDIR<br>
+-          chown -R $USER_UID.$USER_GID $TEST_USER2_HOMEDIR<br>
+-      }<br>
+-      fi<br>
+-<br>
+-        usermod -p $TEST_USER2_ENCRYPTED_PASSWD $TEST_USER2 &gt; /dev/null 2&gt;&amp;1<br>
+-        if [ $? != 0 ]<br>
+-        then {<br>
+-                echo &quot;Could not set password for test user $TEST_USER2&quot;<br>
+-                exit 1<br>
+-        }<br>
+-        fi<br>
+-}<br>
+-<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  do_cleanup<br>
+-#-----------------------------------------------------------------------<br>
+-<br>
+-do_cleanup() {<br>
+-        rm -rf /home/$TEST_USER1<br>
+-        rm -rf /home/$TEST_USER2<br>
+-      userdel $TEST_USER1<br>
+-      userdel $TEST_USER2<br>
+-      #REMOVE ANY TEMPOARY FILES THAT MAY STILL BE AROUND<br>
+-      rm -f $TEST_ENV_FILE_USER &gt; /dev/null 2&gt;&amp;1<br>
+-      rm -f $TEST_ENV_FILE2 &gt; /dev/null 2&gt;&amp;1<br>
+-      rm -f $TEST_ENV_FILE &gt; /dev/null 2&gt;&amp;1<br>
+-}<br>
+-<br>
+-#-----------------------------------------------------------------------<br>
+-# FUNCTION:  MAIN<br>
+-#-----------------------------------------------------------------------<br>
+-do_setup<br>
+-/bin/su $TEST_USER1 -c ${TCbin}/su01_s1<br>
+-EXIT_CODE=$?<br>
+-do_cleanup<br>
+-exit $EXIT_CODE<br>
+diff --git a/testcases/commands/su/su01_s1 b/testcases/commands/su/su01_s1<br>
+deleted file mode 100755<br>
+index 313207b64..000000000<br>
+--- a/testcases/commands/su/su01_s1<br>
++++ /dev/null<br>
+@@ -1,486 +0,0 @@<br>
+-#! /usr/bin/expect -f<br>
+-#*********************************************************************<br>
+-#   Copyright (c) International Business Machines  Corp., 2003, 2004, 2007<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program;  if not, write to the Free Software<br>
+-#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<br>
+-#<br>
+-#  FILE   : su<br>
+-#<br>
+-#  PURPOSE: Tests the basic functionality of `su`.<br>
+-#<br>
+-#  SETUP: The program `/usr/bin/expect&#39; MUST be installed.<br>
+-#         The user invoking this test script must NOT be &quot;root&quot;.<br>
+-#               The PASSWD variable should be set prior to execution<br>
+-#<br>
+-#  HISTORY:<br>
+-#     03/03     Dustin Kirkland (<a href="mailto:dkirklan@us.ibm.com" target="_blank">dkirklan@us.ibm.com</a>)<br>
+-#     03/03     Jerone Young    (<a href="mailto:jeroney@us.ibm.com" target="_blank">jeroney@us.ibm.com</a>)<br>
+-#     10/01/04  Kris Wilson     Skip test 7 if RedHat; no -e option.<br>
+-#     05/23/07  Kris Wilson     Make test 7 work for SLES.<br>
+-########################################################################<br>
+-<br>
+-# The root user cannot succesfully execute su test because the root user<br>
+-# is able to become anyone without entering passwords<br>
+-set whoami [ exec whoami ]<br>
+-if { $whoami==&quot;root&quot; } {<br>
+-  send_user &quot;ERROR: You must execute the &#39;su&#39; tests as a non-root user\n&quot;<br>
+-  exit 1<br>
+-}<br>
+-<br>
+-#Grab input from enviroment<br>
+-if [info exists env(PASSWD)] {<br>
+-      set PASSWD $env(PASSWD)<br>
+-} else {<br>
+-      send_user &quot;YOU NEED TO SET ENVIROMENT VARIABLE PASSWD. \n&quot;<br>
+-      exit 1<br>
+-}<br>
+-<br>
+-if [info exists env(TEST_USER2)] {<br>
+-  set USER1 $env(TEST_USER2)<br>
+-} else {<br>
+-      send_user &quot;YOU MUST SET ENVIRONMENT VARIABLE TEST_USER2&quot;<br>
+-      exit 1<br>
+-}<br>
+-<br>
+-# Need the release type from su01<br>
+-if [info exists env(tvar)] {<br>
+-  set distro $env(tvar)<br>
+-} else {<br>
+-        send_user &quot;YOU MUST SET ENVIORMENT VARIABLE tvar&quot;<br>
+-        exit 1<br>
+-}<br>
+-<br>
+-if [info exists env(TEST_USER2_PASSWD)] {<br>
+-  set USER1_PASSWORD $env(TEST_USER2_PASSWD)<br>
+-} else {<br>
+-  send_user &quot;YOU MUST SET ENVIROMENT VARIABLE TEST_USER2_PASSWD&quot;<br>
+-  exit 1<br>
+-}<br>
+-<br>
+-if [info exists env(TEST_LINE)] {<br>
+-  set TEST_LINE_ENV $env(TEST_LINE)<br>
+-} else {<br>
+-  send_user &quot;YOU MUST SET ENVIROMENT VARIABLE TEST_LINE&quot;<br>
+-  exit 1<br>
+-}<br>
+-<br>
+-<br>
+-if [info exists env(TEST_ENV_FILE)] {<br>
+-  set TEST_ENV_FILE $env(TEST_ENV_FILE)<br>
+-} else {<br>
+-  send_user &quot;YOU MUST SET ENVIROMENT VARIABLE TEST_ENV_FILE_USER&quot;<br>
+-  exit 1<br>
+-}<br>
+-<br>
+-if [info exists env(TEST_ENV_FILE2)] {<br>
+-  set TEST_ENV_FILE2 $env(TEST_ENV_FILE2)<br>
+-} else {<br>
+-  send_user &quot;YOU MUST SET ENVIROMENT VARIABLE TEST_ENV_FILE2&quot;<br>
+-  exit 1<br>
+-}<br>
+-<br>
+-<br>
+-if [info exists env(TEST_ENV_FILE_USER)] {<br>
+-  set TEST_ENV_FILE_USER1 $env(TEST_ENV_FILE_USER)<br>
+-} else {<br>
+-  send_user &quot;YOU MUST SET ENVIROMENT VARIABLE TEST_ENV_FILE_USER&quot;<br>
+-  exit 1<br>
+-}<br>
+-<br>
+-if [info exists env(TEST_USER1_NEW_PASSWD)] {<br>
+-  set USER1_NEW_PASSWORD $env(TEST_USER1_NEW_PASSWD)<br>
+-} else {<br>
+-  send_user &quot;YOU MUST SET ENVIROMENT VARIABLE TEST_USER1_NEW_PASSWD&quot;<br>
+-  exit 1<br>
+-}<br>
+-<br>
+-<br>
+-set script_exit_code 0<br>
+-set i_can_root 0<br>
+-<br>
+-send_user &quot;Starting &#39;su&#39; Testing\n&quot;<br>
+-<br>
+-# 1) su with no parameters and correct password.<br>
+-#    - The su command should return a result code of 0<br>
+-#    - The user ID should be root<br>
+-#    - The user environment should be that of the invoking process<br>
+-#    - The command should create a new shell with a new process ID<br>
+-<br>
+-send_user &quot;\nTEST: su with no parameters and correct password\n&quot;<br>
+-<br>
+-set i_am_root 0<br>
+-# run &quot;whoami&quot; to test user ID inside su shell<br>
+-spawn /bin/su -c whoami<br>
+-set i_am_root 0<br>
+-expect {<br>
+-  &quot;Password:&quot; {<br>
+-      send &quot;$PASSWD\r&quot;<br>
+-    expect {<br>
+-      &quot;root&quot; { set i_am_root 1<br>
+-              set i_can_root 1<br>
+-       }<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-# capture result code<br>
+-set codes [wait]<br>
+-set pid [lindex $codes 0]<br>
+-set exit_code [lindex $codes 3]<br>
+-<br>
+-#Check that su user has same enviroment as current user<br>
+-set i_have_env 0<br>
+-set test_env_var &quot; &quot;<br>
+-if { $i_am_root==1 } {<br>
+-      spawn su -c &quot;/bin/su root -c \&quot;echo \\\$TEST_LINE &gt; $TEST_ENV_FILE\&quot;&quot;<br>
+-      expect {<br>
+-               &quot;Password:&quot; {<br>
+-                      send &quot;$PASSWD\r&quot;<br>
+-              }<br>
+-      }<br>
+-      expect eof<br>
+-      wait<br>
+-<br>
+-      set test_env_var [exec cat $TEST_ENV_FILE]<br>
+-<br>
+-      if  { $test_env_var==$TEST_LINE_ENV } {<br>
+-              set i_have_env 1<br>
+-      } else {<br>
+-              send_user &quot;/bin/su with correct password (FAILED), the enviroment was not kept after su.\n&quot;<br>
+-      }<br>
+-}<br>
+-<br>
+-<br>
+-#this variable is for any test, it can&#39;t run correctly if this test fails<br>
+-set test_one_passed 0<br>
+-<br>
+-if { ($i_am_root==1) &amp;&amp; ($exit_code==0) &amp;&amp; ($pid&gt;0) &amp;&amp; ($i_have_env==1) } {<br>
+-      send_user &quot;/bin/su with correct password &amp; enviroment check ( PASSED )\n&quot;<br>
+-      set test_one_passed 1<br>
+-} else {<br>
+-      send_user &quot;/bin/su with correct password ( FAILED )\n&quot;<br>
+-    set script_exit_code 1<br>
+-}<br>
+-<br>
+-<br>
+-# 2) su with no parameters and incorrect password.<br>
+-#       - The su command should return a result code of non-0<br>
+-#     - The user should be returned to the invoking shell<br>
+-#     - An appropriate failure message should be displayed<br>
+-<br>
+-send_user &quot;\nTEST: su with no parameters and incorrect password \n&quot;<br>
+-<br>
+-set displayed_error 0<br>
+-# run &quot;whoami&quot; to test user ID inside su shell<br>
+-spawn /bin/su -c whoami<br>
+-set displayed_error 0<br>
+-expect {<br>
+-  &quot;Password:&quot; {<br>
+-    send &quot;wrong_$PASSWD\r&quot;<br>
+-    expect {<br>
+-                              &quot;su: incorrect password&quot; { set displayed_error 1 }<br>
+-                              &quot;su: Authentication failure&quot; { set displayed_error 1 }<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-# capture result code<br>
+-set codes [wait]<br>
+-set pid [lindex $codes 0]<br>
+-set exit_code [lindex $codes 3]<br>
+-<br>
+-#Added for arm architecture<br>
+-<br>
+-send_user &quot;\ndisplayed_error=$displayed_error&quot;<br>
+-send_user &quot;\nexit_code=$exit_code&quot;<br>
+-send_user &quot;\npid=$pid\n&quot;<br>
+-<br>
+-if { ($displayed_error==1) &amp;&amp; ($exit_code!=0) &amp;&amp; ($pid&gt;0) } {<br>
+-  send_user &quot;/bin/su with incorrect password ( PASSED )\n&quot;<br>
+-} else {<br>
+-  send_user &quot;/bin/su with incorrect password ( FAILED )\n&quot;<br>
+-  set script_exit_code 1<br>
+-}<br>
+-<br>
+-# 3) su to root using name parameter and correct password.<br>
+-# - The su command should return a result code of 0<br>
+-# - The user ID should be root<br>
+-# - The user environment should be that of the invoking process<br>
+-# - The command should create a new shell with a new process ID<br>
+-<br>
+-send_user &quot;\nTEST: su to root using name parameter and correct password. \n&quot;<br>
+-<br>
+-set i_am_root 0<br>
+-# run &quot;whoami&quot; to test user ID inside su shell<br>
+-spawn /bin/su -l root -c whoami<br>
+-expect {<br>
+-  &quot;Password:&quot; {<br>
+-    send &quot;$PASSWD\r&quot;<br>
+-    expect {<br>
+-                              &quot;root&quot; { set i_am_root 1 }<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-# capture result code<br>
+-set codes [wait]<br>
+-set pid [lindex $codes 0]<br>
+-set exit_code [lindex $codes 3]<br>
+-<br>
+-<br>
+-#Check that su user does not have the same enviroment as current user<br>
+-set i_have_env 0<br>
+-set test_env &quot; &quot;<br>
+-if { $i_am_root==1 } {<br>
+-      spawn /bin/sh -c &quot;/bin/su -l root -c \&quot;echo \&quot;\\\$TEST_LINE &gt; $TEST_ENV_FILE2\&quot;\&quot;&quot;<br>
+-        expect {<br>
+-                 &quot;Password:&quot; {<br>
+-                      send &quot;$PASSWD\r&quot;<br>
+-                }<br>
+-        }<br>
+-<br>
+-      set test_env [exec cat $TEST_ENV_FILE2]<br>
+-<br>
+-      if  { $test_env==$TEST_LINE_ENV } {<br>
+-              set i_have_env 1<br>
+-              send_user &quot;/bin/su -l root with correct password (FAILED), because it did not change enviroment\n&quot;<br>
+-      }<br>
+-}<br>
+-<br>
+-<br>
+-if { ($i_am_root==1) &amp;&amp; ($exit_code==0) &amp;&amp; ($pid&gt;0) &amp;&amp; ($i_have_env==0) } {<br>
+-  send_user &quot;/bin/su -l root with correct password &amp; enviroment check ( PASSED )\n&quot;<br>
+-} else {<br>
+-  send_user &quot;/bin/su -l root with correct password ( FAILED )\n&quot;<br>
+-  set script_exit_code 1<br>
+-}<br>
+-<br>
+-<br>
+-# 4) su to root with name parameter and incorrect password.<br>
+-#    - The su command should return a result code of non-0<br>
+-#    - The user should be returned to the invoking shell<br>
+-#    - An appropriate failure message should be displayed<br>
+-<br>
+-send_user &quot;\nTEST: su to root with name parameter and incorrect password. \n&quot;<br>
+-<br>
+-set displayed_error 0<br>
+-# run &quot;whoami&quot; to test user ID inside su shell<br>
+-spawn /bin/su -l root -c whoami<br>
+-expect {<br>
+-  &quot;Password:&quot; {<br>
+-    send &quot;wrong_$PASSWD\r&quot;<br>
+-    expect {<br>
+-                              &quot;su: incorrect password&quot; { set displayed_error 1 }<br>
+-                              &quot;su: Authentication failure&quot; { set displayed_error 1 }<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-# capture result code<br>
+-set codes [wait]<br>
+-set pid [lindex $codes 0]<br>
+-set exit_code [lindex $codes 3]<br>
+-if { ($displayed_error==1) &amp;&amp; ($exit_code!=0) &amp;&amp; ($pid&gt;0) } {<br>
+-  send_user &quot;/bin/su -l root with incorrect password ( PASSED )\n&quot;<br>
+-} else {<br>
+-  send_user &quot;/bin/su -l root with incorrect password ( FAILED )\n&quot;<br>
+-  set script_exit_code 1<br>
+-}<br>
+-<br>
+-<br>
+-# 5) su to user1 with name parameter and correct password.<br>
+-#    - The su command should return a result code of 0<br>
+-#    - The user ID should be user1<br>
+-#    - The user environment should be that of the invoking process, in this case,that of user1<br>
+-#    - The command should create a new shell with a new process ID<br>
+-#    - Run &quot;whoami&quot; to test user ID inside su shell<br>
+-<br>
+-send_user &quot;TEST: su to user1 with name parameter and correct password.\n&quot;<br>
+-<br>
+-set i_am_correct 0<br>
+-spawn /bin/su -l $USER1 -c whoami<br>
+-expect {<br>
+-  &quot;Password:&quot; {<br>
+-    send &quot;$USER1_PASSWORD\r&quot;<br>
+-    expect {<br>
+-                              &quot;$USER1\r&quot; { set i_am_correct 1 }<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-# capture result code<br>
+-set codes [wait]<br>
+-set pid [lindex $codes 0]<br>
+-set exit_code [lindex $codes 3]<br>
+-<br>
+-set i_have_env 0<br>
+-set test_env_var 0<br>
+-#Check to see that su user does not have the same enviroment<br>
+-if { $i_am_correct==1 } {<br>
+-        spawn /bin/sh -c &quot;/bin/su -l $USER1 -c \&quot;echo \&quot;\\\$TEST_LINE &gt; $TEST_ENV_FILE_USER1\&quot;\&quot;&quot;<br>
+-        expect {<br>
+-                 &quot;Password:&quot; {<br>
+-                                send &quot;$USER1_PASSWORD\r&quot;<br>
+-                }<br>
+-        }<br>
+-<br>
+-}<br>
+-<br>
+-set test_env_var [exec cat $TEST_ENV_FILE_USER1]<br>
+-<br>
+-set i_have_env 0<br>
+-if  { $test_env_var==$TEST_LINE_ENV } {<br>
+-        set i_have_env 1<br>
+-        send_user &quot;/bin/su -l $USER1 with correct password (FAILED), because it did not change enviroment\n&quot;<br>
+-      set i_have_env 0<br>
+-      if  { $test_env_var==$TEST_LINE_ENV } {<br>
+-              set i_have_env 1<br>
+-              send_user &quot;su -l $USER1 with correct password (FAILED), because it did not change enviroment\n&quot;<br>
+-      }<br>
+-}<br>
+-<br>
+-if { ($i_am_correct==1) &amp;&amp; ($exit_code==0) &amp;&amp; ($pid&gt;0) &amp;&amp; ($i_have_env==0) } {<br>
+-  send_user &quot;/bin/su -l $USER1 with correct password &amp; enviroment check ( PASSED )\n&quot;<br>
+-} else {<br>
+-  send_user &quot;/bin/su -l $USER1 with correct password ( FAILED )\n&quot;<br>
+-  set script_exit_code 1<br>
+-}<br>
+-<br>
+-<br>
+-<br>
+-# 6)su to user1 with name parameter and incorrect password.<br>
+-#    - The su command should return a result code of non-0<br>
+-#    - The user should be returned to the invoking shell<br>
+-#    - An appropriate failure message should be displayed.<br>
+-<br>
+-send_user &quot;TEST: su to user1 with name parameter and incorrect password.\n&quot;<br>
+-spawn /bin/su -l $USER1 -c whoami<br>
+-set displayed_error 0<br>
+-expect {<br>
+-  &quot;Password:&quot; {<br>
+-    send &quot;wrong_$USER1_PASSWORD\r&quot;<br>
+-    expect {<br>
+-                              &quot;su: incorrect password&quot; { set displayed_error 1 }<br>
+-                              &quot;su: Authentication failure&quot; { set displayed_error 1 }<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-# capture result code<br>
+-set codes [wait]<br>
+-set pid [lindex $codes 0]<br>
+-set exit_code [lindex $codes 3]<br>
+-if { ($displayed_error==1) &amp;&amp; ($exit_code!=0) &amp;&amp; ($pid&gt;0) } {<br>
+-      send_user &quot;/bin/su -l $USER1 with incorrect password ( PASSED )\n&quot;<br>
+-} else {<br>
+-      send_user &quot;/bin/su -l $USER1 with incorrect password ( FAILED )\n&quot;<br>
+-      set script_exit_code 1<br>
+-}<br>
+-<br>
+-<br>
+-# 7) su to user1 with the user1 password expired<br>
+-#    - user1 should not be allowed to log in<br>
+-#    - The su command should return a result code of non-0<br>
+-#    - The user should be returned to the invoking shell<br>
+-#    - An appropriate failure message should be displayed.<br>
+-<br>
+-# Become root and expire $USER1 password<br>
+-<br>
+-#  Skip this if Red Hat; -e option not supported.<br>
+-if { $distro != &quot;redhat&quot; &amp;&amp; $distro != &quot;redhat-linux&quot; } {<br>
+-<br>
+-if { $test_one_passed==1} {<br>
+-send_user &quot;TEST:  su to user1 with the user1 password expired.\n&quot;<br>
+-<br>
+-spawn /bin/su -l root -c &quot;passwd -e $USER1&quot;<br>
+-expect {<br>
+-  &quot;Password:&quot; {<br>
+-    send &quot;$PASSWD\r&quot;<br>
+-    expect {<br>
+-                              &quot;Password expiry information changed.&quot;<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-set i_am_correct 0<br>
+-spawn /bin/su -l $USER1 -c whoami<br>
+-expect {<br>
+-  &quot;Password:&quot; {<br>
+-    send &quot;$USER1_PASSWORD\r&quot;<br>
+-    expect {<br>
+-        -re &quot;current.*password|Old Password&quot; {<br>
+-        send &quot;wrong_$USER1_PASSWORD\r&quot;<br>
+-        expect {<br>
+-                -re &quot;current.*password|Old Password&quot; {<br>
+-          send &quot;wrong_$USER1_PASSWORD\r&quot;<br>
+-            expect {<br>
+-                                                              &quot;su: incorrect password&quot; { set i_am_correct 1 }<br>
+-                                                              &quot;su: Authentication failure&quot; { set i_am_correct 1 }<br>
+-                                                              &quot;su: Authentication token manipulation error&quot; { set i_am_correct 1 }<br>
+-            }<br>
+-          }<br>
+-                                      &quot;su: incorrect password&quot; { set i_am_correct 1 }<br>
+-                                      &quot;su: Authentication failure&quot; { set i_am_correct 1 }<br>
+-                                      &quot;su: Authentication token manipulation error&quot; { set i_am_correct 1 }<br>
+-        }<br>
+-      }<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-# capture result code<br>
+-set codes [wait]<br>
+-set pid [lindex $codes 0]<br>
+-set exit_code [lindex $codes 3]<br>
+-if { ($i_am_correct==1) &amp;&amp; ($exit_code!=0) &amp;&amp; ($pid&gt;0) } {<br>
+-      send_user &quot;/bin/su -l $USER1 with expired correct password ( PASSED )\n&quot;<br>
+-} else {<br>
+-      send_user &quot;/bin/su -l $USER1 with expired correct password ( FAILED )\n&quot;<br>
+-      set script_exit_code 1<br>
+-}<br>
+-<br>
+-<br>
+-#Become root and set $USER1 password back to previous value<br>
+-spawn /bin/su -l root -c &quot;passwd $USER1&quot;<br>
+-expect {<br>
+-  &quot;Password: &quot; {<br>
+-    send &quot;$PASSWD\r&quot;<br>
+-    expect {<br>
+-     &quot;Enter new password: &quot; {<br>
+-        send &quot;$USER1_NEW_PASSWORD\r&quot;<br>
+-        expect {<br>
+-          &quot;Re-type new password: &quot; {<br>
+-            send &quot;$USER1_NEW_PASSWORD\r&quot;<br>
+-            expect {<br>
+-              &quot;Password changed&quot; {}<br>
+-            }<br>
+-          }<br>
+-        }<br>
+-      }<br>
+-    }<br>
+-  }<br>
+-}<br>
+-<br>
+-} else {<br>
+-<br>
+-      send_user &quot;TEST:  su to user1 with the user1 password expired. (FAILED),see more next line.\n&quot;<br>
+-      send_user &quot;This test cannot be run because the first test to su as root failed\n&quot;<br>
+-<br>
+-}<br>
+-# If RH let the tester know why only 6 tests were run.<br>
+-} else {<br>
+-  send_user &quot;TEST 7 skipped if running on Red Hat; -e not supported \n&quot;<br>
+-}<br>
+-exit  $script_exit_code<br>
+diff --git a/testcases/commands/su/su_set_passwd b/testcases/commands/su/su_set_passwd<br>
+deleted file mode 100755<br>
+index e8f0d2f50..000000000<br>
+--- a/testcases/commands/su/su_set_passwd<br>
++++ /dev/null<br>
+@@ -1,14 +0,0 @@<br>
+-#!/bin/sh<br>
+-#<br>
+-# Set Password for a specific new user<br>
+-# This script should be run as &#39;root&#39;<br>
+-#<br>
+-# Example:<br>
+-#             ./su_set_passwd USER ENCRYPTED_PASSWD<br>
+-#<br>
+-<br>
+-USER=$1<br>
+-ENCRYPTED_PASSWD=$2<br>
+-<br>
+-usermod -p $ENCRYPTED_PASSWD $USER<br>
+-exit $?<br>
+diff --git a/testcases/kernel/fs/acls/.gitignore b/testcases/kernel/fs/acls/.gitignore<br>
+deleted file mode 100644<br>
+index 5fa2fc654..000000000<br>
+--- a/testcases/kernel/fs/acls/.gitignore<br>
++++ /dev/null<br>
+@@ -1,2 +0,0 @@<br>
+-/acl_file_test<br>
+-/acl_link_test<br>
+diff --git a/testcases/kernel/fs/acls/Makefile b/testcases/kernel/fs/acls/Makefile<br>
+deleted file mode 100644<br>
+index 4f1564377..000000000<br>
+--- a/testcases/kernel/fs/acls/Makefile<br>
++++ /dev/null<br>
+@@ -1,40 +0,0 @@<br>
+-#<br>
+-#    kernel/fs/acls testcases Makefile.<br>
+-#<br>
+-#    Copyright (C) 2009, Cisco Systems Inc.<br>
+-#<br>
+-#    This program is free software; you can redistribute it and/or modify<br>
+-#    it under the terms of the GNU General Public License as published by<br>
+-#    the Free Software Foundation; either version 2 of the License, or<br>
+-#    (at your option) any later version.<br>
+-#<br>
+-#    This program is distributed in the hope that it will be useful,<br>
+-#    but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+-#    GNU General Public License for more details.<br>
+-#<br>
+-#    You should have received a copy of the GNU General Public License along<br>
+-#    with this program; if not, write to the Free Software Foundation, Inc.,<br>
+-#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.<br>
+-#<br>
+-# Ngie Cooper, July 2009<br>
+-#<br>
+-<br>
+-top_srcdir            ?= ../../../..<br>
+-<br>
+-include $(top_srcdir)/include/mk/<a href="http://env_pre.mk" rel="noreferrer" target="_blank">env_pre.mk</a><br>
+-<br>
+-check_header = $(shell \<br>
+-      if echo &quot;\#include &lt;$(1)&gt;&quot; | $(CC) -E - &gt; /dev/null 2&gt;&amp;1 ; \<br>
+-      then echo yes ; \<br>
+-      else echo no ; fi)<br>
+-<br>
+-INSTALL_TARGETS               := acl_test01<br>
+-<br>
+-RESULT                        := $(call check_header,sys/xattr.h)<br>
+-<br>
+-ifneq ($(RESULT),yes)<br>
+-MAKE_TARGETS          :=<br>
+-endif<br>
+-<br>
+-include $(top_srcdir)/include/mk/<a href="http://generic_leaf_target.mk" rel="noreferrer" target="_blank">generic_leaf_target.mk</a><br>
+diff --git a/testcases/kernel/fs/acls/acl_file_test.c b/testcases/kernel/fs/acls/acl_file_test.c<br>
+deleted file mode 100644<br>
+index eb30d28ef..000000000<br>
+--- a/testcases/kernel/fs/acls/acl_file_test.c<br>
++++ /dev/null<br>
+@@ -1,73 +0,0 @@<br>
+-#include &lt;unistd.h&gt;<br>
+-#include &lt;stdio.h&gt;<br>
+-#include &lt;sys/types.h&gt;<br>
+-#include &lt;errno.h&gt;<br>
+-#include &lt;sys/syscall.h&gt;<br>
+-#include &lt;fcntl.h&gt;<br>
+-#include &lt;sys/xattr.h&gt;<br>
+-#include &lt;string.h&gt;<br>
+-<br>
+-int main(int argc, char *argv[])<br>
+-{<br>
+-      ssize_t s;<br>
+-      char *tok;<br>
+-      char value[1024];<br>
+-      char list[1024];<br>
+-      int rc = 0;<br>
+-      char *file;<br>
+-      int fd;<br>
+-<br>
+-      if (argc &lt; 2) {<br>
+-              printf(&quot;Please enter a file name as argument.\n&quot;);<br>
+-              return -1;<br>
+-      }<br>
+-<br>
+-      file = argv[1];<br>
+-<br>
+-      fd = open(file, O_RDONLY);<br>
+-      if (fd &lt; 0) {<br>
+-              printf(&quot;Unable to open file %s !&quot;, file);<br>
+-              return -1;<br>
+-      }<br>
+-<br>
+-      if (-1 == (s = flistxattr(fd, list, 1024))) {<br>
+-              perror(&quot;flistxattr&quot;);<br>
+-              return 1;<br>
+-      }<br>
+-      if (s == 0) {<br>
+-              printf(&quot;No xattrs defined for %s, further testcase useless\n&quot;,<br>
+-                     file);<br>
+-              return 1;<br>
+-      }<br>
+-      tok = strtok(list, &quot;\0&quot;);<br>
+-      s = fgetxattr(fd, tok, (void *)value, 1024);<br>
+-      if (s == -1) {<br>
+-              perror(&quot;fgetxattr&quot;);<br>
+-              return 1;<br>
+-      }<br>
+-      s = fsetxattr(fd, tok, (void *)value, s, 0);<br>
+-<br>
+-      if (s == -1) {<br>
+-              printf<br>
+-                  (&quot;User unable to change extended attributes on file %s !\n&quot;,<br>
+-                   argv[1]);<br>
+-              printf(&quot;errno = %i\n&quot;, errno);<br>
+-              rc = 1;<br>
+-      }<br>
+-      //s = syscall(237, fd,tok); //fremovexattr<br>
+-#ifdef __NR_fremovexattr<br>
+-      s = syscall(__NR_fremovexattr, fd, tok);        //fremovexattr<br>
+-#else<br>
+-      s = -1;<br>
+-      errno = ENOSYS;<br>
+-#endif<br>
+-      if (s == -1) {<br>
+-              printf(&quot;User unable to remove extended attributes file %s !\n&quot;,<br>
+-                     argv[1]);<br>
+-              printf(&quot;errno = %i\n&quot;, errno);<br>
+-              rc = 1;<br>
+-      }<br>
+-<br>
+-      close(fd);<br>
+-      return rc;<br>
+-}<br>
+diff --git a/testcases/kernel/fs/acls/acl_link_test.c b/testcases/kernel/fs/acls/acl_link_test.c<br>
+deleted file mode 100644<br>
+index 312f686a1..000000000<br>
+--- a/testcases/kernel/fs/acls/acl_link_test.c<br>
++++ /dev/null<br>
+@@ -1,56 +0,0 @@<br>
+-#include &lt;unistd.h&gt;<br>
+-#include &lt;stdio.h&gt;<br>
+-#include &lt;sys/types.h&gt;<br>
+-#include &lt;errno.h&gt;<br>
+-#include &lt;sys/syscall.h&gt;<br>
+-#include &lt;string.h&gt;<br>
+-#include &lt;sys/xattr.h&gt;<br>
+-<br>
+-int main(int argc, char *argv[])<br>
+-{<br>
+-      ssize_t s;<br>
+-      char *tok;<br>
+-      char value[1024];<br>
+-      char list[1024];<br>
+-      int rc = 0;<br>
+-<br>
+-      if (argc &lt; 2) {<br>
+-              printf(&quot;Please enter a file name as argument.\n&quot;);<br>
+-              return -1;<br>
+-      }<br>
+-<br>
+-      if (-1 == (s = listxattr(argv[1], list, 1024))) {<br>
+-              perror(&quot;listxattr&quot;);<br>
+-              return 1;<br>
+-      }<br>
+-      if (s == 0) {<br>
+-              printf(&quot;No xattrs defined for %s, further testcase useless\n&quot;,<br>
+-                     argv[1]);<br>
+-              return 1;<br>
+-      }<br>
+-      tok = strtok(list, &quot;\0&quot;);<br>
+-      s = getxattr(argv[1], tok, (void *)value, 1024);<br>
+-      if (-1 == s) {<br>
+-              perror(&quot;getxattr&quot;);<br>
+-              return -1;<br>
+-      }<br>
+-<br>
+-      s = lsetxattr(argv[1], tok, (void *)value, s, 0);<br>
+-<br>
+-      if (s == -1) {<br>
+-              printf(&quot;User unable to change extended attributes %s !\n&quot;,<br>
+-                     argv[1]);<br>
+-              printf(&quot;errno = %i\n&quot;, errno);<br>
+-              rc = 1;<br>
+-      }<br>
+-<br>
+-      s = lremovexattr(argv[1], tok);<br>
+-      if (s == -1) {<br>
+-              printf(&quot;User unable to remove extended attributes %s !\n&quot;,<br>
+-                     argv[1]);<br>
+-              printf(&quot;errno = %i\n&quot;, errno);<br>
+-              rc = 1;<br>
+-      }<br>
+-<br>
+-      return rc;<br>
+-}<br>
+diff --git a/testcases/kernel/fs/acls/acl_test01 b/testcases/kernel/fs/acls/acl_test01<br>
+deleted file mode 100755<br>
+index 4fbd72f75..000000000<br>
+--- a/testcases/kernel/fs/acls/acl_test01<br>
++++ /dev/null<br>
+@@ -1,186 +0,0 @@<br>
+-#!/bin/sh<br>
+-#*********************************************************************<br>
+-#   Copyright (c) International Business Machines  Corp., 2003<br>
+-#<br>
+-#   This program is free software;  you can redistribute it and/or modify<br>
+-#   it under the terms of the GNU General Public License as published by<br>
+-#   the Free Software Foundation; either version 2 of the License, or<br>
+-#   (at your option) any later version.<br>
+-#<br>
+-#   This program is distributed in the hope that it will be useful,<br>
+-#   but WITHOUT ANY WARRANTY;  without even the implied warranty of<br>
+-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See<br>
+-#   the GNU General Public License for more details.<br>
+-#<br>
+-#   You should have received a copy of the GNU General Public License<br>
+-#   along with this program;  if not, write to the Free Software<br>
+-#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<br>
+-#<br>
+-#<br>
+-#<br>
+-#  FILE   : acls<br>
+-#<br>
+-#  PURPOSE: Tests extended acls<br>
+-#<br>
+-#  HISTORY:<br>
+-#    03/03 Jerone Young  (<a href="mailto:jyoung5@us.ibm.com" target="_blank">jyoung5@us.ibm.com</a>)<br>
+-#    09/08 Jacky Malcles changing the setup to have this TC started by runltp<br>
+-#*********************************************************************<br>
+-#<br>
+-################################################################<br>
+-#<br>
+-# Make sure that uid=root is running this script.<br>
+-# Make sure that loop device is built into the kernel<br>
+-# Make sure that ACL(Access Control List) and Extended Attribute are<br>
+-#     built into the kernel<br>
+-#<br>
+-#<br>
+-################################################################<br>
+-<br>
+-export TCID=acltest01<br>
+-export TST_TOTAL=5<br>
+-export TST_COUNT=1<br>
+-<br>
+-. test.sh<br>
+-<br>
+-TMP=${TMP:=/tmp}<br>
+-<br>
+-TEST_USER1=&quot;acltest1&quot;<br>
+-TEST_USER1_GROUP=&quot;users&quot;<br>
+-TEST_USER1_PASSWD=&quot;ltp_test_pass1&quot;<br>
+-TEST_USER1_HOMEDIR=&quot;$TMP/tacl/mount-ext3/$TEST_USER1&quot;<br>
+-<br>
+-FILE_ACL=&quot;$TMP/tacl/mount-ext3/test_file&quot;<br>
+-FILE_ACL_LINK=&quot;$TMP/tacl/mount-ext3/test_file_link&quot;<br>
+-TCbin=`pwd`<br>
+-<br>
+-COMMAND=$(command -v &quot;getenforce&quot; &quot;setenforce&quot; |wc -l)<br>
+-if [ $COMMAND -eq 2 ]; then<br>
+-      SELINUX=$(getenforce)<br>
+-else<br>
+-      SELINUX=&quot;&quot;<br>
+-fi<br>
+-<br>
+-do_setup()<br>
+-{<br>
+-      tst_require_root<br>
+-      tst_test_cmds setfacl<br>
+-<br>
+-      if ! ( test -d $TMP/tacl || mkdir -m 777 $TMP/tacl) ; then<br>
+-              tst_brkm TBROK &quot;Failed to create $TMP/tacl directory.&quot;<br>
+-      fi<br>
+-<br>
+-      dd if=/dev/zero of=$TMP/tacl/blkext3 bs=1k count=10240 &amp;&amp; chmod 777 $TMP/tacl/blkext3<br>
+-      if [ $? -ne 0 ] ; then<br>
+-              tst_brkm TBROK &quot;Failed to create $TMP/tacl/blkext3&quot;<br>
+-      fi<br>
+-<br>
+-      if ! LOOP_DEV=$(losetup -f) || [ &quot;x$LOOP_DEV&quot; = x ]; then<br>
+-              tst_brkm TCONF &quot;[ losetup.1 ] Failed to find an available loopback device -- is the required support compiled in your kernel?&quot;<br>
+-      fi<br>
+-<br>
+-      if ! losetup $LOOP_DEV $TMP/tacl/blkext3 &gt; /dev/null 2&gt;&amp;1; then<br>
+-              echo &quot;&quot;<br>
+-              tst_brkm TCONF &quot;[ losetup.2 ] Failed to setup the device.&quot;<br>
+-      fi<br>
+-<br>
+-      mount | grep ext2<br>
+-      if [ $? -ne 0 ]; then<br>
+-              mkfs -t ext3 $LOOP_DEV #&gt; /dev/null 2&gt;&amp;1<br>
+-              mkdir  -m 777 $TMP/tacl/mount-ext3<br>
+-              mount -t ext3 -o defaults,acl,user_xattr $LOOP_DEV $TMP/tacl/mount-ext3<br>
+-              if [ $? -ne 0 ]; then<br>
+-                      tst_resm TCONF &quot;[ mount ] Make sure that ACL (Access Control List)&quot;<br>
+-                      tst_resm TCONF &quot;\t and Extended Attribute are built into the kernel\n&quot;<br>
+-                      tst_brkm TCONF &quot;\t Can not mount ext3 file system with acl and user_xattr options\n&quot;<br>
+-              fi<br>
+-      else<br>
+-              mkfs -t ext2 $LOOP_DEV<br>
+-              mkdir  -m 777 $TMP/tacl/mount-ext3<br>
+-              mount -t ext2 -o defaults,acl,user_xattr $LOOP_DEV $TMP/tacl/mount-ext3<br>
+-              if [ $? -ne 0 ]; then<br>
+-                      tst_resm TCONF &quot;FAILED: [ mount ] Make sure that ACL (Access Control List)&quot;<br>
+-                      tst_resm TCONF &quot;\t and Extended Attribute are built into the kernel\n&quot;<br>
+-                      tst_brkm TCONF &quot;\t Can not mount ext2 file system with acl and user_xattr options\n&quot;<br>
+-              fi<br>
+-      fi<br>
+-<br>
+-      # We couldn&#39;t consider whether the SElinux is Disable or Permissive.<br>
+-      # We only set it to Permissive when it it Enforcing.<br>
+-      if [ &quot;$SELINUX&quot; = &quot;Enforcing&quot; ]; then<br>
+-              echo &quot;set the SElinux to Permissive.&quot;<br>
+-              setenforce 0<br>
+-      fi<br>
+-<br>
+-      userdel $TEST_USER1 &gt; /dev/null 2&gt;&amp;1<br>
+-      useradd -d $TEST_USER1_HOMEDIR -m -g $TEST_USER1_GROUP $TEST_USER1 -s /bin/sh<br>
+-      if [ $? -ne 0 ]; then<br>
+-              tst_brkm TBROK &quot;Could not add test user $TEST_USER1.&quot;<br>
+-      fi<br>
+-}<br>
+-<br>
+-do_cleanup()<br>
+-{<br>
+-      userdel $TEST_USER1 &gt; /dev/null 2&gt;&amp;1<br>
+-      rm -f $FILE_ACL &gt; /dev/null 2&gt;&amp;1<br>
+-      rm -f $FILE_ACL_LINK &gt; /dev/null 2&gt;&amp;1<br>
+-      mount | grep -q &quot;$TMP/tacl/mount-ext3&quot; &amp;&amp; umount -d $TMP/tacl/mount-ext3<br>
+-      rm -rf $TMP/tacl<br>
+-<br>
+-      # We set it back to Enforcing.<br>
+-      if [ &quot;$SELINUX&quot; = &quot;Enforcing&quot; ]; then<br>
+-              echo &quot;set the SElinux back to Enforcing.&quot;<br>
+-              setenforce 1<br>
+-      fi<br>
+-}<br>
+-<br>
+-do_setup<br>
+-TST_CLEANUP=do_cleanup<br>
+-<br>
+-tst_resm TINFO &quot;Testing ACL for root&quot;<br>
+-<br>
+-touch $FILE_ACL<br>
+-touch $FILE_ACL_LINK<br>
+-<br>
+-#setup files for extended attributes<br>
+-setfacl -mu:root:r $FILE_ACL_LINK<br>
+-setfacl -mu:root:r $FILE_ACL<br>
+-<br>
+-acl_file_test $FILE_ACL<br>
+-if [ $? -ne 0 ]; then<br>
+-      tst_resm TFAIL &quot;Extended acls for files.&quot;<br>
+-else<br>
+-      tst_resm TPASS &quot;Extended acls for files.&quot;<br>
+-fi<br>
+-<br>
+-acl_link_test $FILE_ACL_LINK<br>
+-if [ $? -ne 0 ]; then<br>
+-      tst_resm TFAIL &quot;Extended acls for links.&quot;<br>
+-else<br>
+-      tst_resm TPASS &quot;Extended acls for links.&quot;<br>
+-fi<br>
+-<br>
+-chown $TEST_USER1 $FILE_ACL<br>
+-chown $TEST_USER1 $FILE_ACL_LINK<br>
+-<br>
+-tst_resm TINFO &quot;Testing ACL for $TEST_USER1&quot;<br>
+-<br>
+-#setup files for extended attributes<br>
+-setfacl -m u:$TEST_USER1:r $FILE_ACL_LINK<br>
+-setfacl -m u:$TEST_USER1:r $FILE_ACL<br>
+-<br>
+-tst_su $TEST_USER1 &quot;acl_file_test $FILE_ACL&quot;<br>
+-if [ $? -ne 0 ]; then<br>
+-      tst_resm TFAIL &quot;Extended acls for files.&quot;<br>
+-else<br>
+-      tst_resm TPASS &quot;Extended acls for files.&quot;<br>
+-fi<br>
+-<br>
+-tst_su $TEST_USER1 &quot;acl_link_test $FILE_ACL_LINK&quot;<br>
+-if [ $? -ne 0 ]; then<br>
+-      tst_resm TFAIL &quot;Extended acls for links.&quot;<br>
+-else<br>
+-      tst_resm TPASS &quot;Extended acls for links.&quot;<br>
+-fi<br>
+-<br>
+-tst_exit<br>
+-- <br>
+2.11.0<br>
+<br>
diff --git a/meta/recipes-extended/ltp/<a href="http://ltp_20180926.bb" rel="noreferrer" target="_blank">ltp_20180926.bb</a> b/meta/recipes-extended/ltp/<a href="http://ltp_20180926.bb" rel="noreferrer" target="_blank">ltp_20180926.bb</a><br>
index 6cfcaa5832..36d95b23f9 100644<br>
--- a/meta/recipes-extended/ltp/<a href="http://ltp_20180926.bb" rel="noreferrer" target="_blank">ltp_20180926.bb</a><br>
+++ b/meta/recipes-extended/ltp/<a href="http://ltp_20180926.bb" rel="noreferrer" target="_blank">ltp_20180926.bb</a><br>
@@ -53,6 +53,7 @@ SRC_URI = &quot;git://<a href="http://github.com/linux-test-project/ltp.git" rel="noreferrer" target="_blank">github.com/linux-test-project/ltp.git</a> \<br>
            file://0001-statx-fix-compile-errors.patch \<br>
            file://0001-setrlimit05-Use-another-method-to-get-bad-address.patch \<br>
            file://0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch \<br>
+           file://0001-Remove-admin_tools-test.patch \<br>
            &quot;<br>
<br>
 S = &quot;${WORKDIR}/git&quot;<br>
-- <br>
2.11.0<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>