do krb5_afslog when compling with afs support
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11868 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -68,9 +68,7 @@ static int do_kerberos = 0;
|
||||
#define DO_KRB5 4
|
||||
static int do_vacuous = 0;
|
||||
static int do_log = 1;
|
||||
#ifdef KRB4
|
||||
static int do_newpag = 1;
|
||||
#endif
|
||||
static int do_addr_verify = 0;
|
||||
static int do_keepalive = 1;
|
||||
static int do_version;
|
||||
@@ -864,16 +862,17 @@ doit (void)
|
||||
fatal (s, "net_write", "write failed");
|
||||
}
|
||||
|
||||
#ifdef KRB4
|
||||
#if defined(KRB4) || defined(KRB5)
|
||||
if(k_hasafs()) {
|
||||
char cell[64];
|
||||
|
||||
if(do_newpag)
|
||||
k_setpag();
|
||||
#ifdef KRB4
|
||||
if (k_afs_cell_of_file (pwd->pw_dir, cell, sizeof(cell)) == 0)
|
||||
krb_afslog_uid_home (cell, NULL, pwd->pw_uid, pwd->pw_dir);
|
||||
|
||||
krb_afslog_uid_home(NULL, NULL, pwd->pw_uid, pwd->pw_dir);
|
||||
#endif
|
||||
|
||||
#ifdef KRB5
|
||||
/* XXX */
|
||||
@@ -883,6 +882,9 @@ doit (void)
|
||||
|
||||
status = krb5_cc_resolve (context, tkfile, &ccache);
|
||||
if (!status) {
|
||||
if (k_afs_cell_of_file (pwd->pw_dir, cell, sizeof(cell)) == 0)
|
||||
krb5_afslog_uid_home(context, ccache, cell, NULL,
|
||||
pwd->pw_uid, pwd->pw_dir);
|
||||
krb5_afslog_uid_home(context, ccache, NULL, NULL,
|
||||
pwd->pw_uid, pwd->pw_dir);
|
||||
krb5_cc_close (context, ccache);
|
||||
@@ -890,7 +892,7 @@ doit (void)
|
||||
}
|
||||
#endif /* KRB5 */
|
||||
}
|
||||
#endif /* KRB4 */
|
||||
#endif /* KRB5 || KRB4 */
|
||||
execle (pwd->pw_shell, pwd->pw_shell, "-c", cmd, NULL, env);
|
||||
err(1, "exec %s", pwd->pw_shell);
|
||||
}
|
||||
|
@@ -603,9 +603,9 @@ verify_krb5(const char *password)
|
||||
}
|
||||
krb5_free_principal(context, mcred.server);
|
||||
}
|
||||
#endif
|
||||
if (k_hasafs())
|
||||
krb5_afslog(context, id, NULL, NULL);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
if (ret != KRB5KRB_AP_ERR_MODIFIED)
|
||||
|
Reference in New Issue
Block a user