Apple Mac Server OS X Manuale Utente Pagina 29

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 44
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 28
if ( dirStatus == eDSNoErr )
{
dirStatus = MyOpenDirNode( &nodeRef );
if ( dirStatus == eDSNoErr )
{
dsCloseDirNode( nodeRef );
}
}
if ( gDirRef != NULL )
{
dirStatus = dsCloseDirService( gDirRef );
}
}
long MyOpenDirNode ( tDirNodeReference *outNodeRef )
{
long dirStatus = eDSNoErr;
char nodeName[ 256 ] = "\0";
tDataListPtr nodePath = NULL;
printf( "Open Node : " );
fflush( stdout );
scanf( "%s", nodeName );
printf( "Opening: %s.\n", nodeName );
nodePath = dsBuildFromPath( gDirRef, nodeName, "/" );
if ( nodePath != NULL )
{
dirStatus = dsOpenDirNode( gDirRef, nodePath, outNodeRef );
if ( dirStatus == eDSNoErr )
{
printf( "Open succeeded. Node Reference = %lu\n", (unsigned
long)outNodeRef );
}
else
{
printf( "Open node failed. Err = %ld\n", dirStatus );
}
}
dsDataListDeallocate( gDirRef, nodePath );
free( nodePath );
return( dirStatus );
} // MyOpenDirNode
Authenticating a User to a Node
To authenticate itself to the Open Directory for the purposes of reading, writing, or making changes to a
node, an Open Directory client application calls dsDoDirNodeAuth. The dsDoDirNodeAuth function handles
authentication methods that use one or more steps to complete the authentication process.
To determine the authentication methods that a node supports, call dsGetDirNodeInfo for the node and
request the kDSNAttrAuthMethod attribute. For any particular user, some methods may not be supported.
The available authentication methods depend on the authentication authority of the user that is being
authenticated.
Authenticating a User to a Node 29
2007-01-08 | © 2007 Apple Inc. All Rights Reserved.
CHAPTER 2
Working with Nodes
Vedere la pagina 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 43 44

Commenti su questo manuale

Nessun commento