httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r826822 - in /httpd/httpd/trunk: CHANGES support/htpasswd.c
Date Mon, 19 Oct 2009 21:41:31 GMT
Author: sf
Date: Mon Oct 19 21:41:31 2009
New Revision: 826822

URL: http://svn.apache.org/viewvc?rev=826822&view=rev
Log:
htpasswd: Improve out of disk space handling

PR: 30877

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/support/htpasswd.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=826822&r1=826821&r2=826822&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Oct 19 21:41:31 2009
@@ -10,6 +10,8 @@
      mod_proxy_ftp: NULL pointer dereference on error paths.
      [Stefan Fritsch <sf fritsch.de>, Joe Orton]
 
+  *) htpasswd: Improve out of disk space handling. PR 30877. [Stefan Fritsch]
+
   *) htpasswd: Use MD5 hash by default on all platforms. [Stefan Fritsch]
 
   *) mod_sed: Reduce memory consumption when processing very long lines.

Modified: httpd/httpd/trunk/support/htpasswd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htpasswd.c?rev=826822&r1=826821&r2=826822&view=diff
==============================================================================
--- httpd/httpd/trunk/support/htpasswd.c (original)
+++ httpd/httpd/trunk/support/htpasswd.c Mon Oct 19 21:41:31 2009
@@ -141,7 +141,15 @@
 
 static void putline(apr_file_t *f, const char *l)
 {
-    apr_file_puts(l, f);
+    apr_status_t rc;
+    rc = apr_file_puts(l, f);
+    if (rc != APR_SUCCESS) {
+        char errstr[MAX_STRING_LEN];
+        apr_strerror(rc, errstr, MAX_STRING_LEN);
+        apr_file_printf(errfile, "Error writing temp file: %s" NL, errstr);
+        apr_file_close(f);
+        exit(ERR_FILEPERM);
+    }
 }
 
 /*



Mime
View raw message