Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!targon!andre From: andre@targon.UUCP (andre) Newsgroups: comp.unix.wizards Subject: Re: Is it possible to hide process args from 'ps -ef'?? Keywords: ps exec Message-ID: <1697@targon.UUCP> Date: 23 Apr 91 21:04:54 GMT References: <1414@compel.UUCP> Organization: Siemens Nixdorf Informationsystems BV.,SWZ, Vianen, the Netherlands. Lines: 34 In article <1414@compel.UUCP> her@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