kadmind patch (was: kadm5_randkey_principal_3)

Ben Cox cox at spinnakernet.com
Fri Oct 4 08:26:01 EDT 2002

I agree; the patch I submitted was just a quick-n-dirty get-it-done kind
of thing.

The reason I didn't just change it as you suggest below was that the
kadm5_randkey_principal function internally calls
kadm5_randkey_principal_3 with a fixed set of ks_tuples, and I didn't
want to duplicate that fixed set of ks_tuples, because if in the future
someone were to change the fixed set in kadm5_randkey_principal and
forget to change the set in randkey_principal_wrapper to match, they'd
get the "wrong" (old) set of fixed ks_tuples, and that might be a
head-scratcher indeed. ;)

If you agree that doing it that way would be the lesser of two evils,
I'm happy to send a second patch that does it that way instead.

-- Ben

On Thu, 2002-10-03 at 22:05, Sam Hartman wrote:
> Thanks for identifying the problem.  This patch certainly would fix
> things, but I can't help wonder whether it wouldn't be better to adopt
> a solution that involved less code duplication.
> [more directed internally] Would it be reasonable to have all
> self-changes go through the _3 function, passing in a default ks tuple
> set to the wrapper in cases where the called RPC didn't support that
> parameter?

More information about the krbdev mailing list