Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.unix.questions Subject: Re: Destroying arguments Message-ID: <7425@elsie.UUCP> Date: Sat, 23-May-87 10:26:06 EDT Article-I.D.: elsie.7425 Posted: Sat May 23 10:26:06 1987 Date-Received: Sun, 24-May-87 02:04:08 EDT References: <292@osupyr.UUCP> <239@polyof.UUCP> <485@bene.UUCP> <6723@mimsy.UUCP> <19590@sun.uucp> Distribution: comp.unix.questions Organization: NIH-LEC, Bethesda, MD Lines: 22 Summary: window of vulnerability > ...requiring the user to type 40, or 80, or however many Xes is simply > silly. Seems like you could reduce (but not eliminate) the window of vulnerability by having the program reexecute itself this way: #define XX "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" main(argc, argv) char * argv[]; { if (strcmp(argv[0], XX) != 0) { argv[0] = XX; execv(MYSELF, argv); perror(MYSELF); } } Doing this would not require the user to type in Xes. -- UUCP: ..seismo!elsie!ado ARPA: elsie!ado@seismo.CSS.GOV Elsie and Ado are trademarks of Borden, Inc. and Ampex.x