now use int flag to scc_open_file
authorJohn Kohl <jtkohl@mit.edu>
Tue, 12 Feb 1991 14:03:34 +0000 (14:03 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Tue, 12 Feb 1991 14:03:34 +0000 (14:03 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1668 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/ccache/stdio/scc-proto.h
src/lib/krb5/ccache/stdio/scc_init.c
src/lib/krb5/ccache/stdio/scc_nseq.c
src/lib/krb5/ccache/stdio/scc_sflags.c
src/lib/krb5/ccache/stdio/scc_store.c

index e700182ca1c22696cbc8f9a6615445bd6241d1be..fc3c71f8092be41a928b60131fc974da87ffbe11 100644 (file)
@@ -42,7 +42,7 @@ krb5_error_code krb5_scc_initialize PROTOTYPE((krb5_ccache id , krb5_principal p
 
 /* 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 ));
index ba3787744908f190030c4b93ed111bbd1a1b5ba6..f7ec080224af074ea7218f8f4b36fd85812af1ad 100644 (file)
@@ -37,7 +37,7 @@ krb5_scc_initialize(id, princ)
 {
      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);
 
index 2bdda2fab4f42e71e9ee667eab4751eb8e846af0..a4f5033194079c950351a89131388fddf50c5bf9 100644 (file)
@@ -61,7 +61,7 @@ krb5_scc_next_cred(id, cursor, creds)
      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);
index 2d0db8a0fae83aaeab2c503016cab3a5e38fa39e..3b16691ea9f28880017a092cac5f39dc8b770b8a 100644 (file)
@@ -45,7 +45,7 @@ krb5_scc_set_flags(id, flags)
        /* 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);
        }
     }
 
index 8d0f29e7a5b63e455231e174d793e3e839f202ca..a5d7248fbe0ae7cb68924b0122830d6b998f0b53 100644 (file)
@@ -38,7 +38,7 @@ krb5_scc_store(id, creds)
      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)