Add support for AFS when using Kerberos 5,

From: Sergio.Gelato@astro.su.se


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12916 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-09-23 10:55:41 +00:00
parent 0b393db251
commit e894162147

View File

@@ -328,7 +328,19 @@ siad_ses_launch(sia_collect_func_t *collect,
#endif
putenv(env);
}
#ifdef KRB4
#ifdef SIA_KRB5
if (k_hasafs()) {
char cell[64];
krb5_ccache ccache;
if(krb5_cc_resolve(s->context, s->ticket, &ccache) == 0) {
k_setpag();
if(k_afs_cell_of_file(entity->pwd->pw_dir, cell, sizeof(cell)) == 0)
krb5_afslog(s->context, ccache, cell, 0);
krb5_afslog_home(s->context, ccache, 0, 0, entity->pwd->pw_dir);
}
}
#endif
#ifdef SIA_KRB4
if (k_hasafs()) {
char cell[64];
k_setpag();
@@ -390,7 +402,20 @@ siad_ses_reauthent (sia_collect_func_t *collect,
duplicate some code here... */
struct state *s = (struct state*)entity->mech[pkgind];
chown(s->ticket, entity->pwd->pw_uid, entity->pwd->pw_gid);
#ifdef KRB4
#ifdef SIA_KRB5
if (k_hasafs()) {
char cell[64];
krb5_ccache ccache;
if(krb5_cc_resolve(s->context, s->ticket, &ccache) == 0) {
k_setpag();
if(k_afs_cell_of_file(entity->pwd->pw_dir,
cell, sizeof(cell)) == 0)
krb5_afslog(s->context, ccache, cell, 0);
krb5_afslog_home(s->context, ccache, 0, 0, entity->pwd->pw_dir);
}
}
#endif
#ifdef SIA_KRB4
if(k_hasafs()) {
char cell[64];
if(k_afs_cell_of_file(entity->pwd->pw_dir,