p9auth module was just included in staging for a while.
It had been removed from kernel due to lack of interest.
Remove it from LTP.

Signed-off-by: Zeng Linggang <[email protected]>
---
 README.kernel_config                            |  11 ---
 runtest/p9auth                                  |   2 -
 testcases/kernel/security/p9auth/.gitignore     |   1 -
 testcases/kernel/security/p9auth/Makefile       |  27 ------
 testcases/kernel/security/p9auth/checkp9auth.sh |  70 ---------------
 testcases/kernel/security/p9auth/p9priv.sh      | 111 ------------------------
 testcases/kernel/security/p9auth/p9unpriv.sh    |  51 -----------
 testcases/kernel/security/p9auth/runp9auth.sh   |  37 --------
 testcases/kernel/security/p9auth/unhex.c        |  47 ----------
 9 files changed, 357 deletions(-)
 delete mode 100644 runtest/p9auth
 delete mode 100644 testcases/kernel/security/p9auth/.gitignore
 delete mode 100644 testcases/kernel/security/p9auth/Makefile
 delete mode 100755 testcases/kernel/security/p9auth/checkp9auth.sh
 delete mode 100755 testcases/kernel/security/p9auth/p9priv.sh
 delete mode 100755 testcases/kernel/security/p9auth/p9unpriv.sh
 delete mode 100755 testcases/kernel/security/p9auth/runp9auth.sh
 delete mode 100644 testcases/kernel/security/p9auth/unhex.c

diff --git a/README.kernel_config b/README.kernel_config
index 54df0ad..ffb2dec 100644
--- a/README.kernel_config
+++ b/README.kernel_config
@@ -67,17 +67,6 @@ Enabling Kernel Configuration to test filecaps security 
feature
 ---------------------------------
 CONFIG_SECURITY_FILE_CAPABILITIES=y
 ---------------------------------
-Enabling Kernel Configuration to test p9auth security feature
----------------------------------
-CONFIG_CRYPTO=y
-CONFIG_STAGING=y
-# CONFIG_STAGING_EXCLUDE_BUILD is not set
-CONFIG_PLAN9AUTH=m
-(Or CONFIG_PLAN9AUTH=y)
-You also will need openssl installed.
-You will also need to have an user named 'ltp'
-created to execute this test.
----------------------------------
 Enabling Kernel Configuration to test SELinux security feature
 ---------------------------------
 Your Kernel should have been built with the following options to
diff --git a/runtest/p9auth b/runtest/p9auth
deleted file mode 100644
index 17b1550..0000000
--- a/runtest/p9auth
+++ /dev/null
@@ -1,2 +0,0 @@
-#DESCRIPTION:p9auth /dev/caphash module
-p9auth         runp9auth.sh
diff --git a/testcases/kernel/security/p9auth/.gitignore 
b/testcases/kernel/security/p9auth/.gitignore
deleted file mode 100644
index a6ce058..0000000
--- a/testcases/kernel/security/p9auth/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/unhex
diff --git a/testcases/kernel/security/p9auth/Makefile 
b/testcases/kernel/security/p9auth/Makefile
deleted file mode 100644
index 603b9d4..0000000
--- a/testcases/kernel/security/p9auth/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2008                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-################################################################################
-
-top_srcdir             ?= ../../../..
-
-include        $(top_srcdir)/include/mk/testcases.mk
-
-INSTALL_TARGETS                := *.sh
-
-include        $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/security/p9auth/checkp9auth.sh 
b/testcases/kernel/security/p9auth/checkp9auth.sh
deleted file mode 100755
index c2a6ca9..0000000
--- a/testcases/kernel/security/p9auth/checkp9auth.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-################################################################################
-##                                                                             
      ##
-## Copyright (c) International Business Machines  Corp., 2009             ##
-##                                                                             
      ##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by        
##
-## the Free Software Foundation; either version 2 of the License, or      ##
-## (at your option) any later version.                                      ##
-##                                                                             
      ##
-## This program is distributed in the hope that it will be useful, but  ##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                           
  ##
-##                                                                             
      ##
-## You should have received a copy of the GNU General Public License      ##
-## along with this program;  if not, write to the Free Software                
 ##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                             
      ##
