1 --- bash-2.02.1/builtins/echo.def Tue Feb 11 19:00:21 1997
2 +++ bash-2.02.1.new/builtins/echo.def Tue Oct 6 04:15:29 1998
10 + return (EXECUTION_FAILURE);
12 return (EXECUTION_SUCCESS);
14 diff -Nru bash-2.02.1/builtins/fc.def bash-2.02.1.new/builtins/fc.def
15 --- bash-2.02.1/builtins/fc.def Thu Jul 17 15:42:44 1997
16 +++ bash-2.02.1.new/builtins/fc.def Tue Oct 6 04:15:29 1998
19 char *ename, *command, *newcom, *line;
25 reverse = listing = execute = 0;
32 - /* XXX - this is raceable */
33 - sprintf (fn, "/tmp/bash%d", (int)time ((time_t *) 0) + (int)getpid ());
34 + fn = tempnam(0, "bash");
37 + builtin_error ("unable to generate a unique filename");
38 + return (EXECUTION_FAILURE);
41 + fd = open (fn, O_CREAT | O_EXCL | O_WRONLY, 0600);
44 + builtin_error ("cannot open temp file %s", fn);
46 + return (EXECUTION_FAILURE);
49 - stream = fopen (fn, "w");
50 + stream = fdopen (fd, "w");
54 builtin_error ("cannot open temp file %s", fn);
56 return (EXECUTION_FAILURE);
65 return (EXECUTION_SUCCESS);
71 if (retval != EXECUTION_SUCCESS)
75 return (EXECUTION_FAILURE);
80 run_unwind_frame ("fc builtin");
86 diff -Nru bash-2.02.1/doc/bash.1 bash-2.02.1.new/doc/bash.1
87 --- bash-2.02.1/doc/bash.1 Wed Apr 1 19:25:56 1998
88 +++ bash-2.02.1.new/doc/bash.1 Tue Oct 6 04:15:29 1998
92 .SH "RESTRICTED SHELL"
93 +.\" start of rbash man
100 turns off any restrictions in the shell spawned to execute the
102 +.\" end of rbash man
107 @@ -7395,3 +7399,4 @@
109 Array variables may not (yet) be exported.
112 diff -Nru bash-2.02.1/general.h bash-2.02.1.new/general.h
113 --- bash-2.02.1/general.h Tue Feb 24 21:51:04 1998
114 +++ bash-2.02.1.new/general.h Tue Oct 6 04:15:29 1998
116 #if !defined (_GENERAL_H_)
119 +#include <sys/types.h>
122 #include "bashtypes.h"
123 diff -Nru bash-2.02.1/subst.c bash-2.02.1.new/subst.c
124 --- bash-2.02.1/subst.c Tue Jun 30 18:09:45 1998
125 +++ bash-2.02.1.new/subst.c Tue Oct 6 04:15:29 1998
126 @@ -2749,8 +2749,8 @@
130 - tname = mktemp (savestring ("/tmp/sh-np-XXXXXX"));
131 - if (mkfifo (tname, 0600) < 0)
132 + tname = tempnam(0, "sh-np");
133 + if (!tname || mkfifo (tname, 0600) < 0)
136 return ((char *)NULL);