--- /dev/null
+
+ This patch fixes the infinite loop when trying to increase the
+ maximum number of volumes in a Pool during the add command.
+ This patch fixes bug #1008.
+
+ It can be applied to Bacula version 2.2.6 (and probably earlier
+ 2.2.x versions) with:
+
+ cd <bacula-source>
+ ./configure <your options>
+ patch -p0 <2.2.6-add.patch
+ make
+ ...
+ make install
+
+Index: src/dird/ua_cmds.c
+===================================================================
+--- src/dird/ua_cmds.c (revision 5901)
++++ src/dird/ua_cmds.c (working copy)
+@@ -244,12 +244,10 @@
+
+ while (pr.MaxVols > 0 && pr.NumVols >= pr.MaxVols) {
+ ua->warning_msg(_("Pool already has maximum volumes=%d\n"), pr.MaxVols);
+- for (;;) {
+- if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
+- return 1;
+- }
+- pr.MaxVols = ua->pint32_val;
++ if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
++ return 1;
+ }
++ pr.MaxVols = ua->pint32_val;
+ }
+
+ /* Get media type */
#define STREAM_ENCRYPTED_FILE_GZIP_DATA 23 /* Encrypted, compressed data */
#define STREAM_ENCRYPTED_WIN32_GZIP_DATA 24 /* Encrypted, compressed Win32 BackupRead data */
#define STREAM_ENCRYPTED_MACOS_FORK_DATA 25 /* Encrypted, uncompressed Mac resource fork */
+#define STREAM_PLUGIN_NAME 26 /* Plugin "file" string */
+#define STREAM_PLUGIN_DATA 27 /* Plugin specific data */
/*
* NOTE!!! These are saved in the Attributes record on the tape, so
* do not change them. If need be, add to them.
*
- * This is stored as 32 bits on tape, but only FT_MASK bits are
+ * This is stored as 32 bits on the Volume, but only FT_MASK (16) bits are
* used for the file type. The upper bits are used to indicate
* additional optional fields in the attribute record.
*/
#define FT_INVALIDFS 19 /* File system not allowed for */
#define FT_INVALIDDT 20 /* Drive type not allowed for */
#define FT_REPARSE 21 /* Win NTFS reparse point */
+#define FT_PLUGIN 22 /* Plugin generated filename */
/* Definitions for upper part of type word (see above). */
#define AR_DATA_STREAM (1<<16) /* Data stream id present */
while (pr.MaxVols > 0 && pr.NumVols >= pr.MaxVols) {
ua->warning_msg(_("Pool already has maximum volumes=%d\n"), pr.MaxVols);
- for (;;) {
- if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
- return 1;
- }
- pr.MaxVols = ua->pint32_val;
+ if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
+ return 1;
}
+ pr.MaxVols = ua->pint32_val;
}
/* Get media type */
}
break;
}
-getVolName:
- if (num == 0) {
- if (!get_cmd(ua, _("Enter Volume name: "))) {
- return 1;
+
+ for (;;) {
+ if (num == 0) {
+ if (!get_cmd(ua, _("Enter Volume name: "))) {
+ return 1;
+ }
+ } else {
+ if (!get_cmd(ua, _("Enter base volume name: "))) {
+ return 1;
+ }
}
- } else {
- if (!get_cmd(ua, _("Enter base volume name: "))) {
- return 1;
+ /* Don't allow | in Volume name because it is the volume separator character */
+ if (!is_volume_name_legal(ua, ua->cmd)) {
+ continue;
}
- }
- /* Don't allow | in Volume name because it is the volume separator character */
- if (!is_volume_name_legal(ua, ua->cmd)) {
- goto getVolName;
- }
- if (strlen(ua->cmd) >= MAX_NAME_LENGTH-10) {
- ua->warning_msg(_("Volume name too long.\n"));
- goto getVolName;
- }
- if (strlen(ua->cmd) == 0) {
- ua->warning_msg(_("Volume name must be at least one character long.\n"));
- goto getVolName;
+ if (strlen(ua->cmd) >= MAX_NAME_LENGTH-10) {
+ ua->warning_msg(_("Volume name too long.\n"));
+ continue;
+ }
+ if (strlen(ua->cmd) == 0) {
+ ua->warning_msg(_("Volume name must be at least one character long.\n"));
+ continue;
+ }
+ break;
}
bstrncpy(name, ua->cmd, sizeof(name));
* On FreeBSD, all block devices are character devices, so
* to be able to read a raw disk, we need the check for
* a character device.
- * crw-r----- 1 root operator - 116, 0x00040002 Jun 9 19:32 /dev/ad0s3
- * crw-r----- 1 root operator - 116, 0x00040002 Jun 9 19:32 /dev/rad0s3
+ * crw-r----- 1 root operator - 116, 0x00040002 Jun 9 19:32 /dev/ad0s3
+ * crw-r----- 1 root operator - 116, 0x00040002 Jun 9 19:32 /dev/rad0s3
*/
if (top_level && (S_ISBLK(ff_pkt->statp.st_mode) || S_ISCHR(ff_pkt->statp.st_mode))) {
#else
Technical notes on version 2.3
General:
+14Nov07
+kes This patch fixes the infinite loop when trying to increase the
+ maximum number of volumes in a Pool during the add command.
+ This patch fixes bug #1008.
+
+Release Version 2.2.6
+09Nov07
+db Remove extra data on estimate command in joblist for bat.
04Nov07
kes Cleanup of code in SD that sets the LastWritten date. This doesn't
really change anything, but is the beginning of doing it *right*.
12Oct07
kes Fix spurious warning message printed when creating a volume with
a LabelFormat. This fixes bug #976.
+
+Release Version 2.2.5
+09Oct07
+kes Add JobId in place of Job name in all the Jmsg() output.
+kes Correct the APP_DESC for the Win32 storage service (remove an e).
07Oct07
kes Make maxvol-test and new more strict maxvol2-test work.
kes Print JobId in all Jmsg() job output.