[krbdev.mit.edu #8215] git commit

Tom Yu via RT rt-comment at krbdev.mit.edu
Thu Jul 9 13:36:44 EDT 2015


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
numbers.

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().

https://github.com/krb5/krb5/commit/971fae8285427b27dfd8c9a535a18eb588ee0689
Author: Tom Yu <tlyu at mit.edu>
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/Makefile.in              |    2 +-
 src/lib/kadm5/clnt/libkadm5clnt_mit.exports |    6 +-
 src/lib/kadm5/srv/Makefile.in               |    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(-)



More information about the krb5-bugs mailing list