Is it possible to hide process args from 'ps -ef'??
andre
andre at targon.UUCP
Wed Apr 24 07:04:54 AEST 1991
In article <1414 at compel.UUCP> her at compel.UUCP (Helge Egelund Rasmussen) writes:
>It is possible to give Oracle programs the username/password on the
>command line, ie :
> $ sqlplus scott/tiger
>This is all very nice, BUT when another user execute 'ps -ef' he/she
>can see the password!
>Is it possible to hide the arguments, so that they won't show up in
>the 'ps' output (possibly by 'exec'ing sqlplus in some devious way :-)??
Sure you can, try this for size:
main(argc, argv)
int argc;
char **argv;
{
char p[512];
if (argc == 2)
{
strcpy(p, argv[1]);
memset(argv[1], '\0', strlen(argv[1]));
sleep(30); /* time to check */
printf("argv[1] was %s \n",p);
}
return 0;
}
NOTE: untested code, but this explains the idea.
--
The mail| AAA DDDD It's not the kill, but the thrill of the chase.
demon...| AA AAvv vvDD DD Ketchup is a vegetable.
hits!.@&| AAAAAAAvv vvDD DD {nixbur|nixtor}!adalen.via
--more--| AAA AAAvvvDDDDDD Andre van Dalen, uunet!hp4nl!targon!andre
More information about the Comp.unix.wizards
mailing list