Skip to content

Commit

Permalink
Modernize auth_acl.c
Browse files Browse the repository at this point in the history
Change auth_acl.c to match current coding conventions.  Use more
consistent identifier names, and drop the kadm5int_ prefix as the code
is now part of kadmind.  Remove the acl_inited, acl_debug_level, and
acl_catchall_entry variables.  Move global state into a structure, to
make it easier to migrate to a module handle later.  Move
parse_restrictions() above parse_line() so it can later be used from
parse_line() without a forward declaration.  Rewrite get_line() and
parse_line() to avoid the use of fixed-sized static buffers and
sscanf().  Add a parse_entry() helper to make memory management in
parse_line() easier.  Add a free_acl_entry() helper (split out from
free_acl_entries()) to make error handling in parse_entry() easier.
Add a match_princ() helper to simplify find_entry().

Remove the GSS name translation wrapper in auth_acl.c.  In the server
stubs, use handle->current_caller for the client principal.  In the
iprop RPCs(), add a wrapper to parse the client display name before
calling acl_check().
  • Loading branch information
greghudson committed Jul 3, 2017
1 parent 0a04159 commit 0def80f
Show file tree
Hide file tree
Showing 7 changed files with 596 additions and 830 deletions.

0 comments on commit 0def80f

Please sign in to comment.