]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/authenticate.c
Make migration work with new subroutine
[bacula/bacula] / bacula / src / dird / authenticate.c
index 1e178b2b29388bd1f6bad60198ad20d586079356..93d33ce29f3717fff8f727388b592df6a906e948 100644 (file)
  *
  */
 /*
-   Copyright (C) 2001-2004 Kern Sibbald and John Walker
+   Copyright (C) 2001-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
@@ -74,7 +69,6 @@ bool authenticate_storage_daemon(JCR *jcr, STORE *store)
       return 0;
    }
 
-#ifdef HAVE_TLS
    /* TLS Requirement */
    if (store->tls_enable) {
      if (store->tls_require) {
@@ -83,7 +77,6 @@ bool authenticate_storage_daemon(JCR *jcr, STORE *store)
         tls_local_need = BNET_TLS_OK;
      }
    }
-#endif
 
    auth_success = cram_md5_get_auth(sd, store->password, &tls_remote_need);
    if (auth_success) {
@@ -99,7 +92,7 @@ bool authenticate_storage_daemon(JCR *jcr, STORE *store)
       stop_bsock_timer(tid);
       Dmsg0(50, _("Director and Storage daemon passwords or names not the same.\n"));
       Jmsg0(jcr, M_FATAL, 0,
-            _("Unable to authenticate with Storage daemon. Possible causes:\n"
+            _("Director unable to authenticate with Storage daemon. Possible causes:\n"
             "Passwords or names not the same or\n"
             "Maximum Concurrent Jobs exceeded on the SD or\n"
             "SD networking messed up (restart daemon).\n"
@@ -360,7 +353,7 @@ int authenticate_user_agent(UAContext *uac)
 
       /* Engage TLS! Full Speed Ahead! */
       if (!bnet_tls_server(tls_ctx, ua, verify_list)) {
-         Emsg0(M_ERROR, 0, "TLS negotiation failed.\n");
+         Emsg0(M_ERROR, 0, _("TLS negotiation failed.\n"));
          auth_success = false;
          goto auth_done;
       }
@@ -377,6 +370,6 @@ auth_done:
       sleep(5);
       return 0;
    }
-   bnet_fsend(ua, "1000 OK: %s Version: " VERSION " (" BDATE ")\n", my_name);
+   bnet_fsend(ua, _("1000 OK: %s Version: %s (%s)\n"), my_name, VERSION, BDATE);
    return 1;
 }