[pkg-bacula-commits] [bacula] 01/01: Imported upstream version 7.4.0a
Carsten Leonhardt
leo at moszumanska.debian.org
Mon May 30 12:26:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
leo pushed a commit to branch upstream
in repository bacula.
commit 0c33906af4792771a816ef1227abab23ed1fd2a9
Author: Carsten Leonhardt <leo at debian.org>
Date: Mon May 30 14:24:32 2016 +0200
Imported upstream version 7.4.0a
Corresponds to upstream git tag Release-7.4.0a
Changes from upstream:
src/lib/sha1.{h,c}: (#658326) remove, DFSG-nonfree, RFC 3174
---
ReleaseNotes | 9 +-
src/cats/create_postgresql_database.in | 2 +
src/cats/update_mysql_tables.in | 3 -
src/cats/update_postgresql_tables.in | 2 +-
src/dird/Makefile.in | 5 +-
src/dird/ua_output.c | 5 +-
src/dird/ua_update.c | 5 +-
src/findlib/fstype.c | 6 +-
src/tools/Makefile.in | 7 +-
src/tools/fstype.c | 6 +-
src/tools/smtp-orig.c | 455 ---------------------------------
src/version.h | 6 +-
12 files changed, 27 insertions(+), 484 deletions(-)
diff --git a/ReleaseNotes b/ReleaseNotes
index eaba613..89d6983 100644
--- a/ReleaseNotes
+++ b/ReleaseNotes
@@ -3,12 +3,11 @@
Release version 7.4.0
-The diff between Bacula 7.0.6 and Bacula 7.2.0 is 254,442
-which represents very large change, for the most part
-contributed to the Bacula project by Bacula Systems SA.
+For the most part the changes were contributed to the Bacula
+project by Bacula Systems SA.
This is a new release with a new version number. It has been
-very thourouly tested, but as always, the new features may not
+very thoroughly tested, but as always, the new features may not
always work as expected.
The Catalog database format has not changed since version the
@@ -49,7 +48,7 @@ New Features and changes summary:
- Implement a more efficient Volume selection algorithm between DIR and SD
- Implement new list/llist command keywords:
order=asc|ascending
- order=desc|decending
+ order=desc|descending
limit=nn
jobstatus=
Client=
diff --git a/src/cats/create_postgresql_database.in b/src/cats/create_postgresql_database.in
index a823607..940ee96 100644
--- a/src/cats/create_postgresql_database.in
+++ b/src/cats/create_postgresql_database.in
@@ -54,6 +54,7 @@ else
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "!!!! Creation of ${db_name} database failed. !!!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+ exit 1
fi
if psql -l | grep " ${db_name}.*SQL_ASCII" >/dev/null; then
echo "Database encoding OK"
@@ -61,4 +62,5 @@ else
echo " "
echo "Database encoding bad. Do not use this database"
echo " "
+ exit 1
fi
diff --git a/src/cats/update_mysql_tables.in b/src/cats/update_mysql_tables.in
index 4ae0513..08df0d8 100644
--- a/src/cats/update_mysql_tables.in
+++ b/src/cats/update_mysql_tables.in
@@ -143,7 +143,4 @@ END-OF-DATA
fi
fi
-
-END-OF-DATA
-
exit 0
diff --git a/src/cats/update_postgresql_tables.in b/src/cats/update_postgresql_tables.in
index c3db92a..6690d60 100644
--- a/src/cats/update_postgresql_tables.in
+++ b/src/cats/update_postgresql_tables.in
@@ -63,7 +63,7 @@ CREATE TABLE RestoreObject (
);
CREATE INDEX restore_jobid_idx on RestoreObject(JobId);
-UPDATE Version SET VersionId=12;
+UPDATE Version SET VersionId=13;
COMMIT;
END-OF-DATA
diff --git a/src/dird/Makefile.in b/src/dird/Makefile.in
index 2567372..2ee1d93 100644
--- a/src/dird/Makefile.in
+++ b/src/dird/Makefile.in
@@ -23,6 +23,7 @@ DEBUG=@DEBUG@
GETTEXT_LIBS = @LIBINTL@
CAP_LIBS = @CAP_LIBS@
+ZLIBS=@ZLIBS@
DB_LIBS=@DB_LIBS@
first_rule: all
@@ -65,14 +66,14 @@ bacula-dir: Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libb
../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
@echo "Linking $@ ..."
- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) $(ZLIBS) \
-lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
$(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
static-bacula-dir: Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) $(ZLIBS) \
-lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
$(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
strip $@
diff --git a/src/dird/ua_output.c b/src/dird/ua_output.c
index 49b578d..70f87f4 100644
--- a/src/dird/ua_output.c
+++ b/src/dird/ua_output.c
@@ -142,7 +142,7 @@ int show_cmd(UAContext *ua, const char *cmd)
int i, j, type, len;
int recurse;
char *res_name;
- RES *res = NULL;
+ RES *res;
Dmsg1(20, "show: %s\n", ua->UA_sock->msg);
@@ -155,7 +155,7 @@ int show_cmd(UAContext *ua, const char *cmd)
}
type = 0;
-
+ res = NULL;
res_name = ua->argk[i];
if (!ua->argv[i]) { /* was a name given? */
/* No name, dump all resources of specified type */
@@ -172,7 +172,6 @@ int show_cmd(UAContext *ua, const char *cmd)
break;
}
}
-
} else {
/* Dump a single resource with specified name */
recurse = 0;
diff --git a/src/dird/ua_update.c b/src/dird/ua_update.c
index fdfe7d7..9d1a170 100644
--- a/src/dird/ua_update.c
+++ b/src/dird/ua_update.c
@@ -291,9 +291,8 @@ static void update_volslot(UAContext *ua, char *val, MEDIA_DBR *mr)
return;
}
mr->Slot = atoi(val);
- if (pr.MaxVols > 0 && mr->Slot > (int)pr.MaxVols) {
- ua->error_msg(_("Invalid slot, it must be between 0 and MaxVols=%d\n"),
- pr.MaxVols);
+ if (mr->Slot < 0) {
+ ua->error_msg(_("Invalid slot, it must be greater than zero\n"));
return;
}
/*
diff --git a/src/findlib/fstype.c b/src/findlib/fstype.c
index ab3b206..4fc4f26 100644
--- a/src/findlib/fstype.c
+++ b/src/findlib/fstype.c
@@ -67,9 +67,9 @@ static int compare_mtab_items(void *item1, void *item2)
return 0;
}
-void add_mtab_item(void *user_ctx, struct stat *st, const char *fstype,
- const char *mountpoint, const char *mntopts,
- const char *fsname)
+static void add_mtab_item(void *user_ctx, struct stat *st, const char *fstype,
+ const char *mountpoint, const char *mntopts,
+ const char *fsname)
{
rblist *mtab_list = (rblist *)user_ctx;
mtab_item *item, *ritem;
diff --git a/src/tools/Makefile.in b/src/tools/Makefile.in
index bd312cc..136d246 100644
--- a/src/tools/Makefile.in
+++ b/src/tools/Makefile.in
@@ -19,6 +19,7 @@ thisdir = src/tools
DEBUG=@DEBUG@
+ZLIBS=@ZLIBS@
DB_LIBS=@DB_LIBS@
first_rule: all
@@ -69,7 +70,7 @@ bregtest: Makefile bregtest.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
dbcheck: Makefile dbcheck.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) $(DIRCONFOBJS)
$(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) \
- -lbaccats -lbacsql -lbaccfg -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ -lbaccats -lbacsql -lbaccfg -lbac -lm $(ZLIBS) $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
fstype: Makefile fstype.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
$(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ fstype.o -lbacfind -lbac -lm \
@@ -112,12 +113,12 @@ bwild: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) bwild.o
bbatch: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) bbatch.o
$(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -o $@ bbatch.o \
- -lbaccats -lbacsql -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ -lbaccats -lbacsql -lbac -lm $(ZLIBS) $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
bvfs_test: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) \
../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) bvfs_test.o
$(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -L../findlib -o $@ bvfs_test.o \
- -lbaccats -lbacsql -lbacfind -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ -lbaccats -lbacsql -lbacfind -lbac -lm $(ZLIBS) $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
cats_test.o: cats_test.c
echo "Compiling $<"
diff --git a/src/tools/fstype.c b/src/tools/fstype.c
index d61e0f2..f8240a7 100644
--- a/src/tools/fstype.c
+++ b/src/tools/fstype.c
@@ -68,9 +68,9 @@ void print_mtab_item(void *user_ctx, struct stat *st, const char *fstype,
((void *)st->st_dev), fstype, mountpoint, mntopts);
}
-void add_mtab_item(void *user_ctx, struct stat *st, const char *fstype,
- const char *mountpoint, const char *mntopts,
- const char *fsname)
+static void add_mtab_item(void *user_ctx, struct stat *st, const char *fstype,
+ const char *mountpoint, const char *mntopts,
+ const char *fsname)
{
rblist *mtab_list = (rblist *)user_ctx;
mtab_item *item, *ritem;
diff --git a/src/tools/smtp-orig.c b/src/tools/smtp-orig.c
deleted file mode 100644
index e736c0d..0000000
--- a/src/tools/smtp-orig.c
+++ /dev/null
@@ -1,455 +0,0 @@
-/*
-Subject: Re: send mail from chrooted Apache
- From: Wietse Venema (wietseporcupine.org)
- Date: Tue Jun 06 2000 - 07:43:31 CDT
-Next message: Wietse Venema: "Re: -"
-Previous message: Brad Knowles: "Re: performance issues"
-In reply to: ISM Kolemanov, Ivan: "send mail from chrooted Apache"
- ISM Kolemanov, Ivan:
- > hi all,
- >
- > I've just prepared Apache Web Server in chroot env.
- > but now I have a problem, I can't send mails from the web server
- > I mean that on the web server I have some formulars,
- > which my clients are using to send me mail.
- >
- > I guess that there is any solution for that, but up to now I didn't find it.
- > If anybody knows it please respond.
- >
- > 10x in advance
- > Ivan Kolemanov
-
-This is a quick-and-dirty stand-alone SMTP client from long ago.
- Works OK for lines up to BUFSIZ characters, nothing to worry about
- security-wise. You could probably do the same in PERL, but I wrote
- this for a web server that allowed no programming languages inside
- the jail.
-
- Wietse
- */
-/*++
- /* NAME
- /* smtp 1
- /* SUMMARY
- /* simple smtp client
- /* SYNOPSIS
- /* smtp [options] recipient(s)...
- /* DESCRIPTION
- /* \fIsmtp\fP is a minimal smtp client that takes an email
- /* message body and passes it on to an smtp daemon (default
- /* the smtp daemon on the local host). Since it is
- /* completely self-supporting, the smtp client is especially
- /* suitable for use in restricted environments.
- /*
- /* Options:
- /* .TP
- /* -c carbon-copy
- /* Specifies one Cc: address to send one copy of the message to.
- /* .TP
- /* -e errors-to
- /* Specifies the Errors-To: address. This is where delivery
- /* problems should be reported.
- /* .TP
- /* -f from
- /* Sets the From: address. Default is "daemon", which is
- /* probably wrong.
- /* .TP
- /* -m mailhost
- /* Specifies where the mail should be posted. By default, the
- /* mail is posted to the smtp daemon on \fIlocalhost\fR.
- /* .TP
- /* -M
- /* Use MIME-style translation to quoted-printable (base 16).
- /* .TP
- /* -r reply-to
- /* Sets the Reply-To: address.
- /* .TP
- /* -s subject
- /* Specifies the message subject.
- /* .TP
- /* -v
- /* Turn on verbose logging to stdout.
- /* DIAGNOSTICS
- /* Non-zero exit status in case of problems. Errors are reported
- /* to the syslogd, with facility daemon.
- /* AUTHOR(S)
- /* W.Z. Venema
- /* Eindhoven University of Technology
- /* Department of Mathematics and Computer Science
- /* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
- /* CREATION DATE
- /* Wed Dec 1 14:51:13 MET 1993
- /* LAST UPDATE
- /* Fri Aug 11 12:29:23 MET DST 1995
- /*--*/
-
-/* System libraries */
-
-#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <syslog.h>
- #include <stdio.h>
- #include <netdb.h>
- #include <string.h>
- #include <ctype.h>
- #include <pwd.h>
-
-#ifdef __STDC__
- #include <stdarg.h>
- #define VARARGS(func,arg,type) func(type arg, ...)
- #define VASTART(ap,name,type) { va_start(ap, name)
- #define VAEND(ap) va_end(ap); }
- #else
- #include <varargs.h>
- #define VARARGS(func,arg,type) func(va_alist) \
- va_dcl
- #define VASTART(ap,name,type) { type name; \
- va_start(ap); \
- name = va_arg(ap, type)
- #define VAEND(ap) va_end(ap); }
- #endif /* __STDC__ */
-
-extern int optind;
- extern char *optarg;
-
-/* Local stuff */
-
-static char *cc_addr = 0;
- static char *err_addr = 0;
- static char *from_addr = "daemon";
- static char *mailhost = "localhost";
- static char *reply_addr = 0;
- static char *subject = 0;
- static int mime_style = 0;
- static int verbose = 0;
-
-static FILE *sfp;
- static FILE *rfp;
-
-#define dprintf if (verbose) printf
- #define dvprintf if (verbose) vprintf
-
-void toqp();
-
-/* usage - explain and bail out */
-
-void usage()
- {
- syslog(LOG_ERR,
- "usage: smtp [-c cc] [-e errors-to] [-f from] [-m mailhost] [-M] [-r reply-to] [-s subject] [-v] recipents..\n");
- exit(1);
- }
-
-/* get_response - examine message from server */
-
-void get_response()
- {
- char buf[BUFSIZ];
-
- while (fgets(buf, sizeof(buf), rfp)) {
- buf[strlen(buf) - 1] = 0;
- dprintf(">>>> %s\n", buf);
- if (!isdigit(buf[0]) || buf[0] > '3') {
- syslog(LOG_ERR, "unexpected reply: %s", buf);
- exit(1);
- }
- if (buf[4] != '-')
- break;
- }
- }
-
-/* chat - say something to server and check the response */
-
-void VARARGS(chat, fmt, char *)
- {
- va_list ap;
-
- /* Format the message. */
-
- VASTART(ap, fmt, char *);
- vfprintf(sfp, fmt, ap);
- VAEND(ap);
-
- VASTART(ap, fmt, char *);
- dvprintf(fmt, ap);
- VAEND(ap);
-
- /* Send message to server and parse its response. */
-
- fflush(sfp);
- get_response();
- }
-
-main(argc, argv)
- int argc;
- char **argv;
- {
- char buf[BUFSIZ];
- char my_name[BUFSIZ];
- struct sockaddr_in sin;
- struct hostent *hp;
- struct servent *sp;
- int c;
- int s;
- int r;
- int i;
- struct passwd *pwd;
-
- openlog(argv[0], LOG_PID, LOG_DAEMON);
-
- /* Go away when something gets stuck. */
-
- alarm(60);
-
- /* Parse JCL. */
-
- while ((c = getopt(argc, argv, "c:e:f:m:Mr:s:v")) != EOF) {
- switch (c) {
- case 'c': /* carbon copy */
- cc_addr = optarg;
- break;
- case 'e': /* errors-to */
- err_addr = optarg;
- break;
- case 'f': /* originator */
- from_addr = optarg;
- break;
- case 'm': /* mailhost */
- mailhost = optarg;
- break;
- case 'M': /* MIME quoted printable */
- mime_style = 1;
- break;
- case 'r': /* reply-to */
- reply_addr = optarg;
- break;
- case 's': /* subject */
- subject = optarg;
- break;
- case 'v': /* log protocol */
- verbose = 1;
- break;
- default:
- usage();
- /* NOTREACHED */
- }
- }
- if (argc == optind)
- usage();
-
- /* Find out my own host name for HELO; if possible, get the FQDN. */
-
- if (gethostname(my_name, sizeof(my_name) - 1) < 0) {
- syslog(LOG_ERR, "gethostname: %m");
- exit(1);
- }
- if ((hp = gethostbyname(my_name)) == 0) {
- syslog(LOG_ERR, "%s: unknown host\n", my_name);
- exit(1);
- }
- strncpy(my_name, hp->h_name, sizeof(my_name) - 1);
-
- /* Connect to smtp daemon on mailhost. */
-
- if ((hp = gethostbyname(mailhost)) == 0) {
- syslog(LOG_ERR, "%s: unknown host\n", mailhost);
- exit(1);
- }
- if (hp->h_addrtype != AF_INET) {
- syslog(LOG_ERR, "unknown address family: %d", hp->h_addrtype);
- exit(1);
- }
- memset((char *) &sin, 0, sizeof(sin));
- memcpy((char *) &sin.sin_addr, hp->h_addr, hp->h_length);
- sin.sin_family = hp->h_addrtype;
- if ((sp = getservbyname("smtp", "tcp")) != 0) {
- sin.sin_port = sp->s_port;
- } else {
- syslog(LOG_ERR, "smtp/tcp: unknown service");
- exit(1);
- }
- if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- syslog(LOG_ERR, "socket: %m");
- exit(1);
- }
- if (connect(s, (struct sockaddr *) & sin, sizeof(sin)) < 0) {
- syslog(LOG_ERR, "connect: %m");
- exit(1);
- }
- if ((r = dup(s)) < 0) {
- syslog(LOG_ERR, "dup: %m");
- exit(1);
- }
- if ((sfp = fdopen(s, "w")) == 0) {
- syslog(LOG_ERR, "fdopen: %m");
- exit(1);
- }
- if ((rfp = fdopen(r, "r")) == 0) {
- syslog(LOG_ERR, "fdopen: %m");
- exit(1);
- }
- /* Speak SMTP. */
-
- get_response(); /* banner */
-
- chat("HELO %s\r\n", my_name);
-
- chat("MAIL FROM: <%s>\r\n", from_addr);
-
- for (i = optind; i < argc; i++)
- chat("RCPT TO: <%s>\r\n", argv[i]);
- if (cc_addr)
- chat("RCPT TO: <%s>\r\n", cc_addr);
-
- chat("DATA\r\n");
-
- /* Do message header. */
-
- fprintf(sfp, "From: %s\r\n", from_addr);
-
- if (subject)
- fprintf(sfp, "Subject: %s\r\n", subject);
-
- if (err_addr)
- fprintf(sfp, "Errors-To: %s\r\n", err_addr);
-
- if (reply_addr)
- fprintf(sfp, "Reply-To: %s\r\n", reply_addr);
-
- if ((pwd = getpwuid(getuid())) == 0) {
- fprintf(sfp, "Sender: userid-%d%s\r\n", getuid(), my_name);
- } else {
- fprintf(sfp, "Sender: %s%s\r\n", pwd->pw_name, my_name);
- }
-
- fprintf(sfp, "To: %s", argv[optind]);
- for (i = optind + 1; i < argc; i++)
- fprintf(sfp, ", %s", argv[i]);
- fprintf(sfp, "\r\n");
-
- if (cc_addr)
- fprintf(sfp, "Cc: %s\r\n", cc_addr);
-
- if (mime_style) {
- fprintf(sfp, "Mime-Version: 1.0\r\n");
- fprintf(sfp, "Content-Type: text/plain; charset=ISO-8859-1\r\n");
- fprintf(sfp, "Content-Transfer-Encoding: quoted-printable\r\n");
- }
- fprintf(sfp, "\r\n");
-
- /* Do message body. */
-
- if (mime_style) { /* MIME quoted-printable */
- toqp(stdin, sfp);
- } else { /* traditional... */
- while (fgets(buf, sizeof(buf), stdin)) {
- buf[strlen(buf) - 1] = 0;
- if (strcmp(buf, ".") == 0) { /* quote lone dots */
- fprintf(sfp, "..\r\n");
- } else { /* pass thru mode */
- fprintf(sfp, "%s\r\n", buf);
- }
- }
- }
- chat(".\r\n");
- chat("QUIT\r\n");
- exit(0);
- }
-
- /*
- * Following code was lifted from the metamail version 2.7 source code
- * (codes.c) and modified to emit \r\n at line boundaries.
- */
-
-static char basis_hex[] = "0123456789ABCDEF";
-
-/* toqp - transform to MIME-style quoted printable */
-
-void toqp(infile, outfile)
- FILE *infile,
- *outfile;
- {
- int c,
- ct = 0,
- prevc = 255;
-
- while ((c = getc(infile)) != EOF) {
- if ((c < 32 && (c != '\n' && c != '\t'))
- || (c == '=')
- || (c >= 127)
-
- /*
- * Following line is to avoid single periods alone on lines, which
- * messes up some dumb smtp implementations, sigh...
- */
- || (ct == 0 && c == '.')) {
- putc('=', outfile);
- putc(basis_hex[c >> 4], outfile);
- putc(basis_hex[c & 0xF], outfile);
- ct += 3;
- prevc = 'A'; /* close enough */
- } else if (c == '\n') {
- if (prevc == ' ' || prevc == '\t') {
- putc('=', outfile); /* soft & hard lines */
- putc(c, outfile);
- }
- putc(c, outfile);
- ct = 0;
- prevc = c;
- } else {
- if (c == 'F' && prevc == '\n') {
-
- /*
- * HORRIBLE but clever hack suggested by MTR for
- * sendmail-avoidance
- */
- c = getc(infile);
- if (c == 'r') {
- c = getc(infile);
- if (c == 'o') {
- c = getc(infile);
- if (c == 'm') {
- c = getc(infile);
- if (c == ' ') {
- /* This is the case we are looking for */
- fputs("=46rom", outfile);
- ct += 6;
- } else {
- fputs("From", outfile);
- ct += 4;
- }
- } else {
- fputs("Fro", outfile);
- ct += 3;
- }
- } else {
- fputs("Fr", outfile);
- ct += 2;
- }
- } else {
- putc('F', outfile);
- ++ct;
- }
- ungetc(c, infile);
- prevc = 'x'; /* close enough -- printable */
- } else { /* END horrible hack */
- putc(c, outfile);
- ++ct;
- prevc = c;
- }
- }
- if (ct > 72) {
- putc('=', outfile);
- putc('\r', outfile); /* XXX */
- putc('\n', outfile);
- ct = 0;
- prevc = '\n';
- }
- }
- if (ct) {
- putc('=', outfile);
- putc('\r', outfile); /* XXX */
- putc('\n', outfile);
- }
- }
diff --git a/src/version.h b/src/version.h
index 38f93fb..90d2813 100644
--- a/src/version.h
+++ b/src/version.h
@@ -5,9 +5,9 @@
#define COMMUNITY 1 /* Define to create a Windows community binary */
/* Note: there can be only *one* VERSION in this file */
-#define VERSION "7.4.0"
-#define BDATE "16 January 2016"
-#define LSMDATE "16Jan16"
+#define VERSION "7.4.1"
+#define BDATE "15 February 2016"
+#define LSMDATE "15Feb16"
#define RELEASE 1 /* Use ONLY in rpms */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git
More information about the pkg-bacula-commits
mailing list