* Now reads the irs.conf from /boot/common/settings/network/irs.conf instead of

/etc/irs.conf. Untested.
* There are more config files, but I'm not even sure what they are used for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42643 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2011-08-19 19:12:29 +00:00
parent 03e3327d33
commit efa3bc3eca

View File

@ -48,6 +48,8 @@ static const char rcsid[] = "$Id: gen.c,v 1.7 2005/04/27 04:56:23 sra Exp $";
#include <arpa/nameser.h>
#include <resolv.h>
#include <FindDirectory.h>
#include <isc/memcluster.h>
#include <irs.h>
@ -382,10 +384,17 @@ default_map_rules(struct gen_p *irs) {
static void
init_map_rules(struct gen_p *irs, const char *conf_file) {
char line[1024], pattern[40], mapname[20], accname[20], options[100];
char path[PATH_MAX];
FILE *conf;
if (conf_file == NULL)
conf_file = _PATH_IRS_CONF ;
if (conf_file == NULL) {
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
sizeof(path)) == B_OK) {
strlcat(path, "/network/irs.conf", sizeof(path));
conf_file = path;
} else
conf_file = _PATH_IRS_CONF;
}
/* A conf file of "" means compiled in defaults. Irpd wants this */
if (conf_file[0] == '\0' || (conf = fopen(conf_file, "r")) == NULL) {