void lcase(char *str)
{
while (*str) {
- if (B_ISUPPER(*str))
+ if (B_ISUPPER(*str)) {
*str = tolower((int)(*str));
+ }
str++;
}
}
display_tape_error_status(jcr, dev);
if (forge_on || jcr->ignore_label_errors) {
dev->fsr(1); /* try skipping bad record */
- Pmsg0(000, _("Did fsr\n"));
+ Pmsg0(000, _("Did fsr in attemp to skip bad record.\n"));
continue; /* try to continue */
}
ok = false; /* stop everything */
testfind
fstype
drivetype
+gigaslam
@echo "Compiling $<"
$(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
-all: Makefile $(TOOLS)
+all: Makefile $(TOOLS) gigaslam
@echo "==== Make of tools is good ===="
@echo " "
$(CXX) -g $(LDFLAGS) -L. -L../lib -o $@ bwild.o \
$(DLIB) -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+gigaslam.o: gigaslam.c
+ $(CC) -c $<
+
+gigaslam: gigaslam.o
+ $(CC) -o $@ gigaslam.o
Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
--- /dev/null
+/*
+ By John Walker written ages ago.
+
+ Create a sparse file.
+
+ Beat denial of service floggers to death by persuading
+ them to download a HOW_BIG pseudo GIF file which is actually
+ a holey file occupying trivial space on our server.
+
+ Make: make gigaslam
+ Run: ./gigaslam
+ Output: a file named gigaslam.gif that contains something like
+ 16K bytes (i.e. 2-8K blocks), but appears to be 1GB in
+ length because the second block is written at a 1GB
+ address.
+
+ Be careful what you do with this file as not all programs know
+ how to deal with sparse files.
+
+*/
+
+#define HOW_BIG 1000000000ll
+
+#ifdef __GNUC__
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#ifndef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 64
+#endif
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+int main(void)
+{
+ FILE *fp = fopen("gigaslam.gif", "w");
+ char header[] = "<html>\n<table>\n<tr><td>\n";
+ char trailer[] = "</html>\n";
+ off_t howBig = HOW_BIG;
+
+ fwrite(header, sizeof header, 1, fp);
+ fseeko(fp, howBig - strlen(trailer), 0);
+ fwrite(trailer, strlen(trailer), 1, fp);
+ fclose(fp);
+ return 0;
+
+}
#undef VERSION
#define VERSION "1.39.29"
-#define BDATE "02 December 2006"
-#define LSMDATE "02Dec06"
+#define BDATE "04 December 2006"
+#define LSMDATE "04Dec06"
#define PROG_COPYRIGHT "Copyright (C) %d-2006 Free Software Foundation Europe e.V.\n"
#define BYEAR "2006" /* year for copyright messages in progs */
/* If this is set stdout will not be closed on startup */
#define DEVELOPER 1
-/* #define DATA_ENCRYPTION 1 */
+#define DATA_ENCRYPTION 1
#define USE_BSNPRINTF 1
Technical notes on version 1.39
General:
+04Dec06
+kes Enable data encryption code.
+kes Add gigaslam.c to src/tools. It creates a 1GB file that contains
+ only two blocks -- i.e. it is a real sparse file.
03Dec06
kes Enable disk seeking on restore.
kes Implement the SD 'Block Positioning = yes|no' directive. This