]> arthur.barton.de Git - netatalk.git/commit
Change status_directorynames to use keytab when constructing names
authorJamie Gilbertson <jamie.gilbertson@luniv.ca>
Fri, 16 Mar 2012 03:46:38 +0000 (21:46 -0600)
committerFrank Lahm <franklahm@googlemail.com>
Mon, 19 Mar 2012 11:48:24 +0000 (12:48 +0100)
commit8cd6af37ff3a8c832adb35786e93077ac05c233c
tree5e3b4c9533684b6923143075a07b54f708f98a42
parentdbcfb039a2e2fa4f8e091536b6ecff38cd18b175
Change status_directorynames to use keytab when constructing names

v3: Forgot to pass the address of 'data' to append_directoryname (since it adjusts it by the length of the principal)
v2: Add append_directory name
v2: Construct a directory name even if Kerberos support is disabled

When constructing the DirectoryNames portion of the response, we check if uams_gss is loaded. If it isn't, we don't bother with constructing a name. If uams_gss *is* loaded, we need to check the options k5service, fqdn and k5realm. If they are set, we construct a service principal name using them, and ensure that principal is present in afpd's keytab. Otherwise, we use the principal from the first entry in the keytab. After we have a valid principal, we convert it to a directory name, and use it for the response.

AFPSRVRINFO_SRVRDIR implies that we can authenticate via Kerberos, so only enable that if uams_gss is loaded.

Signed-off-by: Jamie Gilbertson <jamie.gilbertson@luniv.ca>
etc/afpd/status.c