• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
network security & moreunix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: network security & moreunix
      • From: Quinn <email@hidden>
  • Prev by Date: AW: SCNetworkConnectionStart() Function for MAC OS Version <= 10_2
  • Next by Date: Re: network security & moreunix
  • Previous by thread: Re: AW: SCNetworkConnectionStart() Function for MAC OS Version <= 10_2
  • Next by thread: Re: network security & moreunix
  • Index(es):
    • Date
    • Thread