+Wed Nov 16 23:31:49 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * fcc-proto.h, fcc.h, fcc_maybe.c (krb5_fcc_open_file), fcc_nseq.c
+ (krb5_fcc_next_cred), fcc_store.c (krb5_fcc_store), fcc_read.c,
+ fcc_write.c: Changes to implement FCC format version #3, which
+ is architecture independent, and includes the key
+ encryption type information.
+
+ * fcc_gennew.c (krb5_fcc_generate_new): Generate new ccaches using
+ whatever version is marked as the default.
+
+ * fcc_read.c (krb5_fcc_read_keyblock): Insert keyblock magic
+ number and initialize etype value. Also add magic numbers
+ for the krb5_principal, krb5_data, krb5_address, and
+ krb5_authdata structures.
+
Mon Oct 31 17:02:04 1994 Theodore Y. Ts'o (tytso@dcl)
* fcc_maybe.c: Back out POSIX_FILE_LOCKS change. (Should be
krb5_error_code krb5_fcc_read_data PROTOTYPE((krb5_ccache id , krb5_data *data ));
krb5_error_code krb5_fcc_read_int32 PROTOTYPE((krb5_ccache id , krb5_int32 *i ));
krb5_error_code krb5_fcc_read_ui_2 PROTOTYPE((krb5_ccache id , krb5_ui_2 *i ));
-krb5_error_code krb5_fcc_read_keytype PROTOTYPE((krb5_ccache id , krb5_keytype *k ));
-krb5_error_code krb5_fcc_read_int PROTOTYPE((krb5_ccache id , int *i ));
-krb5_error_code krb5_fcc_read_bool PROTOTYPE((krb5_ccache id , krb5_boolean *b ));
+krb5_error_code krb5_fcc_read_octet PROTOTYPE((krb5_ccache id , krb5_octet *i ));
krb5_error_code krb5_fcc_read_times PROTOTYPE((krb5_ccache id , krb5_ticket_times *t ));
-krb5_error_code krb5_fcc_read_flags PROTOTYPE((krb5_ccache id , krb5_flags *f ));
krb5_error_code krb5_fcc_read_addrs PROTOTYPE((krb5_ccache, krb5_address ***));
krb5_error_code krb5_fcc_read_addr PROTOTYPE((krb5_ccache, krb5_address *));
krb5_error_code krb5_fcc_read_authdata PROTOTYPE((krb5_ccache , krb5_authdata ***));
krb5_error_code krb5_fcc_store_principal PROTOTYPE((krb5_ccache id , krb5_principal princ ));
krb5_error_code krb5_fcc_store_keyblock PROTOTYPE((krb5_ccache id , krb5_keyblock *keyblock ));
krb5_error_code krb5_fcc_store_data PROTOTYPE((krb5_ccache id , krb5_data *data ));
-krb5_error_code krb5_fcc_store_int32 PROTOTYPE((krb5_ccache id , krb5_int32 *i ));
-krb5_error_code krb5_fcc_store_ui_2 PROTOTYPE((krb5_ccache id , krb5_ui_2 *i ));
-krb5_error_code krb5_fcc_store_keytype PROTOTYPE((krb5_ccache id , krb5_keytype *k ));
-krb5_error_code krb5_fcc_store_int PROTOTYPE((krb5_ccache id , int *i ));
-krb5_error_code krb5_fcc_store_bool PROTOTYPE((krb5_ccache id , krb5_boolean *b ));
+krb5_error_code krb5_fcc_store_int32 PROTOTYPE((krb5_ccache id , krb5_int32 i ));
+krb5_error_code krb5_fcc_store_ui_2 PROTOTYPE((krb5_ccache id , krb5_int32 i ));
+krb5_error_code krb5_fcc_store_octet PROTOTYPE((krb5_ccache id , krb5_int32 i ));
krb5_error_code krb5_fcc_store_times PROTOTYPE((krb5_ccache id , krb5_ticket_times *t ));
-krb5_error_code krb5_fcc_store_flags PROTOTYPE((krb5_ccache id , krb5_flags *f ));
krb5_error_code krb5_fcc_store_addrs PROTOTYPE((krb5_ccache , krb5_address ** ));
krb5_error_code krb5_fcc_store_addr PROTOTYPE((krb5_ccache , krb5_address * ));
krb5_error_code krb5_fcc_store_authdata PROTOTYPE((krb5_ccache , krb5_authdata **));
/*
* FCC version 2 contains type information for principals. FCC
- * version 1 does not. The code will accept either, and depending on
- * what KRB5_FCC_DEFAULT_FVNO is set to, it will create version 1 or
- * version 2 FCC caches.
+ * version 1 does not.
+ *
+ * FCC version 3 contains keyblock encryption type information, and is
+ * architecture independent. Previous versions are not.
*
- * KRB5_FCC_DEFAULT_FVNO should be set to version 2, unless there is
+ * The code will accept version 1, 2, and 3 ccaches, and depending
+ * what KRB5_FCC_DEFAULT_FVNO is set to, it will create version 1, 2,
+ * or 3 FCC caches.
+ *
+ * KRB5_FCC_DEFAULT_FVNO should be set to version 3, unless there is
* some overriding compatibility reasons not to do so.
*/
-#define KRB5_FCC_FVNO_1 0x0501 /* krb v5, fcc v1 */
-#define KRB5_FCC_FVNO 0x0502 /* krb5 v5, fcc v2 */
+#define KRB5_FCC_FVNO_1 0x0501 /* krb5 v5, fcc v1 */
+#define KRB5_FCC_FVNO_2 0x0502 /* krb5 v5, fcc v2 */
+#define KRB5_FCC_FVNO_3 0x0503 /* krb5 v5, fcc v3 */
-#define KRB5_FCC_DEFAULT_FVNO KRB5_FCC_FVNO
+#define KRB5_FCC_DEFAULT_FVNO KRB5_FCC_FVNO_3
#define FCC_OPEN_AND_ERASE 1
#define FCC_OPEN_RDWR 2
retcode = krb5_fcc_interpret(errno);
goto err_out;
} else {
- krb5_int16 fcc_fvno = htons(KRB5_FCC_FVNO);
+ krb5_int16 fcc_fvno = htons(KRB5_FCC_DEFAULT_FVNO);
int errsave, cnt;
/* Ignore user's umask, set mode = 0600 */
(void) close(fd);
return KRB5_CCACHE_BADVNO;
}
- if ((fcc_fvno != htons(KRB5_FCC_FVNO)) &&
+ if ((fcc_fvno != htons(KRB5_FCC_FVNO_3)) &&
+ (fcc_fvno != htons(KRB5_FCC_FVNO_2)) &&
(fcc_fvno != htons(KRB5_FCC_FVNO_1))) {
(void) fcc_lock_file(data, fd, UNLOCK_IT);
(void) close(fd);
int ret;
krb5_error_code kret;
krb5_fcc_cursor *fcursor;
+ krb5_int32 int32;
+ krb5_octet octet;
memset((char *)creds, 0, sizeof(*creds));
TCHECK(kret);
kret = krb5_fcc_read_times(id, &creds->times);
TCHECK(kret);
- kret = krb5_fcc_read_bool(id, &creds->is_skey);
+ kret = krb5_fcc_read_octet(id, &octet);
TCHECK(kret);
- kret = krb5_fcc_read_flags(id, &creds->ticket_flags);
+ creds->is_skey = octet;
+ kret = krb5_fcc_read_int32(id, &int32);
TCHECK(kret);
+ creds->ticket_flags = int32;
kret = krb5_fcc_read_addrs(id, &creds->addresses);
TCHECK(kret);
kret = krb5_fcc_read_authdata(id, &creds->authdata);
/*
* lib/krb5/ccache/file/fcc_read.c
*
- * Copyright 1990 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991,1992,1993,1994 by the Massachusetts Institute
+ * of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
}
} else
tmpprinc->data = 0;
+ tmpprinc->magic = KV5M_PRINCIPAL;
tmpprinc->length = length;
tmpprinc->type = type;
krb5_ccache id;
krb5_keyblock *keyblock;
{
+ krb5_fcc_data *data = (krb5_fcc_data *)id->data;
krb5_error_code kret;
- int ret;
+ krb5_ui_2 ui2;
+ krb5_int32 int32;
+ keyblock->magic = KV5M_KEYBLOCK;
keyblock->contents = 0;
- kret = krb5_fcc_read_keytype(id, &keyblock->keytype);
+ kret = krb5_fcc_read_ui_2(id, &ui2);
+ keyblock->keytype = ui2;
CHECK(kret);
- kret = krb5_fcc_read_int(id, &keyblock->length);
+ if ((data->version == KRB5_FCC_FVNO_1) ||
+ (data->version == KRB5_FCC_FVNO_2))
+ keyblock->etype = ETYPE_UNKNOWN;
+ else {
+ kret = krb5_fcc_read_ui_2(id, &ui2);
+ keyblock->etype = ui2;
+ CHECK(kret);
+ }
+
+ kret = krb5_fcc_read_int32(id, &int32);
CHECK(kret);
+ keyblock->length = int32;
if ( keyblock->length == 0 )
return KRB5_OK;
keyblock->contents = (unsigned char *) malloc(keyblock->length*
if (keyblock->contents == NULL)
return KRB5_CC_NOMEM;
- ret = read(((krb5_fcc_data *) id->data)->fd, (char *)keyblock->contents,
- (keyblock->length)*sizeof(krb5_octet));
-
- if (ret < 0) {
- krb5_xfree(keyblock->contents);
- return krb5_fcc_interpret(errno);
- }
- if (ret != (keyblock->length)*sizeof(krb5_octet)) {
- krb5_xfree(keyblock->contents);
- return KRB5_CC_END;
- }
+ kret = krb5_fcc_read(id, keyblock->contents, keyblock->length);
+ if (kret)
+ goto errout;
return KRB5_OK;
errout:
krb5_data *data;
{
krb5_error_code kret;
- int ret;
+ data->magic = KV5M_DATA;
data->data = 0;
kret = krb5_fcc_read_int32(id, &data->length);
if (data->data == NULL)
return KRB5_CC_NOMEM;
- ret = read(((krb5_fcc_data *) id->data)->fd, (char *)data->data,
- data->length);
- if (ret == -1) {
- krb5_xfree(data->data);
- return krb5_fcc_interpret(errno);
- }
- if (ret != data->length) {
- krb5_xfree(data->data);
- return KRB5_CC_END;
- }
+ kret = krb5_fcc_read(id, data->data, data->length);
+ CHECK(kret);
+
data->data[data->length] = 0; /* Null terminate, just in case.... */
return KRB5_OK;
errout:
krb5_address *addr;
{
krb5_error_code kret;
- int ret;
+ krb5_ui_2 ui2;
+ krb5_int32 int32;
+ addr->magic = KV5M_ADDRESS;
addr->contents = 0;
- kret = krb5_fcc_read_ui_2(id, &addr->addrtype);
+ kret = krb5_fcc_read_ui_2(id, &ui2);
CHECK(kret);
-
- kret = krb5_fcc_read_int(id, &addr->length);
+ addr->addrtype = ui2;
+
+ kret = krb5_fcc_read_int32(id, &int32);
CHECK(kret);
+ addr->length = int32;
if (addr->length == 0)
return KRB5_OK;
if (addr->contents == NULL)
return KRB5_CC_NOMEM;
- ret = read(((krb5_fcc_data *) id->data)->fd, (char *)addr->contents,
- (addr->length)*sizeof(krb5_octet));
- if (ret == -1) {
- krb5_xfree(addr->contents);
- return krb5_fcc_interpret(errno);
- }
- if (ret != (addr->length)*sizeof(krb5_octet)) {
- krb5_xfree(addr->contents);
- return KRB5_CC_END;
- }
+ kret = krb5_fcc_read(id, addr->contents, addr->length);
+ CHECK(kret);
+
return KRB5_OK;
errout:
if (addr->contents)
krb5_ccache id;
krb5_int32 *i;
{
- return krb5_fcc_read(id, (krb5_pointer) i, sizeof(krb5_int32));
+ krb5_fcc_data *data = (krb5_fcc_data *)id->data;
+ krb5_error_code retval;
+ unsigned char buf[4];
+
+ if ((data->version == KRB5_FCC_FVNO_1) ||
+ (data->version == KRB5_FCC_FVNO_2))
+ return krb5_fcc_read(id, (krb5_pointer) i, sizeof(krb5_int32));
+ else {
+ retval = krb5_fcc_read(id, buf, 4);
+ if (retval)
+ return retval;
+ *i = (((((buf[0] << 8) + buf[1]) << 8 ) + buf[2]) << 8) + buf[3];
+ return 0;
+ }
}
krb5_error_code
krb5_ccache id;
krb5_ui_2 *i;
{
- return krb5_fcc_read(id, (krb5_pointer) i, sizeof(krb5_ui_2));
-}
-
-krb5_error_code
-krb5_fcc_read_keytype(id, k)
- krb5_ccache id;
- krb5_keytype *k;
-{
- return krb5_fcc_read(id, (krb5_pointer) k, sizeof(krb5_keytype));
-}
+ krb5_fcc_data *data = (krb5_fcc_data *)id->data;
+ krb5_error_code retval;
+ unsigned char buf[2];
+
+ if ((data->version == KRB5_FCC_FVNO_1) ||
+ (data->version == KRB5_FCC_FVNO_2))
+ return krb5_fcc_read(id, (krb5_pointer) i, sizeof(krb5_ui_2));
+ else {
+ retval = krb5_fcc_read(id, buf, 2);
+ if (retval)
+ return retval;
+ *i = (buf[0] << 8) + buf[1];
+ return 0;
+ }
+}
krb5_error_code
-krb5_fcc_read_int(id, i)
+krb5_fcc_read_octet(id, i)
krb5_ccache id;
- int *i;
+ krb5_octet *i;
{
- return krb5_fcc_read(id, (krb5_pointer) i, sizeof(int));
-}
+ return krb5_fcc_read(id, (krb5_pointer) i, 1);
+}
-krb5_error_code
-krb5_fcc_read_bool(id, b)
- krb5_ccache id;
- krb5_boolean *b;
-{
- return krb5_fcc_read(id, (krb5_pointer) b, sizeof(krb5_boolean));
-}
krb5_error_code
krb5_fcc_read_times(id, t)
krb5_ccache id;
krb5_ticket_times *t;
{
- return krb5_fcc_read(id, (krb5_pointer) t, sizeof(krb5_ticket_times));
-}
-
-krb5_error_code
-krb5_fcc_read_flags(id, f)
- krb5_ccache id;
- krb5_flags *f;
-{
- return krb5_fcc_read(id, (krb5_pointer) f, sizeof(krb5_flags));
+ krb5_fcc_data *data = (krb5_fcc_data *)id->data;
+ krb5_error_code retval;
+ krb5_int32 i;
+
+ if ((data->version == KRB5_FCC_FVNO_1) ||
+ (data->version == KRB5_FCC_FVNO_2))
+ return krb5_fcc_read(id, (krb5_pointer) t, sizeof(krb5_ticket_times));
+ else {
+ retval = krb5_fcc_read_int32(id, &i);
+ CHECK(retval);
+ t->authtime = i;
+
+ retval = krb5_fcc_read_int32(id, &i);
+ CHECK(retval);
+ t->starttime = i;
+
+ retval = krb5_fcc_read_int32(id, &i);
+ CHECK(retval);
+ t->endtime = i;
+
+ retval = krb5_fcc_read_int32(id, &i);
+ CHECK(retval);
+ t->renew_till = i;
+ }
+ return 0;
+errout:
+ return retval;
}
krb5_error_code
krb5_authdata *a;
{
krb5_error_code kret;
+ krb5_int32 int32;
int ret;
+ a->magic = KV5M_AUTHDATA;
a->contents = NULL;
kret = krb5_fcc_read_ui_2(id, &a->ad_type);
CHECK(kret);
- kret = krb5_fcc_read_int(id, &a->length);
+ kret = krb5_fcc_read_int32(id, &int32);
CHECK(kret);
+ a->length = int32;
if (a->length == 0 )
return KRB5_OK;
a->contents = (krb5_octet *) malloc(a->length);
if (a->contents == NULL)
return KRB5_CC_NOMEM;
- ret = read(((krb5_fcc_data *) id->data)->fd, (char *)a->contents,
- (a->length)*sizeof(krb5_octet));
- if (ret == -1) {
- krb5_xfree(a->contents);
- return krb5_fcc_interpret(errno);
- }
- if (ret != (a->length)*sizeof(krb5_octet)) {
- krb5_xfree(a->contents);
- return KRB5_CC_END;
- }
+
+ kret = krb5_fcc_read(id, a->contents, a->length);
+ CHECK(kret);
+
return KRB5_OK;
errout:
if (a->contents)
{
#define TCHECK(ret) if (ret != KRB5_OK) goto lose;
krb5_error_code ret;
+ krb5_octet octet;
MAYBE_OPEN(id, FCC_OPEN_RDWR);
TCHECK(ret);
ret = krb5_fcc_store_times(id, &creds->times);
TCHECK(ret);
- ret = krb5_fcc_store_bool(id, &creds->is_skey);
+ octet = creds->is_skey;
+ ret = krb5_fcc_store_octet(id, octet);
TCHECK(ret);
- ret = krb5_fcc_store_flags(id, &creds->ticket_flags);
+ ret = krb5_fcc_store_int32(id, creds->ticket_flags);
TCHECK(ret);
ret = krb5_fcc_store_addrs(id, creds->addresses);
TCHECK(ret);
/*
* lib/krb5/ccache/file/fcc_write.c
*
- * Copyright 1990,1991,1992 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991,1992,1993,1994 by the Massachusetts Institute
+ * of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
ret = write(((krb5_fcc_data *)id->data)->fd, (char *) buf, len);
if (ret < 0)
return krb5_fcc_interpret(errno);
+ if (ret != len)
+ return KRB5_CC_WRITE;
return KRB5_OK;
}
*/
tmp++;
} else {
- ret = krb5_fcc_store_int32(id, &type);
+ ret = krb5_fcc_store_int32(id, type);
CHECK(ret);
}
- ret = krb5_fcc_store_int32(id, &tmp);
+ ret = krb5_fcc_store_int32(id, tmp);
CHECK(ret);
ret = krb5_fcc_store_data(id, krb5_princ_realm(princ));
while (*temp++)
length += 1;
- ret = krb5_fcc_store_int32(id, &length);
+ ret = krb5_fcc_store_int32(id, length);
CHECK(ret);
for (i=0; i < length; i++) {
ret = krb5_fcc_store_addr(id, addrs[i]);
krb5_ccache id;
krb5_keyblock *keyblock;
{
+ krb5_fcc_data *data = (krb5_fcc_data *)id->data;
krb5_error_code ret;
- ret = krb5_fcc_store_keytype(id, &keyblock->keytype);
+ ret = krb5_fcc_store_ui_2(id, keyblock->keytype);
CHECK(ret);
- ret = krb5_fcc_store_int(id, &keyblock->length);
+ if ((data->version != KRB5_FCC_FVNO_1) &&
+ (data->version != KRB5_FCC_FVNO_2)) {
+ ret = krb5_fcc_store_ui_2(id, keyblock->etype);
+ CHECK(ret);
+ }
+ ret = krb5_fcc_store_int32(id, keyblock->length);
CHECK(ret);
- ret = write(((krb5_fcc_data *) id->data)->fd, (char *)keyblock->contents,
- (keyblock->length)*sizeof(krb5_octet));
- if (ret < 0)
- return krb5_fcc_interpret(errno);
- if (ret != (keyblock->length)*sizeof(krb5_octet))
- return KRB5_CC_END;
-
- return KRB5_OK;
+ return krb5_fcc_write(id, (char *) keyblock->contents, keyblock->length);
}
krb5_error_code
{
krb5_error_code ret;
- ret = krb5_fcc_store_ui_2(id, &addr->addrtype);
+ ret = krb5_fcc_store_ui_2(id, addr->addrtype);
CHECK(ret);
- ret = krb5_fcc_store_int(id, &addr->length);
+ ret = krb5_fcc_store_int32(id, addr->length);
CHECK(ret);
- ret = write(((krb5_fcc_data *) id->data)->fd, (char *)addr->contents,
- (addr->length)*sizeof(krb5_octet));
- if (ret < 0)
- return krb5_fcc_interpret(errno);
- if (ret != (addr->length)*sizeof(krb5_octet))
- return KRB5_CC_END;
- return KRB5_OK;
+ return krb5_fcc_write(id, (char *) addr->contents, addr->length);
}
{
krb5_error_code ret;
- ret = krb5_fcc_store_int32(id, &data->length);
+ ret = krb5_fcc_store_int32(id, data->length);
CHECK(ret);
- ret = write(((krb5_fcc_data *) id->data)->fd, data->data, data->length);
- if (ret == -1)
- return krb5_fcc_interpret(errno);
-
- return KRB5_OK;
+ return krb5_fcc_write(id, data->data, data->length);
}
krb5_error_code
krb5_fcc_store_int32(id, i)
krb5_ccache id;
- krb5_int32 *i;
+ krb5_int32 i;
{
- return krb5_fcc_write(id, (char *) i, sizeof(krb5_int32));
+ krb5_fcc_data *data = (krb5_fcc_data *)id->data;
+ unsigned char buf[4];
+
+ if ((data->version == KRB5_FCC_FVNO_1) ||
+ (data->version == KRB5_FCC_FVNO_2))
+ return krb5_fcc_write(id, (char *) &i, sizeof(krb5_int32));
+ else {
+ buf[3] = i & 0xFF;
+ i >>= 8;
+ buf[2] = i & 0xFF;
+ i >>= 8;
+ buf[1] = i & 0xFF;
+ i >>= 8;
+ buf[0] = i & 0xFF;
+
+ return krb5_fcc_write(id, buf, 4);
+ }
}
krb5_error_code
krb5_fcc_store_ui_2(id, i)
- krb5_ccache id;
- krb5_ui_2 *i;
-{
- return krb5_fcc_write(id, (char *) i, sizeof(krb5_ui_2));
-}
-
-krb5_error_code
-krb5_fcc_store_keytype(id, k)
- krb5_ccache id;
- krb5_keytype *k;
-{
- return krb5_fcc_write(id, (char *) k, sizeof(krb5_keytype));
-}
-
-krb5_error_code
-krb5_fcc_store_int(id, i)
- krb5_ccache id;
- int *i;
+ krb5_ccache id;
+ krb5_int32 i;
{
- return krb5_fcc_write(id, (char *) i, sizeof(int));
+ krb5_fcc_data *data = (krb5_fcc_data *)id->data;
+ krb5_ui_2 ibuf;
+ unsigned char buf[2];
+
+ if ((data->version == KRB5_FCC_FVNO_1) ||
+ (data->version == KRB5_FCC_FVNO_2)) {
+ ibuf = i;
+ return krb5_fcc_write(id, (char *) &ibuf, sizeof(krb5_ui_2));
+ } else {
+ buf[1] = i & 0xFF;
+ i >>= 8;
+ buf[0] = i & 0xFF;
+
+ return krb5_fcc_write(id, buf, 2);
+ }
}
krb5_error_code
-krb5_fcc_store_bool(id, b)
- krb5_ccache id;
- krb5_boolean *b;
+krb5_fcc_store_octet(id, i)
+ krb5_ccache id;
+ krb5_int32 i;
{
- return krb5_fcc_write(id, (char *) b, sizeof(krb5_boolean));
+ krb5_octet ibuf;
+
+ ibuf = i;
+ return krb5_fcc_write(id, (char *) &ibuf, 1);
}
krb5_error_code
krb5_ccache id;
krb5_ticket_times *t;
{
- return krb5_fcc_write(id, (char *) t, sizeof(krb5_ticket_times));
+ krb5_fcc_data *data = (krb5_fcc_data *)id->data;
+ krb5_error_code retval;
+
+ if ((data->version == KRB5_FCC_FVNO_1) ||
+ (data->version == KRB5_FCC_FVNO_2))
+ return krb5_fcc_write(id, (char *) t, sizeof(krb5_ticket_times));
+ else {
+ retval = krb5_fcc_store_int32(id, t->authtime);
+ CHECK(retval);
+ retval = krb5_fcc_store_int32(id, t->starttime);
+ CHECK(retval);
+ retval = krb5_fcc_store_int32(id, t->endtime);
+ CHECK(retval);
+ retval = krb5_fcc_store_int32(id, t->renew_till);
+ CHECK(retval);
+ return 0;
+ }
}
-krb5_error_code
-krb5_fcc_store_flags(id, f)
- krb5_ccache id;
- krb5_flags *f;
-{
- return krb5_fcc_write(id, (char *) f, sizeof(krb5_flags));
-}
-
krb5_error_code
krb5_fcc_store_authdata(id, a)
krb5_ccache id;
length++;
}
- ret = krb5_fcc_store_int32(id, &length);
+ ret = krb5_fcc_store_int32(id, length);
CHECK(ret);
for (i=0; i<length; i++) {
ret = krb5_fcc_store_authdatum (id, a[i]);
krb5_authdata *a;
{
krb5_error_code ret;
- ret = krb5_fcc_store_ui_2(id, &a->ad_type);
+ ret = krb5_fcc_store_ui_2(id, a->ad_type);
CHECK(ret);
- ret = krb5_fcc_store_int32(id, &a->length);
+ ret = krb5_fcc_store_int32(id, a->length);
CHECK(ret);
return krb5_fcc_write(id, (krb5_pointer) a->contents, a->length);
}