Liberated from roken setenv
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7144 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -31,8 +31,8 @@ LD_FLAGS = @REAL_LD_FLAGS@
|
|||||||
LIB_res_search = @LIB_res_search@
|
LIB_res_search = @LIB_res_search@
|
||||||
LIB_dn_expand = @LIB_dn_expand@
|
LIB_dn_expand = @LIB_dn_expand@
|
||||||
|
|
||||||
@lib_deps_yes@LIB_DEPS = -L../../kafs -L../../krb -L../../des -L../../roken \
|
@lib_deps_yes@LIB_DEPS = -L../../kafs -L../../krb -L../../des \
|
||||||
@lib_deps_yes@ -lkafs -lkrb -ldes -lroken \
|
@lib_deps_yes@ -lkafs -lkrb -ldes \
|
||||||
@lib_deps_yes@ $(LIB_res_search) $(LIB_dn_expand) -lc
|
@lib_deps_yes@ $(LIB_res_search) $(LIB_dn_expand) -lc
|
||||||
@lib_deps_no@LIB_DEPS =
|
@lib_deps_no@LIB_DEPS =
|
||||||
|
|
||||||
|
@@ -212,7 +212,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
|||||||
int
|
int
|
||||||
pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
||||||
{
|
{
|
||||||
char *tkt;
|
char *tkt, *var;
|
||||||
void *user;
|
void *user;
|
||||||
const char *homedir = NULL;
|
const char *homedir = NULL;
|
||||||
|
|
||||||
@@ -225,7 +225,10 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pam_get_data(pamh, "KRBTKFILE", (const void**)&tkt);
|
pam_get_data(pamh, "KRBTKFILE", (const void**)&tkt);
|
||||||
setenv("KRBTKFILE", tkt, 1);
|
var = malloc(strlen("KRBTKFILE=") + strlen(tkt) + 1);
|
||||||
|
strcpy(var, "KRBTKFILE=");
|
||||||
|
strcat(var, tkt);
|
||||||
|
putenv(var);
|
||||||
if(k_hasafs()){
|
if(k_hasafs()){
|
||||||
k_setpag();
|
k_setpag();
|
||||||
krb_afslog_home(0, 0, homedir);
|
krb_afslog_home(0, 0, homedir);
|
||||||
|
Reference in New Issue
Block a user