1 diff -Naurd build-tree.orig/apache_1.3.34/src/support/htpasswd.c build-tree/apache_1.3.34/src/support/htpasswd.c
2 --- build-tree.orig/apache_1.3.34/src/support/htpasswd.c 2004-05-05 11:24:30.000000000 +0200
3 +++ build-tree/apache_1.3.34/src/support/htpasswd.c 2004-05-05 11:23:45.000000000 +0200
5 char record[MAX_STRING_LEN];
6 char line[MAX_STRING_LEN];
7 char pwfilename[MAX_STRING_LEN];
8 + char extrafields[MAX_STRING_LEN];
14 signal(SIGINT, (void (*)(int)) interrupted);
16 + extrafields[0] = '\0'; /* be sure it is initialized properly */
19 * Preliminary check to make sure they provided at least
20 * three arguments, we'll do better argument checking as
25 + strcpy(scratch, line); /* make a clean copy of line */
26 + colon = strchr(scratch, ':'); /* skip the username */
27 + colon = strchr(colon+1, ':'); /* skip the password */
28 + if (colon != NULL) { /* if != NULL there are extrafields */
29 + strcpy(extrafields,colon); /* copy them */
31 + extrafields[0] = '\0'; /* if not be sure that it is empty! */
38 * Now add the user record we created.
40 + if (strlen(extrafields) > 0) {
41 + strcat(record,extrafields);
43 putline(ftemp, record);
45 * If we're updating an existing file, there may be additional