Apple Mac Server OS X Manuel d'utilisateur Page 31

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 44
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 30
::memcpy(&(anAuthDataBuf->fBufferData[aCurLength]), &aTempLength,
sizeof(long));
aCurLength += sizeof(long);
::memcpy(&(anAuthDataBuf->fBufferData[aCurLength]), inUserPassword,
aTempLength);
aCurLength += aTempLength;
anAuthBuff->fBufferLength = aDataBufSize;
aDirErr = dsDoDirNodeAuth(inDirNodeRef, anAuthType2Use, true, anAuthDataBuf,
aAuthRespBuf, &aContinueData);
switch(aDirErr)
{
case eDSNoErr:
aResult = true;
break;
default:
// If any other error, assume the name or password is bad.
aResult = false;
break;
}
// Clean up allocations.
aDirErr = dsDataBufferDeAllocate(inDirRef, anAuthDataBuf);
anAuthDataBuf = NULL;
// Don't need to keep the response.
aDirErr = dsDataBufferDeAllocate(inDirRef, aAuthRespBuf);
aAuthRespBuf = NULL;
// Don't need the authentication type value. Build a new one if needed
// later.
aDirErr = dsDataNodeDeAllocate(inDirRef, anAuthType2Use);
anAuthType2Use = NULL;
// Return the result of the authentication.
return (aResult);
}
Authenticating a User to a Node 31
2007-01-08 | © 2007 Apple Inc. All Rights Reserved.
CHAPTER 2
Working with Nodes
Vue de la page 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 43 44

Commentaires sur ces manuels

Pas de commentaire