char pipefsdir[PATH_MAX] = GSSD_PIPEFS_DIR;
char keytabfile[PATH_MAX] = GSSD_DEFAULT_KEYTAB_FILE;
char ccachedir[PATH_MAX] = GSSD_DEFAULT_CRED_DIR;
+int use_memcache = 0;
void
sig_die(int signal)
extern char *optarg;
char *progname;
- while ((opt = getopt(argc, argv, "fvrmp:k:d:")) != -1) {
+ while ((opt = getopt(argc, argv, "fvrmMp:k:d:")) != -1) {
switch (opt) {
case 'f':
fg = 1;
case 'm':
/* Accept but ignore this. Now the default. */
break;
+ case 'M':
+ use_memcache = 1;
+ break;
case 'v':
verbosity++;
break;
extern char pipefsdir[PATH_MAX];
extern char keytabfile[PATH_MAX];
extern char ccachedir[PATH_MAX];
+extern int use_memcache;
TAILQ_HEAD(clnt_list_head, clnt_info) clnt_list;
char cc_name[BUFSIZ];
int code;
time_t now = time(0);
+ char *cache_type;
memset(&my_creds, 0, sizeof(my_creds));
* Initialize cache file which we're going to be using
*/
- snprintf(cc_name, sizeof(cc_name), "FILE:%s/%s%s_%s",
+ if (use_memcache)
+ cache_type = "MEMORY";
+ else
+ cache_type = "FILE";
+ snprintf(cc_name, sizeof(cc_name), "%s:%s/%s%s_%s",
+ cache_type,
GSSD_DEFAULT_CRED_DIR, GSSD_DEFAULT_CRED_PREFIX,
GSSD_DEFAULT_MACHINE_CRED_SUFFIX, ple->realm);
ple->endtime = my_creds.times.endtime;