]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/authenticate.c
Make cd accept wildcards
[bacula/bacula] / bacula / src / stored / authenticate.c
index f765eafd3a3a37a896234d6ff3e2330e8fc912f4..0b7a97fa635e62d368e6327d72084f118b457cb9 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2011 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    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
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -30,8 +30,6 @@
  *
  *   Kern Sibbald, October 2000
  *
- *   Version $Id$
- *
  */
 
 
@@ -84,14 +82,15 @@ static int authenticate(int rcode, BSOCK *bs, JCR* jcr)
    director = NULL;
    unbash_spaces(dirname);
    foreach_res(director, rcode) {
-      if (strcmp(director->hdr.name, dirname) == 0)
+      if (strcmp(director->hdr.name, dirname) == 0) {
          break;
+      }
    }
    if (!director) {
       Dmsg2(dbglvl, "Connection from unknown Director %s at %s rejected.\n",
             dirname, bs->who());
       Jmsg2(jcr, M_FATAL, 0, _("Connection from unknown Director %s at %s rejected.\n"
-       "Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION003760000000000000000 for help.\n"),
+       "Please see " MANUAL_AUTH_URL " for help.\n"),
             dirname, bs->who());
       free_pool_memory(dirname);
       return 0;
@@ -128,7 +127,7 @@ static int authenticate(int rcode, BSOCK *bs, JCR* jcr)
 
    if (!auth_success) {
       Jmsg0(jcr, M_FATAL, 0, _("Incorrect password given by Director.\n"
-       "Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION003760000000000000000 for help.\n"));
+       "Please see " MANUAL_AUTH_URL " for help.\n"));
       auth_success = false;
       goto auth_fatal;
    }
@@ -230,15 +229,15 @@ int authenticate_filed(JCR *jcr)
        /* Respond to his challenge */
        auth_success = cram_md5_respond(fd, jcr->sd_auth_key, &tls_remote_need, &compatible);
        if (!auth_success) {
-          Dmsg1(dbglvl, "cram-get-auth failed with %s\n", fd->who());
+          Dmsg1(dbglvl, "Respond cram-get-auth failed with %s\n", fd->who());
        }
    } else {
-      Dmsg1(dbglvl, "cram-auth failed with %s\n", fd->who());
+      Dmsg1(dbglvl, "Challenge cram-auth failed with %s\n", fd->who());
    }
 
    if (!auth_success) {
       Jmsg(jcr, M_FATAL, 0, _("Incorrect authorization key from File daemon at %s rejected.\n"
-       "Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION003760000000000000000 for help.\n"),
+       "Please see " MANUAL_AUTH_URL " for help.\n"),
            fd->who());
       auth_success = false;
       goto auth_fatal;
@@ -278,7 +277,7 @@ auth_fatal:
    stop_bsock_timer(tid);
    if (!auth_success) {
       Jmsg(jcr, M_FATAL, 0, _("Incorrect authorization key from File daemon at %s rejected.\n"
-       "Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION003760000000000000000 for help.\n"),
+       "Please see " MANUAL_AUTH_URL " for help.\n"),
            fd->who());
    }
    jcr->authenticated = auth_success;