- Figure out how to use ssh or stunnel to protect Bacula communications.
For 1.31 release:
+- On Windows with very long path names, it may be impossible to create
+ a file (and thus restore it) because the total length is too long.
+ We must cd into the directory then create the file without the
+ full path name.
- Move JobFiles and JobBytes to SD rather than FD -- more correct.
- Add client name to cram-md5 challenge so Director can immediately
verify if it is the correct client.
- Instrument use_count on DEVICE packets and ensure that the device is
being close()ed at the appropriate time.
- Test long path names (>64 chars) in Windows -- crashes FD?
-
#include "bacula.h"
#include "filed.h"
+#ifdef HAVE_CYGWIN
+/* pthread_kill() dies on Cygwin, so disable it */
+#define pthread_kill(x, y)
+/* Use shorter wait interval on Cygwin because no kill */
+#define WAIT_INTERVAL 10
+
+#else /* Unix systems */
+#define WAIT_INTERVAL 60
+#endif
+
/*
* Listen on the SD socket for heartbeat signals.
* Send heartbeats to the Director every HB_TIME
* keep him alive.
*/
for ( ; !is_bnet_stop(sd); ) {
- n = bnet_wait_data_intr(sd, 60);
+ n = bnet_wait_data_intr(sd, WAIT_INTERVAL);
if (me->heartbeat_interval) {
now = time(NULL);
if (now-last_heartbeat >= me->heartbeat_interval) {
/* Wait for heartbeat thread to stop */
while (jcr->hb_bsock) {
-#ifndef HAVE_CYGWIN
/* Naturally, Cygwin 1.3.20 craps out on the following */
pthread_kill(jcr->heartbeat_id, TIMEOUT_SIGNAL); /* make heartbeat thread go away */
-#endif
bmicrosleep(0, 500);
}
}
#endif
) {
/* Note, if we are restoring as NON-root, this may not be fatal */
- Jmsg(jcr, M_WARNING, 0, _("Cannot change owner and/or group of %s: ERR=%s\n"),
+ Jmsg(jcr, M_ERROR, 0, _("Cannot change owner and/or group of %s: ERR=%s\n"),
quote(dirpath), strerror(errno));
}
Dmsg0(300, "Chown done.\n");
#endif
)
{
- Jmsg(jcr, M_WARNING, 0, _("Cannot change owner and/or group of %s: ERR=%s\n"),
+ Jmsg(jcr, M_ERROR, 0, _("Cannot change owner and/or group of %s: ERR=%s\n"),
quote(dirpath), strerror(errno));
}
}
Dmsg1(300, "Final chmod mode=%o\n", mode);
}
if ((mode & ~S_IRWXUGO) && chmod(basename_dir, mode)) {
- Jmsg(jcr, M_WARNING, 0, _("Cannot change permissions of %s: ERR=%s\n"),
+ Jmsg(jcr, M_ERROR, 0, _("Cannot change permissions of %s: ERR=%s\n"),
quote(dirpath), strerror(errno));
}
*(p->dirname_end) = '\0';
Dmsg2(300, "Reset parent mode=%o dir=%s\n", parent_mode, dirpath);
if (chmod(dirpath, parent_mode)) {
- Jmsg(jcr, M_WARNING, 0, _("Cannot change permissions of %s: ERR=%s\n"),
+ Jmsg(jcr, M_ERROR, 0, _("Cannot change permissions of %s: ERR=%s\n"),
quote (dirpath), strerror(errno));
}
}
&& errno != EPERM
#endif
) {
- Jmsg(jcr, M_WARNING, 0, _("Cannot change owner and/or group of %s: ERR=%s\n"),
+ Jmsg(jcr, M_ERROR, 0, _("Cannot change owner and/or group of %s: ERR=%s\n"),
quote(dirpath), strerror(errno));
}
if (chmod(dirpath, mode)) {
- Jmsg(jcr, M_WARNING, 0, _("Cannot change permissions of %s: ERR=%s\n"),
+ Jmsg(jcr, M_ERROR, 0, _("Cannot change permissions of %s: ERR=%s\n"),
quote(dirpath), strerror(errno));
}
Dmsg2(300, "pathexists chmod mode=%o dir=%s\n", mode, dirpath);