mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 10:52:57 +02:00
Hinzugefuegt:
* Konfiguration fuer Apache2 Kernelupgrade auf 2.4.33.3 Syslinux-Upgrade Gefixt: * /tmp/ROOTFILES hat nichts in der ISO zu suchen. * Fehler im Installer wegen Apache2. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@283 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -20995,6 +20995,22 @@ usr/sbin/Fw-usb_A.bin
|
||||
#etc/httpd/conf/extra/httpd-userdir.conf
|
||||
#etc/httpd/conf/extra/httpd-vhosts.conf
|
||||
etc/httpd/conf/httpd.conf
|
||||
etc/httpd/conf/conf.d
|
||||
etc/httpd/conf/default-server.conf
|
||||
etc/httpd/conf/global.conf
|
||||
etc/httpd/conf/hostname.conf
|
||||
etc/httpd/conf/httpd.conf
|
||||
etc/httpd/conf/listen.conf
|
||||
etc/httpd/conf/loadmodule.conf
|
||||
etc/httpd/conf/mod_info.conf
|
||||
etc/httpd/conf/mod_log_config.conf
|
||||
etc/httpd/conf/mod_status.conf
|
||||
etc/httpd/conf/server-tuning.conf
|
||||
etc/httpd/conf/ssl-global.conf
|
||||
etc/httpd/conf/uid.conf
|
||||
#etc/httpd/conf/vhosts.d
|
||||
etc/httpd/conf/vhosts.d/ipfire-interface.conf
|
||||
etc/httpd/conf/vhosts.d/ipfire-interface-ssl.conf
|
||||
#etc/httpd/conf/magic
|
||||
#etc/httpd/conf/mime.types
|
||||
#etc/httpd/conf/original
|
||||
|
||||
@@ -1,123 +1,123 @@
|
||||
/* SmoothWall setup program.
|
||||
*
|
||||
* This program is distributed under the terms of the GNU General Public
|
||||
* Licence. See the file COPYING for details.
|
||||
*
|
||||
* (c) Lawrence Manning, 2001
|
||||
* Password stuff.
|
||||
*
|
||||
* $Id: passwords.c,v 1.5.2.1 2004/04/14 22:05:41 gespinasse Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
extern FILE *flog;
|
||||
extern char *mylog;
|
||||
|
||||
extern char **ctr;
|
||||
|
||||
extern int automode;
|
||||
|
||||
int getpassword(char *password, char *text);
|
||||
|
||||
/* Root password. */
|
||||
int handlerootpassword(void)
|
||||
{
|
||||
char password[STRING_SIZE];
|
||||
char commandstring[STRING_SIZE];
|
||||
|
||||
/* Root password. */
|
||||
if (getpassword(password, ctr[TR_ENTER_ROOT_PASSWORD]) == 2)
|
||||
return 0;
|
||||
|
||||
snprintf(commandstring, STRING_SIZE,
|
||||
"/bin/echo 'root:%s' | /usr/sbin/chpasswd", password);
|
||||
if (runhiddencommandwithstatus(commandstring, ctr[TR_SETTING_ROOT_PASSWORD]))
|
||||
{
|
||||
errorbox(ctr[TR_PROBLEM_SETTING_ROOT_PASSWORD]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int handleadminpassword(void)
|
||||
{
|
||||
char password[STRING_SIZE];
|
||||
char commandstring[STRING_SIZE];
|
||||
char message[1000];
|
||||
|
||||
/* web interface admin password. */
|
||||
sprintf(message, ctr[TR_ENTER_ADMIN_PASSWORD], NAME, NAME);
|
||||
if (getpassword(password, message) == 2)
|
||||
return 0;
|
||||
|
||||
snprintf(commandstring, STRING_SIZE,
|
||||
"/usr/bin/htpasswd -c -m -b " CONFIG_ROOT "/auth/users admin '%s'", password);
|
||||
sprintf(message, ctr[TR_SETTING_ADMIN_PASSWORD], NAME);
|
||||
if (runhiddencommandwithstatus(commandstring, message))
|
||||
{
|
||||
sprintf(message, ctr[TR_PROBLEM_SETTING_ADMIN_PASSWORD], NAME);
|
||||
errorbox(message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Taken from the cdrom one. */
|
||||
int getpassword(char *password, char *text)
|
||||
{
|
||||
char *values[] = { NULL, NULL, NULL }; /* pointers for the values. */
|
||||
struct newtWinEntry entries[] =
|
||||
{
|
||||
{ ctr[TR_PASSWORD_PROMPT], &values[0], 2 },
|
||||
{ ctr[TR_AGAIN_PROMPT], &values[1], 2 },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
char title[STRING_SIZE];
|
||||
int rc;
|
||||
int done;
|
||||
|
||||
do
|
||||
{
|
||||
done = 1;
|
||||
sprintf (title, "%s v%s - %s", NAME, VERSION, SLOGAN);
|
||||
rc = newtWinEntries(title, text,
|
||||
50, 5, 5, 20, entries, ctr[TR_OK], ctr[TR_CANCEL], NULL);
|
||||
|
||||
if (rc != 2)
|
||||
{
|
||||
if (strlen(values[0]) == 0 || strlen(values[1]) == 0)
|
||||
{
|
||||
errorbox(ctr[TR_PASSWORD_CANNOT_BE_BLANK]);
|
||||
done = 0;
|
||||
strcpy(values[0], "");
|
||||
strcpy(values[1], "");
|
||||
}
|
||||
else if (strcmp(values[0], values[1]) != 0)
|
||||
{
|
||||
errorbox(ctr[TR_PASSWORDS_DO_NOT_MATCH]);
|
||||
done = 0;
|
||||
strcpy(values[0], "");
|
||||
strcpy(values[1], "");
|
||||
}
|
||||
else if (strchr(values[0], ' '))
|
||||
{
|
||||
errorbox(ctr[TR_PASSWORD_CANNOT_CONTAIN_SPACES]);
|
||||
done = 0;
|
||||
strcpy(values[0], "");
|
||||
strcpy(values[1], "");
|
||||
}
|
||||
}
|
||||
}
|
||||
while (!done);
|
||||
|
||||
strncpy(password, values[0], STRING_SIZE);
|
||||
|
||||
if (values[0]) free(values[0]);
|
||||
if (values[1]) free(values[1]);
|
||||
|
||||
return rc;
|
||||
}
|
||||
/* SmoothWall setup program.
|
||||
*
|
||||
* This program is distributed under the terms of the GNU General Public
|
||||
* Licence. See the file COPYING for details.
|
||||
*
|
||||
* (c) Lawrence Manning, 2001
|
||||
* Password stuff.
|
||||
*
|
||||
* $Id: passwords.c,v 1.5.2.1 2004/04/14 22:05:41 gespinasse Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
extern FILE *flog;
|
||||
extern char *mylog;
|
||||
|
||||
extern char **ctr;
|
||||
|
||||
extern int automode;
|
||||
|
||||
int getpassword(char *password, char *text);
|
||||
|
||||
/* Root password. */
|
||||
int handlerootpassword(void)
|
||||
{
|
||||
char password[STRING_SIZE];
|
||||
char commandstring[STRING_SIZE];
|
||||
|
||||
/* Root password. */
|
||||
if (getpassword(password, ctr[TR_ENTER_ROOT_PASSWORD]) == 2)
|
||||
return 0;
|
||||
|
||||
snprintf(commandstring, STRING_SIZE,
|
||||
"/bin/echo 'root:%s' | /usr/sbin/chpasswd", password);
|
||||
if (runhiddencommandwithstatus(commandstring, ctr[TR_SETTING_ROOT_PASSWORD]))
|
||||
{
|
||||
errorbox(ctr[TR_PROBLEM_SETTING_ROOT_PASSWORD]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int handleadminpassword(void)
|
||||
{
|
||||
char password[STRING_SIZE];
|
||||
char commandstring[STRING_SIZE];
|
||||
char message[1000];
|
||||
|
||||
/* web interface admin password. */
|
||||
sprintf(message, ctr[TR_ENTER_ADMIN_PASSWORD], NAME, NAME);
|
||||
if (getpassword(password, message) == 2)
|
||||
return 0;
|
||||
|
||||
snprintf(commandstring, STRING_SIZE,
|
||||
"/usr/sbin/htpasswd -c -m -b " CONFIG_ROOT "/auth/users admin '%s'", password);
|
||||
sprintf(message, ctr[TR_SETTING_ADMIN_PASSWORD], NAME);
|
||||
if (runhiddencommandwithstatus(commandstring, message))
|
||||
{
|
||||
sprintf(message, ctr[TR_PROBLEM_SETTING_ADMIN_PASSWORD], NAME);
|
||||
errorbox(message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Taken from the cdrom one. */
|
||||
int getpassword(char *password, char *text)
|
||||
{
|
||||
char *values[] = { NULL, NULL, NULL }; /* pointers for the values. */
|
||||
struct newtWinEntry entries[] =
|
||||
{
|
||||
{ ctr[TR_PASSWORD_PROMPT], &values[0], 2 },
|
||||
{ ctr[TR_AGAIN_PROMPT], &values[1], 2 },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
char title[STRING_SIZE];
|
||||
int rc;
|
||||
int done;
|
||||
|
||||
do
|
||||
{
|
||||
done = 1;
|
||||
sprintf (title, "%s v%s - %s", NAME, VERSION, SLOGAN);
|
||||
rc = newtWinEntries(title, text,
|
||||
50, 5, 5, 20, entries, ctr[TR_OK], ctr[TR_CANCEL], NULL);
|
||||
|
||||
if (rc != 2)
|
||||
{
|
||||
if (strlen(values[0]) == 0 || strlen(values[1]) == 0)
|
||||
{
|
||||
errorbox(ctr[TR_PASSWORD_CANNOT_BE_BLANK]);
|
||||
done = 0;
|
||||
strcpy(values[0], "");
|
||||
strcpy(values[1], "");
|
||||
}
|
||||
else if (strcmp(values[0], values[1]) != 0)
|
||||
{
|
||||
errorbox(ctr[TR_PASSWORDS_DO_NOT_MATCH]);
|
||||
done = 0;
|
||||
strcpy(values[0], "");
|
||||
strcpy(values[1], "");
|
||||
}
|
||||
else if (strchr(values[0], ' '))
|
||||
{
|
||||
errorbox(ctr[TR_PASSWORD_CANNOT_CONTAIN_SPACES]);
|
||||
done = 0;
|
||||
strcpy(values[0], "");
|
||||
strcpy(values[1], "");
|
||||
}
|
||||
}
|
||||
}
|
||||
while (!done);
|
||||
|
||||
strncpy(password, values[0], STRING_SIZE);
|
||||
|
||||
if (values[0]) free(values[0]);
|
||||
if (values[1]) free(values[1]);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user