Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Passwords in UNIX process list
I used the hide.c program from metalink ... I ran it on AIX 433 without
probs ...
/*-------------------------------------------------------------------------- + | Can be used as a program prefix: hide program arguments
|
| or as a symbolic link. If this program is not invoked as hide, it
|
| will hide its arguments and invoke the program name.hide
|
| The best way to use this is to rename your critical programs to
|
| program.hide, and create a symbolic link program to hide.
|
| mv sqlplus sqlplus.hide; ln -s hide sqlplus
|
| Thus when sqlplus is invoked, its arguments will be hidden
+-------------------------------------------------------------------------*/ /* * $Header: /local/bin/RCS/hide.c,v 1.6 1992/09/22 22:37:17 dbeusee Exp $ * * $Log: hide.c,v $ * Revision 1.6 1992/09/22 22:37:17 dbeusee * Added exit(1) when cannot execvp the program. * * Revision 1.5 1992/09/22 11:28:44 dbeusee * SOme BSD systems have memset(), so add a #define memset MEMSET to fix * compilation errors (like on ultrix). * * Revision 1.4 1992/09/22 06:34:57 dbeusee * BSD systems need memset routine. *
/* Prepend real program name - so ps can see what prog is running */
strncpy(arg0buf, base, strlen(base));
/* Append real program name - so prog can see what prog is running */
strcpy(arg0buf + JUNK_SIZE, argv[firstarg]);
/* Assign new arg0 buffer to the argv array */
argv[firstarg] = arg0buf;
/* Start the new program with the shifted arguments */
execvp(progbuf, argv + firstarg);
sprintf(errbuf, "Could not execvp '%s'", progbuf);
perror(errbuf);
exit(1);
}
#ifndef SYS5
char *
memset(s, c, n)
register char *s; register c, n; { register char *p = s; while (n-- > 0) *s++ = c; return (p);
DISCLAIMER:
The hide.c code is not supported by Oracle. It is provided as a courtesy, as
a workaround for SVR4 machines. BSD already hides the ps arguments.
"Craig Silver" <csilver_at_sgsborealis.com> wrote in message news:3C62A549.427126CE_at_sgsborealis.com...
> > I'm trying to keep database passwords out of the 'ps' listing on a UNIX > system. > > I've use simple redirect scripts in the past, with Sybase and Informix. > These would just feed the password to the database login process rather > than including it on the command line ( login/password ). > > sqlplus dblogin <<! > dbpassword > select ......; > quit > ! > > I get errors from Oracle (8.1.6) when trying this froma ksh script - > SP2-0306 Invalid option. and a usage message . > > I can drag something like 'expect' into the mix, but I would like to use > a simpler solution, if it exists. The system I'm working on does not > use the operating system credentials for the database access. > > I'm more of a UNIX admin than a DBA, so please pardon my ignorance if > this is a stupid question. I have looked through some Oracle 7 course > material from about 4 years ago, and a couple of O'reilly books I've > got, but haven't come across a solution yet. > > Thank
> > -Craig > >Received on Thu Feb 07 2002 - 11:55:16 CST