Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Feb 2007 19:08:54 -0500
From:      "Dak Ghatikachalam" <dghatikachalam@gmail.com>
To:        "FreeBSD - Questions" <freebsd-questions@freebsd.org>
Subject:   Ksh Shell script security question.
Message-ID:  <ba29b9b40702141608p57e63b4bg757f57acd33b0dcf@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi Freebsd

I am am puzzled how to secure this code when this shell script is being
executed.

${ORACLE_HOME}/bin/sqlplus -s  <<EOF | tee -a  ${RESTOREFILE}
        connect system/ugo8990d
        set heading off
        set feedback off
        set pagesize 500
        select 'SCN_TO_USE | '||max(next_change#)   from V\$LOG_HISTORY;
        quit
EOF


When I run this code from shell script in /tmp directory it spews file
called /tmp/sh03400.000
in that  I have this entire code visible.

connect system/ugo8990d
set heading off
        set feedback off
        set pagesize 500
        select 'SCN_TO_USE | '||max(next_change#)   from V\$LOG_HISTORY;
        quit

How do I secure that part of code, between
those EOF start and end.

It is just terrible to see the password all shown by the temporary  file the
shell creates,    just for security reasons  I dont want any other users in
the system to view my code which contains the password.

If I have long running sql or large program anything I put in between EOF is
shown by these /tmp/sh*  files

Any idea how to secure this

Thanks
Dak



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ba29b9b40702141608p57e63b4bg757f57acd33b0dcf>