]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/gnome2-console/authenticate.c
- Continue implementing migration.
[bacula/bacula] / bacula / src / gnome2-console / authenticate.c
index f1c6febd746da12f039b0d88a06550ec45a854b4..4673df4c3e8bd1ae902dbc948dd7937c0b82dab7 100644 (file)
@@ -48,11 +48,12 @@ static char OKhello[]   = "1000 OK:";
 int authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons)
 {
    BSOCK *dir = jcr->dir_bsock;
-   int ssl_need = BNET_SSL_NONE;
+   int tls_local_need = BNET_TLS_NONE;
+   int tls_remote_need = BNET_TLS_NONE;
    char bashed_name[MAX_NAME_LENGTH];
    char *password;
 
-   /* 
+   /*
     * Send my name to the Director then do authentication
     */
    if (cons) {
@@ -67,11 +68,14 @@ int authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons)
    btimer_t *tid = start_bsock_timer(dir, 60 * 5);
    bnet_fsend(dir, hello, bashed_name);
 
-   if (!cram_md5_get_auth(dir, password, ssl_need) || 
-       !cram_md5_auth(dir, password, ssl_need)) {
+   if (!cram_md5_get_auth(dir, password, &tls_remote_need) ||
+       !cram_md5_auth(dir, password, tls_local_need)) {
       stop_bsock_timer(tid);
       printf(_("%s: Director authorization problem.\n"), my_name);
       set_text(_("Director authorization problem.\n"), -1);
+      set_text(_(
+       "Please see http://www.bacula.org/rel-manual/faq.html#AuthorizationErrors for help.\n"),
+        -1);
       return 0;
    }
 
@@ -79,9 +83,9 @@ int authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons)
    if (bnet_recv(dir) <= 0) {
       stop_bsock_timer(tid);
       set_textf(_("Bad response to Hello command: ERR=%s\n"),
-        bnet_strerror(dir));
+         bnet_strerror(dir));
       printf(_("%s: Bad response to Hello command: ERR=%s\n"),
-        my_name, bnet_strerror(dir));
+         my_name, bnet_strerror(dir));
       set_text(_("The Director is probably not running.\n"), -1);
       return 0;
    }