+1

On Mar 2, 2004, at 10:41 AM, Thom May wrote:

* Thom May ([EMAIL PROTECTED]) wrote :
Hey guys,
just wondering why we use system(copy...)/system(cp...) in htdigest in 1.3,
when the netware option seems to be more secure?
The patch attached just rips out the ifdef and uses the netware code
globally.
No complaints? Suggestions?
I'll commit tonight then?
-Thom


Index: htdigest.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/support/htdigest.c,v
retrieving revision 1.39
diff -u -r1.39 htdigest.c
--- htdigest.c  20 Feb 2004 22:02:24 -0000      1.39
+++ htdigest.c  29 Feb 2004 18:50:18 -0000
@@ -152,7 +152,6 @@
 }


-#ifdef NETWARE static void copy_file(FILE *target, FILE *source) { static char line[MAX_STRING_LEN]; @@ -161,7 +160,6 @@ putline(target, line); } } -#endif

 int main(int argc, char *argv[])
 {
@@ -239,14 +237,7 @@
     }
     fclose(f);
     fclose(tfp);
-#ifndef NETWARE
-#if defined(OS2) || defined(WIN32)
-    sprintf(command, "copy \"%s\" \"%s\"", tn, argv[1]);
-#else
-    sprintf(command, "cp %s %s", tn, argv[1]);
-#endif
-    system(command);
-#else
+
     if (!(tfp = fopen(tn, "r"))) {
     fprintf(stderr, "Could not open temp file.\n");
     exit(1);
@@ -258,7 +249,6 @@
     }

     copy_file(f, tfp);
-#endif
     unlink(tn);
     return 0;
 }




Reply via email to