X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=etc%2Fafpd%2Fstatus.c;h=eb5b99b30b970a95f96547e6e87260be38282c9a;hp=55862da5a5ea5d14c456102652035feea899557c;hb=4d70a1cdf1cab29dde087f4224759a1a910524b4;hpb=7f6fd6a70865f976a0778d41d3142d07031b0076 diff --git a/etc/afpd/status.c b/etc/afpd/status.c index 55862da5..eb5b99b3 100644 --- a/etc/afpd/status.c +++ b/etc/afpd/status.c @@ -416,7 +416,11 @@ static size_t status_directorynames(char *data, "status:DirectoryNames: specified service principal '%s' not found in keytab", principal); // XXX: should this be krb5_xfree? +#ifdef HAVE_KRB5_FREE_UNPARSED_NAME krb5_free_unparsed_name(context, principal); +#else + krb5_xfree(principal); +#endif goto krb5_cleanup; } krb5_free_principal(context, service_principal); @@ -454,7 +458,11 @@ krb5_error: error_msg = krb5_get_error_message(context, ret); LOG(log_note, logtype_afpd, "Can't get principal from default keytab: %s", (char *)error_msg); +#ifdef HAVE_KRB5_FREE_ERROR_MESSAGE krb5_free_error_message(context, error_msg); +#else + krb5_xfree(error_msg); +#endif } krb5_cleanup: @@ -605,10 +613,7 @@ void status_init(AFPObj *obj, DSI *dsi) status_machine(status); status_versions(status, dsi); status_uams(status, options->uamlist); - if (options->flags & OPTION_CUSTOMICON) - status_icon(status, icon, sizeof(icon), c); - else - status_icon(status, apple_atalk_icon, sizeof(apple_atalk_icon), c); + status_icon(status, icon, sizeof(icon), c); sigoff = status_signature(status, &c, options); /* c now contains the offset where the netaddress offset lives */ @@ -622,10 +627,6 @@ void status_init(AFPObj *obj, DSI *dsi) if ( statuslen < maxstatuslen) statuslen = status_utf8servername(status, &c, dsi, options); - if ((options->flags & OPTION_CUSTOMICON) == 0) { - status_icon(status, apple_tcp_icon, sizeof(apple_tcp_icon), 0); - } - dsi->signature = status + sigoff; dsi->statuslen = statuslen; } @@ -653,10 +654,10 @@ void set_signature(struct afp_options *options) { if (len == 0) { goto server_signature_auto; /* default */ } else if (len < 3) { - LOG(log_warning, logtype_afpd, "WARNING: signature string %s is very short !", options->signatureopt); + LOG(log_warning, logtype_afpd, "WARNING: signature string %s is very short!", options->signatureopt); goto server_signature_user; } else if (len > 16) { - LOG(log_warning, logtype_afpd, "WARNING: signature string %s is very long !", options->signatureopt); + LOG(log_warning, logtype_afpd, "WARNING: signature string %s is very long!", options->signatureopt); len = 16; goto server_signature_user; } else {