From 2c034090116ea93d7525b7dd4976ce991f949f57 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 30 Apr 2010 12:00:33 +0000 Subject: [PATCH] disallow editing of eventlog and auditlog due to index regeneration defect 2993723 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5923 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/sbin/tabedit | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-client/sbin/tabedit b/xCAT-client/sbin/tabedit index ece0d59cf..1577d060c 100755 --- a/xCAT-client/sbin/tabedit +++ b/xCAT-client/sbin/tabedit @@ -1,8 +1,7 @@ #!/bin/sh -#test # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html -# Opens the specified table in the users editor and writes changes back to the db +# Opens the specified table in the users editor;writes changes back to the db function cexit { if [ -d /tmp/tabedit.$$ ]; then @@ -18,6 +17,11 @@ if [ -r /etc/profile.d/xcat.sh ]; then fi TABLE=$1 + +if [ $TABLE = "eventlog" ] || [ $TABLE = "auditlog" ]; then + echo "The auditlog and eventlog tables may not be edited. Editing will cause index regeneration."; + exit 1 +fi if [ -z "$TABEDITOR" ]; then TABEDITOR=$EDITOR fi