Sm_PolicyApi_SetPath()

Sets the path of the user identified by pUser in the policy identified by pszPolicyOid.
sm1252sp1
Sets the path of the user identified by
pUser
in the policy identified by
pszPolicyOid
.
Type
User and user state function.
Syntax
int SM_EXTERN Sm_PolicyApi_SetPath (
void*   pSessionHandle, 
   Sm_PolicyApi_User_t* pUserconst char*    pszNewPath,const char*  pszPolicyOid);  
Parameter
I/O
Description
pSessionHandle
I
A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session.
pUser
I
A pointer to an Sm_PolicyApi_user_t structure containing information about the user.
pszNewPath
I
New path for the user.
pszPolicyOid
I
A null-terminated string containing the object identifier of an existing policy to which a user path is to be set.
 
Remarks
This function is successful only when the pointer to Sm_PolicyApi_User_t isobtained with the Sm_PolicyApi_GetPolicyUsers() function. If theuseris retrieved with Sm_PolicyApi_LookupDirectoryEntry(), Sm_PolicyApi_GetDirectoryContents(), or Sm_PolicyApi_ValidateDirectoryEntry(),
pszUserPolicyOid
willbeinvalid and the call will fail.
Returns
  • Sm_PolicyApi_Success. The set path operation was successful.
  • Sm_PolicyApi_Failure. The set path operation was not successful.
  • Sm_PolicyApi_InvalidHandle. There was no valid initialization prior to this call.
  • Sm_PolicyApi_NoSession. There is no valid administrator session.
  • Sm_PolicyApi_InvalidOid:
    • The policy OID was not found.
    • The user policy OID was not found.