The MSLSA and CCAPI versions are untested!
* cc_file.c (krb5_fcc_get_flags): New function.
(krb5_fcc_ops, krb5_cc_file_ops): Add it.
* cc_memory.c (krb5_mcc_get_flags): New function.
(krb5_mcc_ops): Add it.
* cc_mslsa.c (krb5_lcc_get_flags): New function.
(krb5_lcc_ops): Add it.
* ccfns.c (krb5_cc_get_flags): New function.
* ccapi/stdcc.c (krb5_stdcc_get_flags): New function.
(krb5_cc_stdcc_ops): Add it.
* ccapi/stdcc.h (krb5_stdcc_get_flags): Declare.
ticket: 2763
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16871
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-11-15 Ken Raeburn <raeburn@mit.edu>
+
+ * cc_file.c (krb5_fcc_get_flags): New function.
+ (krb5_fcc_ops, krb5_cc_file_ops): Add it.
+ * cc_memory.c (krb5_mcc_get_flags): New function.
+ (krb5_mcc_ops): Add it.
+ * cc_mslsa.c (krb5_lcc_get_flags): New function.
+ (krb5_lcc_ops): Add it.
+ * ccfns.c (krb5_cc_get_flags): New function.
+
2004-10-07 Jeffrey Altman <jaltman@mit.edu>
* cc_mslsa.c: Fix the forced setting of the Initial Ticket Flag
on Win2000 and add it to XP and 2003 SP1
return ret;
}
+/*
+ * Requires:
+ * id is a cred cache returned by krb5_fcc_resolve or
+ * krb5_fcc_generate_new, but has not been opened by krb5_fcc_initialize.
+ *
+ * Modifies:
+ * id (mutex only; temporary)
+ *
+ * Effects:
+ * Returns the operational flags of id.
+ */
+static krb5_error_code KRB5_CALLCONV
+krb5_fcc_get_flags(krb5_context context, krb5_ccache id, krb5_flags *flags)
+{
+ krb5_error_code ret = KRB5_OK;
+
+ ret = k5_mutex_lock(&((krb5_fcc_data *) id->data)->lock);
+ if (ret)
+ return ret;
+ *flags = ((krb5_fcc_data *) id->data)->flags;
+ k5_mutex_unlock(&((krb5_fcc_data *) id->data)->lock);
+ return ret;
+}
+
static krb5_error_code
krb5_fcc_interpret(krb5_context context, int errnum)
krb5_fcc_end_seq_get,
krb5_fcc_remove_cred,
krb5_fcc_set_flags,
+ krb5_fcc_get_flags,
};
#if defined(_WIN32)
krb5_fcc_end_seq_get,
krb5_fcc_remove_cred,
krb5_fcc_set_flags,
+ krb5_fcc_get_flags,
};
return KRB5_OK;
}
+krb5_error_code KRB5_CALLCONV
+krb5_mcc_get_flags(krb5_context context, krb5_ccache id, krb5_flags *flags)
+{
+ *flags = 0;
+ return KRB5_OK;
+}
+
/* store: Save away creds in the ccache. */
krb5_error_code KRB5_CALLCONV
krb5_mcc_store(krb5_context ctx, krb5_ccache id, krb5_creds *creds)
krb5_mcc_end_seq_get,
krb5_mcc_remove_cred,
krb5_mcc_set_flags,
+ krb5_mcc_get_flags,
};
static krb5_error_code KRB5_CALLCONV krb5_lcc_set_flags
(krb5_context, krb5_ccache id, krb5_flags flags);
+static krb5_error_code KRB5_CALLCONV krb5_lcc_get_flags
+ (krb5_context, krb5_ccache id, krb5_flags *flags);
+
extern const krb5_cc_ops krb5_lcc_ops;
krb5_error_code krb5_change_cache (void);
return KRB5_OK;
}
+static krb5_error_code KRB5_CALLCONV
+krb5_lcc_get_flags(krb5_context context, krb5_ccache id, krb5_flags *flags)
+{
+ krb5_lcc_data *data = (krb5_lcc_data *)id->data;
+
+ if (!is_windows_2000())
+ return KRB5_FCC_NOFILE;
+
+ *flags = data->flags;
+ return KRB5_OK;
+}
+
const krb5_cc_ops krb5_lcc_ops = {
0,
"MSLSA",
krb5_lcc_next_cred,
krb5_lcc_end_seq_get,
krb5_lcc_remove_cred,
- krb5_lcc_set_flags
+ krb5_lcc_set_flags,
+ krb5_lcc_get_flags,
};
#endif /* _WIN32 */
+2004-11-15 Ken Raeburn <raeburn@mit.edu>
+
+ * stdcc.c (krb5_stdcc_get_flags): New function.
+ (krb5_cc_stdcc_ops): Add it.
+ * stdcc.h (krb5_stdcc_get_flags): Declare.
+
2004-06-22 Ken Raeburn <raeburn@mit.edu>
* stdcc_util.c (dupK5toCC): Don't test macintosh.
krb5_stdcc_end_seq_get,
krb5_stdcc_remove,
krb5_stdcc_set_flags,
+ krb5_stdcc_get_flags,
};
#if defined(_WIN32)
return 0;
}
+/*
+ * get_flags
+ *
+ * - currently a NOP since we don't store any flags in the NC
+ */
+krb5_error_code KRB5_CALLCONV krb5_stdcc_get_flags
+ (krb5_context context, krb5_ccache id , krb5_flags *flags)
+{
+ stdccCacheDataPtr ccapi_data = id->data;
+ krb5_error_code retval;
+
+ if ((retval = stdcc_setup(context, ccapi_data)))
+ return retval;
+
+ return 0;
+}
+
/*
* remove
*
krb5_error_code KRB5_CALLCONV krb5_stdcc_set_flags
(krb5_context, krb5_ccache id , krb5_flags flags );
+krb5_error_code KRB5_CALLCONV krb5_stdcc_get_flags
+ (krb5_context, krb5_ccache id , krb5_flags *flags );
+
krb5_error_code KRB5_CALLCONV krb5_stdcc_remove
(krb5_context, krb5_ccache id , krb5_flags flags, krb5_creds *creds);
return cache->ops->set_flags(context, cache, flags);
}
+krb5_error_code KRB5_CALLCONV
+krb5_cc_get_flags (krb5_context context, krb5_ccache cache, krb5_flags *flags)
+{
+ return cache->ops->get_flags(context, cache, flags);
+}
+
const char * KRB5_CALLCONV
krb5_cc_get_type (krb5_context context, krb5_ccache cache)
{