fd463aed6a
Do not always canonicalize enterprise principals
161 lines
6.7 KiB
Diff
161 lines
6.7 KiB
Diff
From aec16ed11477f08f477f915fb8119271d688711c Mon Sep 17 00:00:00 2001
|
|
From: Robbie Harwood <rharwood@redhat.com>
|
|
Date: Thu, 19 Dec 2019 17:49:05 -0500
|
|
Subject: [PATCH] Don't warn in kadmin when no policy is specified
|
|
|
|
Not having policy defined is a normal occurrence. While it's a useful
|
|
message to log in case it's unexpected, the current form is
|
|
unnecessarily alarmist.
|
|
|
|
ticket: 8857 (new)
|
|
(cherry picked from commit 2ca842d5cbd5981ab5fa50e418359763c9f1a6d5)
|
|
---
|
|
doc/admin/admin_commands/kadmin_local.rst | 2 +-
|
|
doc/admin/database.rst | 4 ++--
|
|
doc/admin/install_kdc.rst | 6 +++---
|
|
src/kadmin/cli/kadmin.c | 4 ++--
|
|
src/man/kadmin.man | 2 +-
|
|
src/po/de.po | 8 ++++----
|
|
src/po/mit-krb5.pot | 4 ++--
|
|
7 files changed, 15 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/doc/admin/admin_commands/kadmin_local.rst b/doc/admin/admin_commands/kadmin_local.rst
|
|
index 71aa894f6..fafa61365 100644
|
|
--- a/doc/admin/admin_commands/kadmin_local.rst
|
|
+++ b/doc/admin/admin_commands/kadmin_local.rst
|
|
@@ -419,7 +419,7 @@ Options:
|
|
Example::
|
|
|
|
kadmin: addprinc jennifer
|
|
- WARNING: no policy specified for "jennifer@ATHENA.MIT.EDU";
|
|
+ No policy specified for "jennifer@ATHENA.MIT.EDU";
|
|
defaulting to no policy.
|
|
Enter password for principal jennifer@ATHENA.MIT.EDU:
|
|
Re-enter password for principal jennifer@ATHENA.MIT.EDU:
|
|
diff --git a/doc/admin/database.rst b/doc/admin/database.rst
|
|
index cea60b009..8505fe1ec 100644
|
|
--- a/doc/admin/database.rst
|
|
+++ b/doc/admin/database.rst
|
|
@@ -103,7 +103,7 @@ If you want to create a principal which is contained by a LDAP object,
|
|
all you need to do is::
|
|
|
|
kadmin: addprinc -x dn=cn=jennifer,dc=example,dc=com jennifer
|
|
- WARNING: no policy specified for "jennifer@ATHENA.MIT.EDU";
|
|
+ No policy specified for "jennifer@ATHENA.MIT.EDU";
|
|
defaulting to no policy.
|
|
Enter password for principal jennifer@ATHENA.MIT.EDU: <= Type the password.
|
|
Re-enter password for principal jennifer@ATHENA.MIT.EDU: <=Type it again.
|
|
@@ -114,7 +114,7 @@ If you want to create a principal under a specific LDAP container and
|
|
link to an existing LDAP object, all you need to do is::
|
|
|
|
kadmin: addprinc -x containerdn=dc=example,dc=com -x linkdn=cn=david,dc=example,dc=com david
|
|
- WARNING: no policy specified for "david@ATHENA.MIT.EDU";
|
|
+ No policy specified for "david@ATHENA.MIT.EDU";
|
|
defaulting to no policy.
|
|
Enter password for principal david@ATHENA.MIT.EDU: <= Type the password.
|
|
Re-enter password for principal david@ATHENA.MIT.EDU: <=Type it again.
|
|
diff --git a/doc/admin/install_kdc.rst b/doc/admin/install_kdc.rst
|
|
index 3bec59f96..157c6059e 100644
|
|
--- a/doc/admin/install_kdc.rst
|
|
+++ b/doc/admin/install_kdc.rst
|
|
@@ -239,7 +239,7 @@ is created::
|
|
|
|
kadmin.local: addprinc admin/admin@ATHENA.MIT.EDU
|
|
|
|
- WARNING: no policy specified for "admin/admin@ATHENA.MIT.EDU";
|
|
+ No policy specified for "admin/admin@ATHENA.MIT.EDU";
|
|
assigning "default".
|
|
Enter password for principal admin/admin@ATHENA.MIT.EDU: <= Enter a password.
|
|
Re-enter password for principal admin/admin@ATHENA.MIT.EDU: <= Type it again.
|
|
@@ -316,11 +316,11 @@ following::
|
|
|
|
shell% kadmin
|
|
kadmin: addprinc -randkey host/kerberos.mit.edu
|
|
- NOTICE: no policy specified for "host/kerberos.mit.edu@ATHENA.MIT.EDU"; assigning "default"
|
|
+ No policy specified for "host/kerberos.mit.edu@ATHENA.MIT.EDU"; assigning "default"
|
|
Principal "host/kerberos.mit.edu@ATHENA.MIT.EDU" created.
|
|
|
|
kadmin: addprinc -randkey host/kerberos-1.mit.edu
|
|
- NOTICE: no policy specified for "host/kerberos-1.mit.edu@ATHENA.MIT.EDU"; assigning "default"
|
|
+ No policy specified for "host/kerberos-1.mit.edu@ATHENA.MIT.EDU"; assigning "default"
|
|
Principal "host/kerberos-1.mit.edu@ATHENA.MIT.EDU" created.
|
|
|
|
It is not strictly necessary to have the master KDC server in the
|
|
diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c
|
|
index b4d1aad93..a6e858d82 100644
|
|
--- a/src/kadmin/cli/kadmin.c
|
|
+++ b/src/kadmin/cli/kadmin.c
|
|
@@ -1229,13 +1229,13 @@ kadmin_addprinc(int argc, char *argv[])
|
|
/* If the policy "default" exists, assign it. */
|
|
if (policy_exists("default")) {
|
|
if (!script_mode) {
|
|
- fprintf(stderr, _("NOTICE: no policy specified for %s; "
|
|
+ fprintf(stderr, _("No policy specified for %s; "
|
|
"assigning \"default\"\n"), canon);
|
|
}
|
|
princ.policy = "default";
|
|
mask |= KADM5_POLICY;
|
|
} else if (!script_mode) {
|
|
- fprintf(stderr, _("WARNING: no policy specified for %s; "
|
|
+ fprintf(stderr, _("No policy specified for %s; "
|
|
"defaulting to no policy\n"), canon);
|
|
}
|
|
}
|
|
diff --git a/src/man/kadmin.man b/src/man/kadmin.man
|
|
index 44859a378..b514fe279 100644
|
|
--- a/src/man/kadmin.man
|
|
+++ b/src/man/kadmin.man
|
|
@@ -458,7 +458,7 @@ Example:
|
|
.nf
|
|
.ft C
|
|
kadmin: addprinc jennifer
|
|
-WARNING: no policy specified for "jennifer@ATHENA.MIT.EDU";
|
|
+No policy specified for "jennifer@ATHENA.MIT.EDU";
|
|
defaulting to no policy.
|
|
Enter password for principal jennifer@ATHENA.MIT.EDU:
|
|
Re\-enter password for principal jennifer@ATHENA.MIT.EDU:
|
|
diff --git a/src/po/de.po b/src/po/de.po
|
|
index 40e31da90..5d78bdded 100644
|
|
--- a/src/po/de.po
|
|
+++ b/src/po/de.po
|
|
@@ -1690,16 +1690,16 @@ msgstr "WARNUNG: Richtlinie »%s« existiert nicht.\n"
|
|
|
|
#: ../../src/kadmin/cli/kadmin.c:1230
|
|
#, c-format
|
|
-msgid "NOTICE: no policy specified for %s; assigning \"default\"\n"
|
|
+msgid "No policy specified for %s; assigning \"default\"\n"
|
|
msgstr ""
|
|
-"HINWEIS: Für %s wurde keine Richtlinie angegeben, es wird »default« "
|
|
+"Für %s wurde keine Richtlinie angegeben, es wird »default« "
|
|
"zugewiesen\n"
|
|
|
|
#: ../../src/kadmin/cli/kadmin.c:1235
|
|
#, c-format
|
|
-msgid "WARNING: no policy specified for %s; defaulting to no policy\n"
|
|
+msgid "No policy specified for %s; defaulting to no policy\n"
|
|
msgstr ""
|
|
-"WARNUNG: Für %s wurde keine Richtlinie angegeben, es wird die Vorgabe "
|
|
+"Für %s wurde keine Richtlinie angegeben, es wird die Vorgabe "
|
|
"»keine\n"
|
|
"Richtlinie« verwandt.\n"
|
|
|
|
diff --git a/src/po/mit-krb5.pot b/src/po/mit-krb5.pot
|
|
index 8cfbe9f3c..de1998d2f 100644
|
|
--- a/src/po/mit-krb5.pot
|
|
+++ b/src/po/mit-krb5.pot
|
|
@@ -1645,12 +1645,12 @@ msgstr ""
|
|
|
|
#: ../../src/kadmin/cli/kadmin.c:1228
|
|
#, c-format
|
|
-msgid "NOTICE: no policy specified for %s; assigning \"default\"\n"
|
|
+msgid "No policy specified for %s; assigning \"default\"\n"
|
|
msgstr ""
|
|
|
|
#: ../../src/kadmin/cli/kadmin.c:1234
|
|
#, c-format
|
|
-msgid "WARNING: no policy specified for %s; defaulting to no policy\n"
|
|
+msgid "No policy specified for %s; defaulting to no policy\n"
|
|
msgstr ""
|
|
|
|
#: ../../src/kadmin/cli/kadmin.c:1276
|