EssGetGroupInfoEx

グループのセキュリティ情報が含まれている、グループ情報構造体を取得します。EssGetGroupに似ていますが、ユーザー・ディレクトリの指定、またはGroupIDの一意のID属性を受け入れることができます。

構文

            ESS_FUNC_M EssGetGroupInfoEx (
            hCtx
            , 
            GroupId
            , 
            bisIdentity
            , 
            ppGroupInfo
            );
         
パラメータデータ型説明

hCtx

ESS_HCTX_T

APIコンテキスト・ハンドル(入力)。

GroupId

ESS_STR_T

グループ名(入力)。groupname@providerまたは一意のID属性として指定できます。

bIsIdentity

ESS_BOOL_T

入力。GroupIdが名前かIDかを示します。TRUEの場合、GroupIdはIDです。

ppGroupInfo

ESS_PGROUPINFOID_T

割り当てられたグループ情報構造体を受け取るポインタのアドレス(出力)。グループ・リスト構造体には、ユーザー・ディレクトリおよび一意のID属性を含められます。

備考

ppGroupInfoに対して割り当てられたメモリーは、EssFreeを使用して解放する必要があります。

戻り値

正常終了の場合、グループ情報構造体がppGroupInfoに戻されます。

アクセス

この関数を使用するには、ログインしたサーバーに対して、呼出し元がユーザーの作成/削除権限(ESS_PRIV_USERCREATE)を持っている必要があります。

         
void DisplayGroupsInfoEx(ESS_GROUPINFOID_T groupInfo)
{
   ESS_STS_T sts  = ESS_STS_NOERR;
   ESS_BOOL_T isDefined = ESS_TRUE;

   printf("\tUser Name: %s\n", groupInfo.Name);
   printf("\tProvider Name: %s\n", groupInfo.ProviderName);
   printf("\tIdentity: %s\n", groupInfo.connparam);
   printf("\tDescription: %s\n", groupInfo.Description);
   printf("\tEMail Identification: %s\n", groupInfo.EMailID);

   if (groupInfo.LockedOut)
      printf("\tLocked out: Yes\n");
   else
      printf("\tLocked out: No\n");

   if (groupInfo.PwdChgNow)
      printf("\tChange the password now: Yes\n");
   else
      printf("\tChange the password now: No\n");

   printf("\tPassword: %s\n", groupInfo.Password);
   printf("\tApplication: %s\n", groupInfo.AppName);
   printf("\tDatabase: %s\n", groupInfo.DbName);

   if (groupInfo.Login)
      printf("\tLogged in: Yes\n");
   else
      printf("\tLogged in: No\n");

   switch(groupInfo.Access)
   {
      case ESS_ACCESS_ADMIN:
         printf("\tAccess: %d - ESS_ACCESS_ADMIN\n", groupInfo.Access);
         break;
      case ESS_ACCESS_APPALL:
         printf("\tAccess: %d - ESS_ACCESS_APPALL\n", groupInfo.Access);
         break;
      case ESS_ACCESS_DBALL:
         printf("\tAccess: %d - ESS_ACCESS_DBALL\n", groupInfo.Access);
         break;
      case ESS_ACCESS_APPCREATE:
         printf("\tAccess: %d - ESS_ACCESS_DBALL\n", groupInfo.Access);
         break;
      case ESS_ACCESS_APPMANAGE:
         printf("\tAccess: %d - ESS_ACCESS_APPMANAGE\n", groupInfo.Access);
         break;
      case ESS_ACCESS_DBCREATE:
         printf("\tAccess: %d - ESS_ACCESS_DBCREATE\n", groupInfo.Access);
         break;
      case ESS_ACCESS_DBMANAGE:
         printf("\tAccess: %d - ESS_ACCESS_DBMANAGE\n", groupInfo.Access);
         break;
      case ESS_ACCESS_CALC:
         printf("\tAccess: %d - ESS_ACCESS_CALC\n", groupInfo.Access);
         break;
      case ESS_ACCESS_WRITE:
         printf("\tAccess: %d - ESS_ACCESS_WRITE\n", groupInfo.Access);
         break;
      case ESS_ACCESS_READ:
         printf("\tAccess: %d - ESS_ACCESS_READ\n", groupInfo.Access);
         break;
      case ESS_PRIV_USERCREATE:
         printf("\tAccess: %d - ESS_PRIV_USERCREATE\n", groupInfo.Access);
         break;
      case ESS_PRIV_APPCREATE:
         printf("\tAccess: %d - ESS_PRIV_APPCREATE\n", groupInfo.Access);
         break;
      case ESS_PRIV_APPMANAGE:
         printf("\tAccess: %d - ESS_PRIV_APPMANAGE\n", groupInfo.Access);
         break;
      case ESS_PRIV_APPLOAD:
         printf("\tAccess: %d - ESS_PRIV_APPLOAD\n", groupInfo.Access);
         break;
      case ESS_PRIV_DBCREATE:
         printf("\tAccess: %d - ESS_PRIV_DBCREATE\n", groupInfo.Access);
         break;
      case ESS_PRIV_DBMANAGE:
         printf("\tAccess: %d - ESS_PRIV_DBMANAGE\n", groupInfo.Access);
         break;
      case ESS_PRIV_DBLOAD:
         printf("\tAccess: %d - ESS_PRIV_DBLOAD\n", groupInfo.Access);
         break;
      case ESS_PRIV_CALC:
         printf("\tAccess: %d - ESS_ACCESS_DBALL\n", groupInfo.Access);
         break;
      case ESS_PRIV_WRITE:
         printf("\tAccess: %d - ESS_PRIV_WRITE\n", groupInfo.Access);
         break;
      case ESS_PRIV_READ:
         printf("\tAccess: %d - ESS_PRIV_READ\n", groupInfo.Access);
         break;
      case ESS_PRIV_NONE:
         printf("\tAccess: %d - ESS_PRIV_NONE\n", groupInfo.Access);
         break;
      default:
         printf("\tAccess: Unknown\n");
   }

   switch(groupInfo.MaxAccess)
   {
      case ESS_ACCESS_ADMIN:
         printf("\tMax Access: %d - ESS_ACCESS_ADMIN\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_APPALL:
         printf("\tMax Access: %d - ESS_ACCESS_APPALL\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_DBALL:
         printf("\tMax Access: %d - ESS_ACCESS_DBALL\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_APPCREATE:
         printf("\tMax Access: %d - ESS_ACCESS_DBALL\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_APPMANAGE:
         printf("\tMax Access: %d - ESS_ACCESS_APPMANAGE\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_DBCREATE:
         printf("\tMax Access: %d - ESS_ACCESS_DBCREATE\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_DBMANAGE:
         printf("\tMax Access: %d - ESS_ACCESS_DBMANAGE\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_CALC:
         printf("\tMax Access: %d - ESS_ACCESS_CALC\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_WRITE:
         printf("\tMax Access: %d - ESS_ACCESS_WRITE\n", groupInfo.MaxAccess);
         break;
      case ESS_ACCESS_READ:
         printf("\tMax Access: %d - ESS_ACCESS_READ\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_USERCREATE:
         printf("\tMax Access: %d - ESS_PRIV_USERCREATE\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_APPCREATE:
         printf("\tMax Access: %d - ESS_PRIV_APPCREATE\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_APPMANAGE:
         printf("\tMax Access: %d - ESS_PRIV_APPMANAGE\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_APPLOAD:
         printf("\tMax Access: %d - ESS_PRIV_APPLOAD\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_DBCREATE:
         printf("\tMax Access: %d - ESS_PRIV_DBCREATE\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_DBMANAGE:
         printf("\tMax Access: %d - ESS_PRIV_DBMANAGE\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_DBLOAD:
         printf("\tMax Access: %d - ESS_PRIV_DBLOAD\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_CALC:
         printf("\tMax Access: %d - ESS_ACCESS_DBALL\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_WRITE:
         printf("\tMax Access: %d - ESS_PRIV_WRITE\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_READ:
         printf("\tMax Access: %d - ESS_PRIV_READ\n", groupInfo.MaxAccess);
         break;
      case ESS_PRIV_NONE:
         printf("\tMax Access: %d - ESS_PRIV_NONE\n", groupInfo.MaxAccess);
         break;
      default:
         printf("\tMax Access: Unknown\n");
   }

   printf("\tPassword Expiration in Dates: %d\n",groupInfo.Expiration);
   printf("\tFailed Login Attempts Since Then: %d\n", groupInfo.FailCount);
   printf("\tLogin ID: %d\n", groupInfo.LoginId);
   printf("\tProtocol: %s\n", groupInfo.protocol);
   printf("\tConnection Parameter: %s\n", groupInfo.connparam);
   printf( "\n");
   
}


ESS_FUNC_M ESS_GetGroupInfoEx (ESS_HCTX_T hCtx)
{
   ESS_STS_T sts  = ESS_STS_NOERR;
   ESS_STR_T groupId;
   ESS_BOOL_T bisIdentity;
   ESS_PGROUPINFOID_T groupInfo;
   
   groupId = "IDAdminGroup@ldap";
   bisIdentity = ESS_TRUE;
   sts = EssGetGroupInfoEx(hCtx, groupId, bisIdentity, &groupInfo);
   printf("EssGetGroupInfoEx sts: %ld\n", sts);
   if(!sts && groupInfo)
   {
      DisplayGroupsInfoEx(*groupInfo);
   }
   
   return (sts);
}

      

関連トピック

  • EssListGroupsInfoEx