PerlWare::NDSContext
PerlWare::NDSContext provide functions to manipulate information available
in relation to the current environment and context.
PerlWare::NDSContext inherits all methods defined in PerlWare.
Method Index:
new
Creates a new PerlWare::NDSContext object.
Example:
$C = new PerlWare::NDSContext;
AbbreviateName
This method abbreviates $ObjectName. Converts a NDS name (including
the naming attributes) to its shortest form relative to the name context
set in $C. The abbreviated name is returned in $AbbreviatedName.
Returns undef on failure in which case you should use LastErr()
to get the Netware error code.
Example:
$AbbreviatedName = $C->AbbreviateName($ObjectName);
AddSecurityEquiv
Adds to the specified object's security equivalence. $equalTo
Points to the name to be added to the Security Equivalence attribute of
the object specified by $equalFrom . This method is handy when
adding users to a group!.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->AddSecurityEquiv($equalFrom, $equalTo);
CanDSAuthenticate
If you can authenticate to the NDS this returns != 0.
Example:
$CanAuth = $C->CanDSAuthenticate();
CanonicalizeName
Converts an abbreviated name to the canonical form. The canonicalized
name is returned in $Outname. For example, if the input is
CN=Steinar Kleven
and the name context is
OU=Bar.O=Acme
the canonicalized name is
CN=Steinar kleven.OU=Bar.O=Acme
Returns undef on failure in which case you should use LastErr() to get
the Netware error code.
Example:
$Outname = $C->CanonicalizeName($InName)
ChangeObjectPassword
This method set the password for a given object if a public/private
key pair has been assigned. See GenerateObjectKeyPair().
The $Opt flag is currently not used.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->ChangeObjectPassword($Opt, $ObjName, $oldPass,
$newpass)
Debug
This method set the internal debugging of a class to a given level.
Only 0 and and 1 are in use in version 1.00.
0: No debug.
1: Print function failures.
Example:
$C->Debug(1);
GenerateObjectKeyPair
This method creates or changes a public/private key pair for a specified
object.
Has to be called before the object can log in.
$flag parameter is currently not used and can be ignored.
Returns 0, on success, Netware error code on failure.
Examples:
$ErrCode = $C->GenerateObjectKeyPair($ObjName, $newpass, $flag)
GetDefNameContext
GetDefNameContext() returns the default name context for the
logged in object.
Returns undef on failure in which case you should use LastErr() to
get the Netware error code.
Example:
$NameContext = $C->GetDefNameContext();
IsDSAuthenticated
Returns nonzero value if you are authenticated through NDS.
Example:
$IsAuth = $C->IsDSAuthenticated();
Login
Performs all authentication operations needed to establish a client's
connection to the network and to the network's authentication service.
As of NWSDK(14) $validperiod and $options are
not used. (Use 0)
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->Login($options, $UserName, $passwd, $validperiod);
Logout
After calling Logout(), new connections cannot be established
by calling Authenticate(). Logout() leaves intact all
server attachments and other session connections, authenticated or unauthenticated.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->Logout();
MoveObject
Moves an NDS object from one container to another and/or renames the
object. $objectName is the name of the object to move. $destParentDN
is the container where the object is to be put. $destRDN is the
new name of the object.
Example:
CN=Steinar.OU=Devel.O=Makers and you want to move Steinar to Sales.
For objectName pass in 'CN=Steinar.OU=Devel.O=Makers'
For destParentDN pass in 'OU=Sales.O=Makers' and
for destRDN pass in 'CN=Steinar'.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->MoveObject($objectName, $destParentDN, $destRDN);
RemoveAllTypes
Returns the object name as a typeless in $typeLess.
Example: ``CN=Steinar.OU=Devel.O=Makers'' in $Name will return ``Steinar.Devel.Makers''
in $typeLess.
Returns undef on failure in which case you should use LastErr() to
get the Netware error code.
Example:
$typeLess = $C->RemoveAllTypes($Name);
RemoveObject
Removes the named object from NDS. The object can not have any subordinates.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->RemoveObject($ObjectName);
RemSecurityEquiv
Removes a security equivalence from the specified object. $equalFrom
is the name of the object whose Security Equivalence attribute is to be
modified. $equalTo is the object name to be removed from the list.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->RemSecurityEquiv($equalFrom, $equalTo);
ReplaceAttrNameAbbrev
Replaces the abbreviated attribute name with its unabbreviated name.
Example: If $inName is ``CN'', the value of $longName
will be ``Common Name''.
Returns undef on failure in which case you should use LastErr() to
get the Netware error code.
Example:
$longName = $C->ReplaceAttrNameAbbrev($inName);
SetDefNameContext
Sets the default name context to $NameContext.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->SetDefNameContext($NameContext);
VerifyObjectPassword
Verifies the password of $objectName. $Passwd can
be any length and all characters are significant. Upper- and lowercase
letters are distinct. $opt is reserved; pass in zero.
Returns 0 on success (password match), Netware error code on failure.
Example:
$ErrCode = $C->VerifyObjectPassword($opt, $objectName, $Passwd);
WhoAmI
This method is Novells answer to unix 'whoami'.
Your loginname will be returned in $MyName.
Returns undef on failure in which case you should use LastErr() to
get the Netware error code.
Example:
$MyName = $C->WhoAmI();
SEE ALSO
the NWServer class
the Misc help file
the Buf_T class
the PerlWare help file
the Audit class
http://www.ahs.hist.no/distr/PerlWare/
COPYRIGHT
Copyright (c) Steinar Kleven 1997.
All rights reserved.