[pubcookie-dev] Security context fixup for Win32
Ryan Campbell
ryanc at cac.washington.edu
Tue Feb 17 15:18:58 PST 2004
There should only be four minor changes outside of the Win32 #ifdefs in
security_legacy.c:
! pbc_cookie_data *libpbc_unbundle_cookie(pool *p, const security_context
*context, char *in, const char *peer, const char use_granting)
(to make definition consistant with declaration)
! fp = pbc_fopen(p, cryptkey, "rb");
(Windows needs the b for binary files, POSIX ignores it)
! if( cb_read = fread(context->cryptkey, sizeof(char),
PBC_DES_KEY_BUF, fp)
!= PBC_DES_KEY_BUF) {
pbc_log_activity(p, PBC_LOG_ERROR,
! "can't read crypt key %s: short read: %d", cryptkey,
cb_read);
(cryptkey was mistakenly keyfile, added cb_read for extra debugging)
! strlcat(buf, DIR_SEP, 1024);
(Windows likes backslash)
Note that I've not yet implemented different security contexts for the
filter. I'll get on that next.
I also had to lose some typchecking and typedef pool to void due to an
include file catch-22. I'll try to repair that as well.
-Ryan
More information about the pubcookie-dev
mailing list