summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi/generic/util_set.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-11-24 02:39:44 +0000
committerKen Raeburn <raeburn@mit.edu>2004-11-24 02:39:44 +0000
commit2d28078f72851c6f111ce50d78331603f1a2011f (patch)
tree72cbe09e24f7018f923e41d15d18230fbb50c080 /src/lib/gssapi/generic/util_set.c
parent30f0fa1e2ef25e2c43105606ce2e663956990695 (diff)
downloadkrb5-2d28078f72851c6f111ce50d78331603f1a2011f.tar.gz
krb5-2d28078f72851c6f111ce50d78331603f1a2011f.tar.xz
krb5-2d28078f72851c6f111ce50d78331603f1a2011f.zip
fix missing locking in keytab; fix stdio handling too
The keytab type list lock was implemented, but I missed the per-keytab lock. Since I was in there, I ripped out the bogus stdio buffer mangling that the code was doing, and set up a buffer to be used that we can sanitize later. * kt_file.c (struct _krb5_ktfile_data): Add mutex and buffer. (KTFILEBUFP, KTLOCK, KTUNLOCK, KTCHECKLOCK): New macros. (krb5_ktfile_resolve): Initialize mutex. (krb5_ktfile_close): Zap data buffer before freeing. (krb5_ktfile_get_entry, krb5_ktfile_start_seq_get, krb5_ktfile_get_next, krb5_ktfile_end_get, krb5_ktfile_add, krb5_ktfile_remove): Lock and unlock the mutex. (krb5_ktfileint_open): Check that the mutex is locked. Set the stdio buffer to the new buffer in the ktfile data. (krb5_ktfileint_write_entry, krb5_ktfileint_find_slot): Check that the mutex is locked. Don't call setbuf. Flush the stdio buffer after writing. ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16905 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi/generic/util_set.c')
0 files changed, 0 insertions, 0 deletions