summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2003-12-02 10:41:45 +0100
committerJustin Erenkrantz <jerenkrantz@apache.org>2003-12-02 10:41:45 +0100
commit1e1a131b4e0cdfbf4daea9b2c4410ce76400a053 (patch)
tree89cbe16730bee786743d230301471f453c210395 /support
parentUpdate transformations. (diff)
downloadapache2-1e1a131b4e0cdfbf4daea9b2c4410ce76400a053.tar.xz
apache2-1e1a131b4e0cdfbf4daea9b2c4410ce76400a053.zip
If we have a comment, place in a ':' not a ';' (has this *ever* worked?)
If -n is specified and we have a comment, print the comment out too. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101946 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r--support/htdbm.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/support/htdbm.c b/support/htdbm.c
index 26acb39d54..0b5431836c 100644
--- a/support/htdbm.c
+++ b/support/htdbm.c
@@ -229,7 +229,7 @@ static apr_status_t htdbm_save(htdbm_t *htdbm, int *changed)
if (!htdbm->comment)
val.dptr = htdbm->userpass;
else {
- val.dptr = apr_pstrcat(htdbm->pool, htdbm->userpass, ";",
+ val.dptr = apr_pstrcat(htdbm->pool, htdbm->userpass, ":",
htdbm->comment, NULL);
val.dsize += (strlen(htdbm->comment) + 1);
}
@@ -602,8 +602,15 @@ int main(int argc, const char * const argv[])
fprintf(stdout, "Database %s %s.\n", h->filename,
h->create ? "created" : (changed ? "modified" : "updated"));
}
- if (cmd == HTDBM_NOFILE)
- fprintf(stderr, "%s:%s\n", h->username, h->userpass);
+ if (cmd == HTDBM_NOFILE) {
+ if (!need_cmnt) {
+ fprintf(stderr, "%s:%s\n", h->username, h->userpass);
+ }
+ else {
+ fprintf(stderr, "%s:%s:%s\n", h->username, h->userpass,
+ h->comment);
+ }
+ }
htdbm_terminate(h);
apr_terminate();