Skip Menu |

Subject: git commit

Add test suite for KDB principal flags

Test kadmin.local reading of principal flag specifiers, kdc.conf
setting of default_principal_flags, and kadm5.acl restrictions. Only
really tests one flag at a time.

Also start requiring Python 2.5 for the test suite. It's been around
for long enough, and some syntax features such as conditional
expressions are useful.
Author: Tom Yu <>
Commit: ea62dd834f343b2dddea81c8295f2f8876c83090
Branch: master
src/ | 3 +-
src/tests/ | 1 +
src/tests/ | 126 +++++++++++++++++++++
src/util/ | 2 +-
src/util/ | 264 +++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 394 insertions(+), 2 deletions(-)
Subject: git commit

Unify KDB principal flag conversion functions

These changes unify the KDB principal flag specifiers used by kadmin,
kdc.conf default_principal_flags, and kadm5.acl. Each of those
interfaces will now accept any of the historically accepted input
forms of any of those interfaces. Additionally, accept flag
specifiers in the forms that kadmin prints, as well as hexadecimal

Replace krb5_string_to_flags() with krb5_flagspec_to_mask(). The
latter has a pseudo-ternary output, allowing different pointers for
flags to set versus flags to clear. Additional functionality includes
parsing hexadecimal numbers for flag settings.

Remove krb5_input_flag_to_string(), which nothing in the tree used,
and probably hasn't ever worked properly due to long-standing gaps in
the flag number sequence.

Remove krb5_flags_to_string(), which nothing in the tree used.
Verbose flag output can be added back through another interface if
there is demand.

Add krb5_flagnum_to_string(), which produces a string representation
of a flag number. Additional functionality includes output of
hexadecimal numbers for unknown flags.

Add krb5_flags_to_strings(), which produces an array of strings
describing the flags, using the output from krb5_flagnum_to_string().
Author: Tom Yu <>
Commit: 971fae8285427b27dfd8c9a535a18eb588ee0689
Branch: master
src/include/adm_proto.h | 8 +-
src/kadmin/cli/kadmin.c | 101 ++------
src/lib/kadm5/admin_internal.h | 4 -
src/lib/kadm5/alt_prof.c | 2 +-
src/lib/kadm5/clnt/ | 2 +-
src/lib/kadm5/clnt/libkadm5clnt_mit.exports | 6 +-
src/lib/kadm5/srv/ | 2 +-
src/lib/kadm5/srv/libkadm5srv_mit.exports | 6 +-
src/lib/kadm5/srv/server_acl.c | 18 +-
src/lib/kadm5/str_conv.c | 400 +++++++++++++++------------
src/plugins/kdb/test/kdb_test.c | 6 +-
11 files changed, 259 insertions(+), 296 deletions(-)
Subject: git commit

Fix princflags memory management

Fix some out of memory error cases (found by Coverity) that could
cause multiple frees or freeing of invalid pointers. In
krb5_flagnum_to_string(), don't assume that asprintf() stores a null
pointer on failure (it does in BSD but not in glibc). In
krb5_flags_to_strings(), free the correct pointer in the cleanup loop
in on error.
Author: Tom Yu <>
Commit: dd5f948614b6662fc40dc8de3f567078cfe6295e
Branch: master
src/lib/kadm5/str_conv.c | 18 ++++++++++--------
src/tests/ | 13 +++++++++++++
2 files changed, 23 insertions(+), 8 deletions(-)