svn commit: samba r14145 - branches/SAMBA_3_0/source/client
branches/SAMBA_3_0/source/nsswitch trunk/source/client
trunk/source/nsswitch
gd at samba.org
gd at samba.org
Fri Mar 10 13:12:39 GMT 2006
Author: gd
Date: 2006-03-10 13:12:38 +0000 (Fri, 10 Mar 2006)
New Revision: 14145
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14145
Log:
Add missing WITH_KCM hunks from my local tree.
Guenther
Modified:
branches/SAMBA_3_0/source/client/smbspool.c
branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
trunk/source/client/smbspool.c
trunk/source/nsswitch/winbindd_ads.c
Changeset:
Modified: branches/SAMBA_3_0/source/client/smbspool.c
===================================================================
--- branches/SAMBA_3_0/source/client/smbspool.c 2006-03-10 13:01:08 UTC (rev 14144)
+++ branches/SAMBA_3_0/source/client/smbspool.c 2006-03-10 13:12:38 UTC (rev 14145)
@@ -299,15 +299,21 @@
static
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_DIRENT *dirent; /* directory entry */
char *filename = NULL; /* holds file names on the tmp directory */
SMB_STRUCT_STAT buf;
char user_cache_prefix[CC_MAX_FILE_LEN];
char file_path[CC_MAX_FILE_PATH_LEN];
- char *ticket_file = NULL;
time_t t = 0;
-
+
snprintf(user_cache_prefix, CC_MAX_FILE_LEN, "%s%d", CC_PREFIX, uid );
tcdir = sys_opendir( TICKET_CC_DIR );
if ( tcdir == NULL )
@@ -343,7 +349,11 @@
}
sys_closedir(tcdir);
+ }
+#endif
+done:
+
if ( ticket_file == NULL )
{
/* no ticket cache found */
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c 2006-03-10 13:01:08 UTC (rev 14144)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c 2006-03-10 13:12:38 UTC (rev 14145)
@@ -59,7 +59,11 @@
}
/* 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);
+#endif
ads = ads_init(domain->alt_name, domain->name, NULL);
if (!ads) {
Modified: trunk/source/client/smbspool.c
===================================================================
--- trunk/source/client/smbspool.c 2006-03-10 13:01:08 UTC (rev 14144)
+++ trunk/source/client/smbspool.c 2006-03-10 13:12:38 UTC (rev 14145)
@@ -299,15 +299,21 @@
static
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_DIRENT *dirent; /* directory entry */
char *filename = NULL; /* holds file names on the tmp directory */
SMB_STRUCT_STAT buf;
char user_cache_prefix[CC_MAX_FILE_LEN];
char file_path[CC_MAX_FILE_PATH_LEN];
- char *ticket_file = NULL;
time_t t = 0;
-
+
snprintf(user_cache_prefix, CC_MAX_FILE_LEN, "%s%d", CC_PREFIX, uid );
tcdir = sys_opendir( TICKET_CC_DIR );
if ( tcdir == NULL )
@@ -343,7 +349,11 @@
}
sys_closedir(tcdir);
+ }
+#endif
+done:
+
if ( ticket_file == NULL )
{
/* no ticket cache found */
Modified: trunk/source/nsswitch/winbindd_ads.c
===================================================================
--- trunk/source/nsswitch/winbindd_ads.c 2006-03-10 13:01:08 UTC (rev 14144)
+++ trunk/source/nsswitch/winbindd_ads.c 2006-03-10 13:12:38 UTC (rev 14145)
@@ -59,7 +59,11 @@
}
/* 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);
+#endif
ads = ads_init(domain->alt_name, domain->name, NULL);
if (!ads) {
More information about the samba-cvs
mailing list