From d790beb7bd711def7256419a3aaedbba4f3b1de8 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 12 May 2011 12:44:10 +0000 Subject: [PATCH] Do not allow tabdump/tabrestore of TEAL tables defect 3267008 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9579 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/tabutils.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 9f73cfa2b..11a7634cb 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -310,6 +310,11 @@ sub tabrestore my $request = shift; my $cb = shift; my $table = $request->{table}->[0]; + # do not allow teal tables + if ( $table =~ /^x_teal/ ) { + $cb->({error => "$table is not supported in tabrestore. Use Teal maintenance commands. ",errorcode=>1}); + return 1; + } my $tab = xCAT::Table->new($table, -create => 1, -autocommit => 0); unless ($tab) { $cb->({error => "Unable to open $table",errorcode=>4}); @@ -562,6 +567,11 @@ sub tabdump } # get the table name $table = $ARGV[0]; + # do not allow teal tables + if ( $table =~ /^x_teal/ ) { + $cb->({error => "$table is not supported in tabdump. Use Teal maintenance commands. ",errorcode=>1}); + return 1; + } if ($DESC) { # only show the attribute descriptions, not the values my $schema = xCAT::Table->getTableSchema($table); if (!$schema) { $cb->({error => "table $table does not exist.",errorcode=>1}); return; }