htdigest.c revision 46d8f3df5a564fd58591687e66cbde1e863a9a74
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose/* Licensed to the Apache Software Foundation (ASF) under one or more
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * contributor license agreements. See the NOTICE file distributed with
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * this work for additional information regarding copyright ownership.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * The ASF licenses this file to You under the Apache License, Version 2.0
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * (the "License"); you may not use this file except in compliance with
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * the License. You may obtain a copy of the License at
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * Unless required by applicable law or agreed to in writing, software
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * distributed under the License is distributed on an "AS IS" BASIS,
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * See the License for the specific language governing permissions and
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * limitations under the License.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose/******************************************************************************
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose ******************************************************************************
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * NOTE! This program is not safe as a setuid executable! Do not make it
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose ******************************************************************************
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose *****************************************************************************/
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * htdigest.c: simple program for manipulating digest passwd file for Apache
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose * by Alexei Kosut, based on htpasswd.c, by Rob McCool
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose#endif /* APR_CHARSET_EBCDIC */
if (tfp) {
if (line[x])
char ch;
s[i++] = ch;
s[i++] = ch;
apr_file_putc(l[x], f);
char *pw;
static void usage(void)
static void interrupted(void)
static void terminate(void)
#ifdef NETWARE
pressanykey();
apr_file_t *f;
char *dirname;
char l[MAX_STRING_LEN];
char w[MAX_STRING_LEN];
char x[MAX_STRING_LEN];
int found;
if (rv) {
usage();
apr_file_close(f);
exit(0);
usage();
argv[0]);
found = 0;
if (!found) {
apr_file_close(f);
APR_SUCCESS) {