Processed: your mail

2012-02-03 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 tags 564722 + patch upstream confirmed
Bug #564722 [apache2-utils] /usr/bin/htdigest: htdigest -c should bail if the 
target digest file exists
Added tag(s) upstream, confirmed, and patch.

End of message, stopping processing here.

Please contact me if you need assistance.
-- 
564722: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564722
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.c.13282829126077.transcr...@bugs.debian.org



Bug#564722: htdigest -c should bail if the target digest file exists

2012-02-03 Thread Jean-Michel Vourgère
man page says:
-c Create  the  passwdfile.  If  passwdfile  already  exists, it is
  deleted first.

And from older version, one can guess file was effectively truncated: 
fopen(w).
https://svn.apache.org/viewvc/httpd/httpd/trunk/support/htdigest.c?r1=85063r2=85064
(That was 11 years ago...)

So I suggest we just to add APR_TRUNCATE to apr_file_open(APR_WRITE | 
APR_CREATE) to keep the documented behavior.

On the other hand, bailing out really makes sense to me.

Issue should be discussed upstream.

I'm attaching a fix for the inconsistent behaviour bug.
--- support/htdigest.c	2012-02-03 16:18:17.0 +0100
+++ /home/nirgal/htdigest.c	2012-02-03 16:16:42.0 +0100
@@ -212,7 +212,7 @@
 if (argc == 5) {
 if (strcmp(argv[1], -c))
 usage();
-rv = apr_file_open(f, argv[2], APR_WRITE | APR_CREATE,
+rv = apr_file_open(f, argv[2], APR_WRITE | APR_CREATE | APR_TRUNCATE,
APR_OS_DEFAULT, cntxt);
 if (rv != APR_SUCCESS) {
 char errmsg[120];


Processed: your mail

2012-02-03 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 tags 325547 + upstream
Bug #325547 [apache2-utils] /usr/bin/htdigest: noninteractive use of htdigest
Added tag(s) upstream.
 forwarded 325547 https://issues.apache.org/bugzilla/show_bug.cgi?id=51370
Bug #325547 [apache2-utils] /usr/bin/htdigest: noninteractive use of htdigest
Set Bug forwarded-to-address to 
'https://issues.apache.org/bugzilla/show_bug.cgi?id=51370'.

End of message, stopping processing here.

Please contact me if you need assistance.
-- 
325547: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=325547
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.c.132829937122997.transcr...@bugs.debian.org