]> arthur.barton.de Git - netatalk.git/blobdiff - etc/uams/uams_gss.c
Merge master
[netatalk.git] / etc / uams / uams_gss.c
index da0411f949c4ff3e0483a99df2430f4481813405..c7ad9b226b39ef293c4d7e2cc0e21d3ac4a35aa2 100644 (file)
@@ -132,7 +132,7 @@ static int get_afpd_principal(void *obj, gss_name_t *server_name)
     size_t principal_length;
     gss_buffer_desc s_princ_buffer;
 
-    /* get all the required information from afpd */
+    /* get information from afpd */
     if (uam_afpserver_option(obj, UAM_OPTION_FQDN, (void*) &fqdn, &fqdnlen) < 0)
         return 1;
     LOG(log_debug, logtype_uams, "get_afpd_principal: fqdn: %s", fqdn);
@@ -141,11 +141,13 @@ static int get_afpd_principal(void *obj, gss_name_t *server_name)
         return 1;
     LOG(log_debug, logtype_uams, "get_afpd_principal: service: %s", service);
 
-    /* we need all the info, log error and return if one's missing */
+    /* if we don't have all the info, log that and return GSS_C_NO_NAME */
     if (!service || !servicelen || !fqdn || !fqdnlen) {
-        LOG(log_error, logtype_uams,
-            "get_afpd_principal: could not retrieve required information from afpd.");
-        return 1;
+        LOG(log_note, logtype_uams,
+            "get_afpd_principal: could not retrieve information from afpd, using default service principal(s)");
+
+              *server_name = GSS_C_NO_NAME;
+        return 0;
     }
 
     /* allocate memory to hold the temporary principal string */