~ubuntu-branches/ubuntu/precise/krb5/precise-updates

« back to all changes in this revision

Viewing changes to src/lib/kadm5/logger.c

  • Committer: Package Import Robot
  • Author(s): Sam Hartman
  • Date: 2011-12-01 19:34:41 UTC
  • mfrom: (28.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20111201193441-9tipg3aru1jsidyv
Tags: 1.10+dfsg~alpha1-6
* Fix segfault with unknown hostnames in krb5_sname_to_principal,
  Closes: #650671
* Indicate that this library breaks libsmbclient versions that depend on
  krb5_locate_kdc, Closes: #650603, #650611

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 
2
/* lib/kadm5/logger.c */
2
3
/*
3
 
 * lib/kadm/logger.c
4
 
 *
5
4
 * Copyright 1995, 2007 by the Massachusetts Institute of Technology.
6
5
 * All Rights Reserved.
7
6
 *
23
22
 * M.I.T. makes no representations about the suitability of
24
23
 * this software for any purpose.  It is provided "as is" without express
25
24
 * or implied warranty.
26
 
 *
27
25
 */
28
26
 
29
27
/* KADM5 wants non-syslog log files to contain syslog-like entries */
55
53
#define LOG_ERR         0
56
54
#endif  /* LOG_ERR */
57
55
 
58
 
#define lspec_parse_err_1       "%s: cannot parse <%s>\n"
59
 
#define lspec_parse_err_2       "%s: warning - logging entry syntax error\n"
60
 
#define log_file_err            "%s: error writing to %s\n"
61
 
#define log_device_err          "%s: error writing to %s device\n"
 
56
#define lspec_parse_err_1       _("%s: cannot parse <%s>\n")
 
57
#define lspec_parse_err_2       _("%s: warning - logging entry syntax error\n")
 
58
#define log_file_err            _("%s: error writing to %s\n")
 
59
#define log_device_err          _("%s: error writing to %s device\n")
62
60
#define log_ufo_string          "?\?\?" /* nb: avoid trigraphs */
63
 
#define log_emerg_string        "EMERGENCY"
64
 
#define log_alert_string        "ALERT"
65
 
#define log_crit_string         "CRITICAL"
66
 
#define log_err_string          "Error"
67
 
#define log_warning_string      "Warning"
68
 
#define log_notice_string       "Notice"
69
 
#define log_info_string         "info"
70
 
#define log_debug_string        "debug"
 
61
#define log_emerg_string        _("EMERGENCY")
 
62
#define log_alert_string        _("ALERT")
 
63
#define log_crit_string         _("CRITICAL")
 
64
#define log_err_string          _("Error")
 
65
#define log_warning_string      _("Warning")
 
66
#define log_notice_string       _("Notice")
 
67
#define log_info_string         _("info")
 
68
#define log_debug_string        _("debug")
71
69
 
72
70
/*
73
71
 * Output logging.
202
200
 
203
201
    /* If reporting an error message, separate it. */
204
202
    if (code) {
205
 
        char *emsg;
 
203
        const char *emsg;
206
204
        outbuf[sizeof(outbuf) - 1] = '\0';
207
205
 
208
206
        emsg = krb5_get_error_message (err_context, code);
966
964
                set_cloexec_file(f);
967
965
                log_control.log_entries[lindex].lfu_filep = f;
968
966
            } else {
969
 
                fprintf(stderr, "Couldn't open log file %s: %s\n",
 
967
                fprintf(stderr, _("Couldn't open log file %s: %s\n"),
970
968
                        log_control.log_entries[lindex].lfu_fname,
971
969
                        error_message(errno));
972
970
            }