- if (!cram_md5_auth(bs, director->password) ||
- !cram_md5_get_auth(bs, director->password)) {
- Emsg0(M_FATAL, 0, _("Incorrect password given by Director.\n"));
+ btimer_t *tid = start_bsock_timer(bs, AUTH_TIMEOUT);
+ auth = cram_md5_auth(bs, director->password, ssl_need);
+ if (auth) {
+ get_auth = cram_md5_get_auth(bs, director->password, ssl_need);
+ if (!get_auth) {
+ Dmsg1(50, "cram_get_auth failed for %s\n", bs->who);
+ }
+ } else {
+ Dmsg1(50, "cram_auth failed for %s\n", bs->who);
+ }
+ if (!auth || !get_auth) {
+ Emsg1(M_FATAL, 0, _("Incorrect password given by Director at %s.\n"
+ "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"),
+ bs->who);