X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fconffile.c;h=18afa9e8d1843d86b275ac25a792ee12c6397175;hb=fb2bd066c2f8b34addafe48d62550e3033a59431;hp=b25484566f18790c3307973dc34e01d9560e704c;hpb=a6127998ee6dcab6bb034f6ca985b07804a86f9a;p=debian%2Famanda diff --git a/common-src/conffile.c b/common-src/conffile.c index b254845..18afa9e 100644 --- a/common-src/conffile.c +++ b/common-src/conffile.c @@ -582,7 +582,6 @@ keytab_t client_keytab[] = { { "INDEX_SERVER", CONF_INDEX_SERVER }, { "TAPE_SERVER", CONF_TAPE_SERVER }, { "TAPEDEV", CONF_TAPEDEV }, - { "DEVICE-PROPERTY", CONF_DEVICE_PROPERTY }, { "AUTH", CONF_AUTH }, { "SSH_KEYS", CONF_SSH_KEYS }, { "AMANDAD_PATH", CONF_AMANDAD_PATH }, @@ -1388,8 +1387,14 @@ read_conffile( current_filename = config_dir_relative(filename); if ((current_file = fopen(current_filename, "r")) == NULL) { - g_fprintf(stderr, _("could not open conf file \"%s\": %s\n"), current_filename, + /* client conf files are optional, and this fprintf ends up sending this message back + * to the server without proper auth encapsulation, leading to "invalid size: could not + * open .." This is fixed in TRUNK by completely rewriting this module's error-handling + * code. */ + if (!is_client) { + g_fprintf(stderr, _("could not open conf file \"%s\": %s\n"), current_filename, strerror(errno)); + } got_parserror = TRUE; goto finish; } @@ -1573,7 +1578,7 @@ read_block( if(np->token == tok) break; if(np->token == CONF_UNKNOWN) - conf_parserror(errormsg); + conf_parserror("%s", errormsg); else { np->read_function(np, &valarray[np->parm]); if(np->validate_function) @@ -3962,7 +3967,7 @@ apply_config_overwrites( if (key_parm->type == CONFTYPE_STR) { current_line = vstralloc("\"", value, "\"", NULL); } else { - current_line = stralloc(""); + current_line = stralloc(value); } current_char = current_line;