I have an a member server with a windows PDC with active directory. Security=ads.
I am trying to set an environment variable(credential cache) using C:
setenv("CCACHE","cache_name",1);
However, when i do a getenv("CCACHE"), its still showing the old value of the variable. Can someone help me with this?
EDIT: I am basically trying to set the ccache for kerberos authentication. Calling the fn const char * krb5_cc_default_name(krb5_context context) still returns the old value for the cache.
According to MIT kerberos documentation,
The default credential cache name is cached in context between calls to this function, so if the value of KRB5CCNAME changes in the process environment after the first call to this function on, that change will not be reflected in later calls with the same context. The caller can invoke krb5_cc_set_default_name() with a NULL value of name to clear the cached value and force the default name to be recomputed.
I have tried that but it still returns the old value.