mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
r14145: Add missing WITH_KCM hunks from my local tree.
Guenther
This commit is contained in:
parent
18ee669c60
commit
977079a058
@ -299,15 +299,21 @@ list_devices(void)
|
|||||||
static
|
static
|
||||||
char * get_ticket_cache( uid_t uid )
|
char * get_ticket_cache( uid_t uid )
|
||||||
{
|
{
|
||||||
|
char *ticket_file = NULL;
|
||||||
|
|
||||||
|
#ifdef WITH_KCM
|
||||||
|
snprintf(ticket_file, CC_MAX_FILE_LEN, "KCM:%d", uid );
|
||||||
|
goto done;
|
||||||
|
#else
|
||||||
|
{
|
||||||
SMB_STRUCT_DIR *tcdir; /* directory where ticket caches are stored */
|
SMB_STRUCT_DIR *tcdir; /* directory where ticket caches are stored */
|
||||||
SMB_STRUCT_DIRENT *dirent; /* directory entry */
|
SMB_STRUCT_DIRENT *dirent; /* directory entry */
|
||||||
char *filename = NULL; /* holds file names on the tmp directory */
|
char *filename = NULL; /* holds file names on the tmp directory */
|
||||||
SMB_STRUCT_STAT buf;
|
SMB_STRUCT_STAT buf;
|
||||||
char user_cache_prefix[CC_MAX_FILE_LEN];
|
char user_cache_prefix[CC_MAX_FILE_LEN];
|
||||||
char file_path[CC_MAX_FILE_PATH_LEN];
|
char file_path[CC_MAX_FILE_PATH_LEN];
|
||||||
char *ticket_file = NULL;
|
|
||||||
time_t t = 0;
|
time_t t = 0;
|
||||||
|
|
||||||
snprintf(user_cache_prefix, CC_MAX_FILE_LEN, "%s%d", CC_PREFIX, uid );
|
snprintf(user_cache_prefix, CC_MAX_FILE_LEN, "%s%d", CC_PREFIX, uid );
|
||||||
tcdir = sys_opendir( TICKET_CC_DIR );
|
tcdir = sys_opendir( TICKET_CC_DIR );
|
||||||
if ( tcdir == NULL )
|
if ( tcdir == NULL )
|
||||||
@ -343,6 +349,10 @@ char * get_ticket_cache( uid_t uid )
|
|||||||
}
|
}
|
||||||
|
|
||||||
sys_closedir(tcdir);
|
sys_closedir(tcdir);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
done:
|
||||||
|
|
||||||
if ( ticket_file == NULL )
|
if ( ticket_file == NULL )
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,11 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* we don't want this to affect the users ccache */
|
/* we don't want this to affect the users ccache */
|
||||||
|
#ifdef WITH_KCM
|
||||||
|
setenv("KRB5CCNAME", "KCM:SYSTEM", 1);
|
||||||
|
#else
|
||||||
setenv("KRB5CCNAME", "MEMORY:winbind_ccache", 1);
|
setenv("KRB5CCNAME", "MEMORY:winbind_ccache", 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
ads = ads_init(domain->alt_name, domain->name, NULL);
|
ads = ads_init(domain->alt_name, domain->name, NULL);
|
||||||
if (!ads) {
|
if (!ads) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user