-################################################################################
-
-yesno=0
-if [ "$1" = "yesno" ]; then
-       yesno=1
-fi
-
-# check for openssl
-rm -f /tmp/ab
-echo ab > /tmp/ab
-openssl sha1 -hmac "ab" /tmp/ab > /dev/null
-ret=$?
-if [ $ret -ne 0 ]; then
-       if [ $yesno -eq 1 ]; then echo
-                "no"
-       else
-                echo "openssl not installed, skipping p9auth tests."
-       fi
-       exit 1
-fi
-
-majfile=/sys/module/p9auth/parameters/cap_major
-minfile=/sys/module/p9auth/parameters/cap_minor
-if [ ! -f "$majfile" ]; then
-       if [ $yesno -eq 1 ]; then echo
-                "no"
-       else
-                echo "p9auth not detected.  Skipping p9auth tests."
-       fi
-       exit 1
-fi
-
-if [ ! -c "/dev/caphash" ]; then
-       rm -f /dev/caphash
-       maj=`cat $majfile`
-       mknod /dev/caphash c $maj 0
-fi
-
-if [ ! -c "/dev/capuse" ]; then
-       rm -f /dev/capuse
-       min=`cat $minfile`
-       mknod /dev/capuse c $maj 1
-fi
-chmod ugo+w /dev/capuse
-
-if [ $yesno -eq 1 ]; then
-       echo "yes"
-else
-       echo "p9auth ready for testing"
-fi
-exit 0
diff --git a/testcases/kernel/security/p9auth/p9priv.sh 
b/testcases/kernel/security/p9auth/p9priv.sh
deleted file mode 100755
index fae3249..0000000
--- a/testcases/kernel/security/p9auth/p9priv.sh
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/bin/sh
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2009                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-################################################################################
-
-export TMPDIR=${TMPDIR:-/tmp}
-export LTPTMP=${TMPDIR}/p9auth_ltp
-export TST_TOTAL=3
-export TCID="p9auth"
-
-export TST_COUNT=1
-
-rm -rf $LTPTMP
-mkdir $LTPTMP
-chmod 755 $LTPTMP
-
-comms="$LTPTMP/childgo $LTPTMP/d/childready $LTPTMP/d/childfail 
$LTPTMP/d/childpass $LTPTMP/childexit"
-
-cleanup() {
-       rm -rf $LTPTMP/d $comms
-       mkdir -p $LTPTMP/d
-       chown -R ltp $LTPTMP/d
-}
-
-if [ "$(id -ru)" -ne 0 ]; then
-       tst_resm TBROK "Must start p9auth tests as root"
-       exit 1
-fi
-
-if ! ltpuid=$(id -u ltp); then
-       tst_resm TCONF "Failed to find ltp userid"
-       exit 1
-fi
-
-# TEST 1: ltp setuids to 0 but no valid hash
-# launch an unprivileged helper
-cleanup
-
-su ltp p9unpriv.sh &
-while [ ! -f $LTPTMP/d/childready ]; do :; done
-touch $LTPTMP/childgo
-until [ -f $LTPTMP/d/childfail -o -f $LTPTMP/d/childpass ]; do :; done
-if [ -f $LTPTMP/d/childpass ]; then
-       tst_resm TFAIL "child could setuid with bad hash"
-       exit 1
-fi
-tst_resm TPASS "child couldn't setuid with bad hash"
-
-# TEST 2: ltp setuids to 0 with valid hash
-
-# create the hash.  randstr doesn't have to be int, but it's ok
-cleanup
-randstr=$RANDOM
-txt="$ltpuid@0"
-echo -n "$txt" > $LTPTMP/txtfile
-openssl sha1 -hmac "$randstr" $LTPTMP/txtfile | awk '{ print $2 '} > 
$LTPTMP/hex
-unhex < $LTPTMP/hex > /dev/caphash
-# give the child its token
-echo -n "$txt@$randstr" > $LTPTMP/d/txtfile
-chown ltp $LTPTMP/d/txtfile
-
-su ltp p9unpriv.sh &
-while [ ! -f $LTPTMP/d/childready ]; do :; done
-touch $LTPTMP/childgo
-until [ -f $LTPTMP/d/childfail -o -f $LTPTMP/d/childpass ]; do :; done
-if [ -f $LTPTMP/d/childfail ]; then
-       tst_resm TFAIL "child couldn't setuid with good hash"
-       exit 1
-fi
-tst_resm TPASS "child could setuid with good hash"
-
-# TEST 3: 0 setuids to 0 with hash valid for ltp user
-cleanup
-randstr=$RANDOM
-txt="0@0"
-echo -n "$txt" > $LTPTMP/txtfile
-openssl sha1 -hmac "$randstr" $LTPTMP/txtfile | awk '{ print $2 '} > 
$LTPTMP/hex
-unhex < $LTPTMP/hex > /dev/caphash
-# give the child its token
-echo -n "$txt@$randstr" > $LTPTMP/d/txtfile
-chown ltp $LTPTMP/d/txtfile
-
-su ltp p9unpriv.sh &
-while [ ! -f $LTPTMP/d/childready ]; do :; done
-touch $LTPTMP/childgo
-until [ -f $LTPTMP/d/childfail -o -f $LTPTMP/d/childpass ]; do :; done;
-if [ -f $LTPTMP/d/childpass ]; then
-       tst_resm TFAIL "child could setuid from wrong source uid"
-       exit 1
-fi
-tst_resm TPASS "child couldn't setuid from wrong source uid"
-
-touch $LTPTMP/childexit
-
-exit 0
diff --git a/testcases/kernel/security/p9auth/p9unpriv.sh 
b/testcases/kernel/security/p9auth/p9unpriv.sh
deleted file mode 100755
index 9dfb1fa..0000000
--- a/testcases/kernel/security/p9auth/p9unpriv.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2009                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-################################################################################
-
-LTPTMP=/tmp/p9auth_ltp
-
-TOUCH=`which touch`
-ID=`which id`
-echo ltptmp is $LTPTMP
-
-myuid=`id -u`
-if [ "$myuid" -eq 0 ]; then
-       echo "Unprivileged child was started as root!"
-       exit 1
-fi
-
-$TOUCH $LTPTMP/d/childready
-
-while [ 1 ]; do
-       if [ -f $LTPTMP/childexit ]; then
-               exit 0
-       fi
-       if [ -f $LTPTMP/childgo ]; then
-               echo -n `cat $LTPTMP/d/txtfile` > /dev/capuse
-               if [ `$ID -u` -eq 0 ]; then
-                       $TOUCH $LTPTMP/d/childpass
-               else
-                       $TOUCH $LTPTMP/d/childfail
-               fi
-               exit 0
-       fi
-done
-
-exit 0
diff --git a/testcases/kernel/security/p9auth/runp9auth.sh 
b/testcases/kernel/security/p9auth/runp9auth.sh
deleted file mode 100755
index 45b4143..0000000
--- a/testcases/kernel/security/p9auth/runp9auth.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2008                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-################################################################################
-
-checkp9auth.sh
-ret=$?
-if [ $ret -ne 0 ]; then
-       echo "p9auth module is not supported by this kernel."
-       exit 0
-fi
-
-exit_code=0
-
-p9priv.sh
-tmp=$?
-if [ $tmp -ne 0 ]; then
-       exit_code=$tmp
-fi
-
-exit $exit_code
diff --git a/testcases/kernel/security/p9auth/unhex.c 
b/testcases/kernel/security/p9auth/unhex.c
deleted file mode 100644
index 7235fa2..0000000
--- a/testcases/kernel/security/p9auth/unhex.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/******************************************************************************/
-/*                                                                            
*/
-/* Copyright (c) International Business Machines  Corp., 2008                 
*/
-/*                                                                            
*/
-/* This program is free software;  you can redistribute it and/or modify      
*/
-/* it under the terms of the GNU General Public License as published by       
*/
-/* the Free Software Foundation; either version 2 of the License, or          
*/
-/* (at your option) any later version.                                        
*/
-/*                                                                            
*/
-/* This program is distributed in the hope that it will be useful,            
*/
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            
*/
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  
*/
-/* the GNU General Public License for more details.                           
*/
-/*                                                                            
*/
-/* You should have received a copy of the GNU General Public License          
*/
-/* along with this program;  if not, write to the Free Software               
*/
-/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    */
-/*                                                                            
*/
-/******************************************************************************/
-
-/*
- * File: unhex.c
- * Author: Serge Hallyn
- * Purpose: Read a 40 char hex value from stdin, output 20 char byte
- * value on stdout.
- */
-
-#include <stdio.h>
-#include <unistd.h>
-
-int main(int argc, char *argv[])
-{
-       char in[41], out[20];
-       unsigned int v;
-       int i, ret;
-
-       ret = read(STDIN_FILENO, in, 40);
-       if (ret != 40)
-               return 1;
-       in[40] = '\0';
-       for (i = 0; i < 20; i++) {
-               sscanf(&in[2 * i], "%02x", &v);
-               out[i] = v;
-       }
-       write(STDOUT_FILENO, out, 20);
-       return 0;
-}
-- 
1.9.3




------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to