For 1.39:
- When reading through parts on the DVD, the DVD is mounted and
unmounted for each part.
-- Restricted consoles start in the Default catalog even if it
- is not permitted.
- Make sure that the restore options don't permit "seeing" other
- Client's job data.
+ Client's job data. -- mostly fixed.
- Implement Python event for backing up/restoring a file.
- Change dbcheck to tell users to use native tools for fixing
broken databases, and to ensure they have the proper indexes.
routines.
- Do we migrate appendable Volumes?
- Remove queue.c code.
-- Fix re-read of last block to check if job has actually written
- a block, and check if block was written by a different job
- (i.e. multiple simultaneous jobs writing).
- Some users claim that they must do two prune commands to get a
Volume marked as purged.
- Print warning message if LANG environment variable does not specify
.move eject device=xxx toslot=yyy the same as above, but with a new
target slot. The catalog should be updated accordingly.
.move transfer device=xxx fromslot=yyy toslot=zzz
+
+Low priority:
+- Fix re-read of last block to check if job has actually written
+ a block, and check if block was written by a different job
+ (i.e. multiple simultaneous jobs writing).
- Figure out how to configure query.sql. Suggestion to use m4:
== changequote.m4 ===
changequote(`[',`]')dnl
The problem is that it requires m4, which is not present on all machines
at ./configure time.
-
-Low priority:
- Get Perl replacement for bregex.c
- Given all the problems with FIFOs, I think the solution is to do something a
little different, though I will look at the code and see if there is not some
> the Volumes in the magazine disabled prior to taking them offsite, and mark
> them all enabled when bringing them back on site. Coupled with the options
> to the slots keyword, you can apply the enable/disable to any or all volumes.
+- Restricted consoles start in the Default catalog even if it
+ is not permitted.
+
/* Static variables */
static char *configfile = NULL;
static BSOCK *UA_sock = NULL;
-static DIRRES *dir;
+static DIRRES *dir = NULL;
+static CONRES *cons = NULL;
static FILE *output = stdout;
static bool teeout = false; /* output to output and stdout */
static bool stop = false;
static bool no_conio = false;
static int argc;
static int numdir;
+static int numcon;
static POOLMEM *args;
static char *argk[MAX_CMD_ARGS];
static char *argv[MAX_CMD_ARGS];
{ N_("time"), timecmd, _("print current time")},
{ N_("version"), versioncmd, _("print Console's version")},
{ N_("exit"), quitcmd, _("exit = quit")},
- { N_("zed_keyst"), zed_keyscmd, _("zed_keys = use zed keys instead of bash keys")},
+ { N_("zed_keys"), zed_keyscmd, _("zed_keys = use zed keys instead of bash keys")},
};
#define comsize (sizeof(commands)/sizeof(struct cmdstruct))
(void)WSA_Init(); /* Initialize Windows sockets */
+ LockRes();
+ numdir = 0;
+ foreach_res(dir, R_DIRECTOR) {
+ numdir++;
+ }
+ numcon = 0;
+ foreach_res(cons, R_CONSOLE) {
+ numcon++;
+ }
+ UnlockRes();
+
if (numdir > 1) {
struct sockaddr client_addr;
memset(&client_addr, 0, sizeof(client_addr));
senditf(_("You must enter a number between 1 and %d\n"), numdir);
goto try_again;
}
+ term_bsock(UA_sock);
LockRes();
- dir = NULL;
for (i=0; i<item; i++) {
dir = (DIRRES *)GetNextRes(R_DIRECTOR, (RES *)dir);
}
+ /* Look for a console linked to this director */
+ for (i=0; i<numcon; i++) {
+ cons = (CONRES *)GetNextRes(R_CONSOLE, (RES *)cons);
+ if (cons->director && strcmp(cons->director, dir->hdr.name) == 0) {
+ break;
+ }
+ cons = NULL;
+ }
+ /* Look for the first non-linked console */
+ if (cons == NULL) {
+ for (i=0; i<numcon; i++) {
+ cons = (CONRES *)GetNextRes(R_CONSOLE, (RES *)cons);
+ if (cons->director == NULL)
+ break;
+ cons = NULL;
+ }
+ }
UnlockRes();
- term_bsock(UA_sock);
- } else {
+ }
+ /* If no director, take first one */
+ if (!dir) {
LockRes();
dir = (DIRRES *)GetNextRes(R_DIRECTOR, NULL);
UnlockRes();
}
-
- LockRes();
- CONRES *cons = (CONRES *)GetNextRes(R_CONSOLE, (RES *)NULL);
- UnlockRes();
+ /* If no console, take first one */
+ if (!cons) {
+ LockRes();
+ cons = (CONRES *)GetNextRes(R_CONSOLE, (RES *)NULL);
+ UnlockRes();
+ }
senditf(_("Connecting to Director %s:%d\n"), dir->address,dir->DIRport);
terminate_console(0);
return 1;
}
-
}
/* Initialize Director TLS context */
* Kern Sibbald, January MM, September MM
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
{"tlscacertificatedir", store_dir, ITEM(res_cons.tls_ca_certdir), 0, 0, 0},
{"tlscertificate", store_dir, ITEM(res_cons.tls_certfile), 0, 0, 0},
{"tlskey", store_dir, ITEM(res_cons.tls_keyfile), 0, 0, 0},
+ {"director", store_str, ITEM(res_cons.director), 0, 0, 0},
{NULL, NULL, {0}, 0, 0, 0}
};
* Version $Id$
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
char *tls_ca_certdir; /* TLS CA Certificate Directory */
char *tls_certfile; /* TLS Client Certificate File */
char *tls_keyfile; /* TLS Client Key File */
+ char *director; /* bind to director */
TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
};
}
-/* A bit brain damaged in that if the user has not done
- * a "use catalog xxx" command, we simply find the first
- * catalog resource and open it.
+/*
+ * Open the catalog database.
*/
bool open_db(UAContext *ua)
{
return true;
}
if (!ua->catalog) {
- LockRes();
- ua->catalog = (CAT *)GetNextRes(R_CATALOG, NULL);
- UnlockRes();
+ ua->catalog = get_catalog_resource(ua);
if (!ua->catalog) {
bsendmsg(ua, _("Could not find a Catalog resource\n"));
return false;
- } else if (!acl_access_ok(ua, Catalog_ACL, ua->catalog->hdr.name)) {
- bsendmsg(ua, _("You must specify a \"use <catalog-name>\" command before continuing.\n"));
- ua->catalog = NULL;
- return false;
- } else {
- bsendmsg(ua, _("Using default Catalog name=%s DB=%s\n"),
- ua->catalog->hdr.name, ua->catalog->db_name);
}
}
* Version $Id$
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
General:
07Sep06
+kes Use get_catalog_resource() to open catalog database
+ to ensure that ACLs are respected and that user is
+ correctly prompted for database.
+kes Integrate multiple console/director patch from
+ Carsten Paeth calle@calle.in-berlin.de
ebl Add character substitution in Job/JobDefs WriteBootStrap.
You can use now 'WriteBootStrap = "/path/%c_%n.bsr"'
kes Apply patch supplied in bug #656 to pass priority field