]> git.ipfire.org Git - thirdparty/krb5.git/commit
Unify KDB principal flag conversion functions 292/head
authorTom Yu <tlyu@mit.edu>
Thu, 2 Jul 2015 20:16:07 +0000 (16:16 -0400)
committerTom Yu <tlyu@mit.edu>
Thu, 9 Jul 2015 12:38:56 +0000 (08:38 -0400)
commit971fae8285427b27dfd8c9a535a18eb588ee0689
tree4ed5735ddf16f64a0508b11c3e7446d108bedc28
parentea62dd834f343b2dddea81c8295f2f8876c83090
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().

ticket: 8215
src/include/adm_proto.h
src/kadmin/cli/kadmin.c
src/lib/kadm5/admin_internal.h
src/lib/kadm5/alt_prof.c
src/lib/kadm5/clnt/Makefile.in
src/lib/kadm5/clnt/libkadm5clnt_mit.exports
src/lib/kadm5/srv/Makefile.in
src/lib/kadm5/srv/libkadm5srv_mit.exports
src/lib/kadm5/srv/server_acl.c
src/lib/kadm5/str_conv.c
src/plugins/kdb/test/kdb_test.c