network security & moreunix
network security & moreunix
- Subject: network security & moreunix
- From: Dev_Apple <email@hidden>
- Date: Tue, 14 Jun 2005 07:03:29 -0700
I am using moreunix and having a problem in moreunixread. I call moreunixread from
MoreSecHelperToolMain. The MoreSecHelperToolMain's code is:
AuthorizationExternalForm extAuth;
// The caller gave us a AuthorizationRef, but we're don't use
// it in this case. Just throw it away.
if( auth != NULL )
{
#if MORE_DEBUG
fprintf( stderr, "MoreSecurity: MoreSecHelperToolMain: auth != NULL, about to call AuthorizationFree...\n" );
#endif
junk = AuthorizationFree( auth, kAuthorizationFlagDefaults );
assert( junk == noErr );
auth = NULL;
}
// Started directly by the application. Read the authorization
// "byte blob" from our input, and use that to create our
// AuthorizationRef.
err = MoreUNIXRead( fdIn, &extAuth, sizeof(extAuth), NULL );
When I call moreunixread, I set
fdIn to STDIN_FILENO. The problem I get is at the read. At this point, the computer hangs. Has anyone seen this problem before and know what to do? Quinn wrote both bits of source.
extern int MoreUNIXRead( int fd, void *buf, size_t bufSize, size_t *bytesRead )
// See comment in header.
{
int err;
char * cursor;
size_t bytesLeft;
ssize_t bytesThisTime;
assert(fd >= 0);
assert(buf != NULL);
err = 0;
bytesLeft = bufSize;
cursor = (char *) buf;
while ( (err == 0) && (bytesLeft != 0) ) {
bytesThisTime = read(fd, cursor, bytesLeft);
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden