/* scc_maybe.c */
krb5_error_code krb5_scc_close_file PROTOTYPE((krb5_ccache));
-krb5_error_code krb5_scc_open_file PROTOTYPE((krb5_ccache,const char*));
+krb5_error_code krb5_scc_open_file PROTOTYPE((krb5_ccache,int));
/* scc_nseq.c */
krb5_error_code krb5_scc_next_cred PROTOTYPE((krb5_ccache id , krb5_cc_cursor *cursor , krb5_creds *creds ));
{
int ret;
- ret = krb5_scc_open_file (id, "w+");
+ ret = krb5_scc_open_file (id, SCC_OPEN_AND_ERASE);
if (ret < 0)
return krb5_scc_interpret(errno);
Z (addresses);
#undef Z
- MAYBE_OPEN (id, "r");
+ MAYBE_OPEN (id, SCC_OPEN_RDONLY);
fcursor = (krb5_scc_cursor *) *cursor;
ret = fseek(((krb5_scc_data *) id->data)->file, fcursor->pos, 0);
/* asking to turn off OPENCLOSE mode, meaning it must be
left open. We open if it's not yet open */
if (OPENCLOSE(id)) {
- ret = krb5_scc_open_file (id, "r+");
+ ret = krb5_scc_open_file (id, SCC_OPEN_RDWR);
}
}
krb5_error_code ret;
/* Make sure we are writing to the end of the file */
- MAYBE_OPEN (id, "r+");
+ MAYBE_OPEN (id, SCC_OPEN_RDWR);
ret = fseek(((krb5_scc_data *) id->data)->file, 0, 2);
if (ret < 0)