• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LW_IS_NULL_OR_EMPTY_STR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LW_IS_NULL_OR_EMPTY_STR函数的典型用法代码示例。如果您正苦于以下问题:C++ LW_IS_NULL_OR_EMPTY_STR函数的具体用法?C++ LW_IS_NULL_OR_EMPTY_STR怎么用?C++ LW_IS_NULL_OR_EMPTY_STR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LW_IS_NULL_OR_EMPTY_STR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: LsaNssComputeUserStringLength

DWORD
LsaNssComputeUserStringLength(
    PLSA_USER_INFO_0 pUserInfo
    )
{
    DWORD dwLength = 0;

    if (!LW_IS_NULL_OR_EMPTY_STR(pUserInfo->pszName)) {
       dwLength += strlen(pUserInfo->pszName) + 1;
    }

    if (!LW_IS_NULL_OR_EMPTY_STR(pUserInfo->pszPasswd)) {
       dwLength += strlen(pUserInfo->pszPasswd) + 1;
    }

    if (!LW_IS_NULL_OR_EMPTY_STR(pUserInfo->pszShell)) {
       dwLength += strlen(pUserInfo->pszShell) + 1;
    }

    if (!LW_IS_NULL_OR_EMPTY_STR(pUserInfo->pszGecos)) {
       dwLength += strlen(pUserInfo->pszGecos) + 1;
    }

    if (!LW_IS_NULL_OR_EMPTY_STR(pUserInfo->pszHomedir)) {
       dwLength += strlen(pUserInfo->pszHomedir) + 1;
    }

    return dwLength;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:29,代码来源:nss-user.c


示例2: SamrSrvConfigGetHomedirTemplate

DWORD
SamrSrvConfigGetHomedirTemplate(
    PSTR *ppszHomedirTemplate
    )
{
    DWORD dwError = 0;
    BOOL bLocked = 0;
    PSTR pszHomedirTemplate = NULL;

    GLOBAL_DATA_LOCK(bLocked);

    if (LW_IS_NULL_OR_EMPTY_STR(gSamrSrvConfig.pszHomedirTemplate)) {
        goto cleanup;
    }

    dwError = LwAllocateString(gSamrSrvConfig.pszHomedirTemplate,
                                &pszHomedirTemplate);
    BAIL_ON_LSA_ERROR(dwError);

    *ppszHomedirTemplate = pszHomedirTemplate;

cleanup:
    GLOBAL_DATA_UNLOCK(bLocked);
    return dwError;

error:
    goto cleanup;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:28,代码来源:samr_cfg.c


示例3: SamrSrvConfigGetDefaultLoginShell

DWORD
SamrSrvConfigGetDefaultLoginShell(
    PSTR *ppszDefaultLoginShell
    )
{
    DWORD dwError = 0;
    BOOL bLocked = 0;
    PSTR pszDefaultLoginShell = NULL;

    GLOBAL_DATA_LOCK(bLocked);

    if (LW_IS_NULL_OR_EMPTY_STR(gSamrSrvConfig.pszDefaultLoginShell)) {
        goto cleanup;
    }

    dwError = LwAllocateString(gSamrSrvConfig.pszDefaultLoginShell,
                               &pszDefaultLoginShell);
    BAIL_ON_LSA_ERROR(dwError);

    *ppszDefaultLoginShell = pszDefaultLoginShell;

cleanup:
    GLOBAL_DATA_UNLOCK(bLocked);
    return dwError;

error:
    goto cleanup;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:28,代码来源:samr_cfg.c


示例4: PrintUserInfo_2

VOID
PrintUserInfo_2(
    PLSA_USER_INFO_2 pUserInfo,
    BOOLEAN bCheckUserInList,
    BOOLEAN bAllowedLogon
    )
{
    fprintf(stdout, "User info (Level-2):\n");
    fprintf(stdout, "====================\n");
    fprintf(stdout, "Name:                         %s\n", LW_PRINTF_STRING(pUserInfo->pszName));
    fprintf(stdout, "UPN:                          %s\n", LW_PRINTF_STRING(pUserInfo->pszUPN));
    fprintf(stdout, "Generated UPN:                %s\n", LW_PRINTF_YES_NO(pUserInfo->bIsGeneratedUPN));
    fprintf(stdout, "DN:                           %s\n",
            LW_IS_NULL_OR_EMPTY_STR(pUserInfo->pszDN) ? "<null>" : pUserInfo->pszDN);
    fprintf(stdout, "Uid:                          %u\n", (unsigned int)pUserInfo->uid);
    fprintf(stdout, "Gid:                          %u\n", (unsigned int)pUserInfo->gid);
    fprintf(stdout, "Gecos:                        %s\n", LW_PRINTF_STRING(pUserInfo->pszGecos));
    fprintf(stdout, "Shell:                        %s\n", LW_PRINTF_STRING(pUserInfo->pszShell));
    fprintf(stdout, "Home dir:                     %s\n", LW_PRINTF_STRING(pUserInfo->pszHomedir));
    fprintf(stdout, "LMHash length:                %u\n", pUserInfo->dwLMHashLen);
    fprintf(stdout, "NTHash length:                %u\n", pUserInfo->dwNTHashLen);
    fprintf(stdout, "Local User:                   %s\n", LW_PRINTF_YES_NO(pUserInfo->bIsLocalUser));
    fprintf(stdout, "Account disabled (or locked): %s\n", LW_PRINTF_TRUE_FALSE(pUserInfo->bAccountDisabled));
    fprintf(stdout, "Account Expired:              %s\n", LW_PRINTF_TRUE_FALSE(pUserInfo->bAccountExpired));
    fprintf(stdout, "Password never expires:       %s\n", LW_PRINTF_TRUE_FALSE(pUserInfo->bPasswordNeverExpires));
    fprintf(stdout, "Password Expired:             %s\n", LW_PRINTF_TRUE_FALSE(pUserInfo->bPasswordExpired));
    fprintf(stdout, "Prompt for password change:   %s\n", LW_PRINTF_YES_NO(pUserInfo->bPromptPasswordChange));
    fprintf(stdout, "User can change password:     %s\n", LW_PRINTF_YES_NO(pUserInfo->bUserCanChangePassword));
    fprintf(stdout, "Days till password expires:   %u\n", pUserInfo->dwDaysToPasswordExpiry);
    if (bCheckUserInList)
    {
        fprintf(stdout, "Logon restriction:            %s\n", LW_PRINTF_YES_NO(bAllowedLogon));
    }
    fprintf(stdout, "\n");
}
开发者ID:borland667,项目名称:pbis,代码行数:35,代码来源:enum_users_main.c


示例5: UpLocalCfgNameValuePair

DWORD
UpLocalCfgNameValuePair(
    PCSTR    pszName,
    PCSTR    pszValue,
    PVOID    pData,
    PBOOLEAN pbContinue
    )
{
    DWORD dwError = 0;
    DWORD iHandler = 0;
    DWORD nHandlers = sizeof(gLocalCfgHandlers)/sizeof(gLocalCfgHandlers[0]);

    if (!LW_IS_NULL_OR_EMPTY_STR(pszName))
    {
        for (; iHandler < nHandlers; iHandler++)
        {
            if (!strcasecmp(gLocalCfgHandlers[iHandler].pszId, pszName))
            {
                gLocalCfgHandlers[iHandler].pfnHandler(
                                                (PLOCAL_CONFIG)pData,
                                                pszName,
                                                pszValue);
                break;
            }
        }
    }

    *pbContinue = TRUE;

    return dwError;
}
开发者ID:twistround,项目名称:pbis,代码行数:31,代码来源:lsass_provider_local.c


示例6: LsaAdBatchMarshalUserInfoFixShell

static
DWORD
LsaAdBatchMarshalUserInfoFixShell(
    IN PLSA_AD_PROVIDER_STATE pState,
    IN OUT PSTR* ppszShell
    )
{
    DWORD dwError = 0;
    PSTR pszShell = *ppszShell;

    if (LW_IS_NULL_OR_EMPTY_STR(pszShell))
    {
        dwError = AD_GetUnprovisionedModeShell(
                      pState,
                      &pszShell);
        BAIL_ON_LSA_ERROR(dwError);
        BAIL_ON_INVALID_STRING(pszShell);
    }

cleanup:
    *ppszShell = pszShell;
    return dwError;

error:
    goto cleanup;
}
开发者ID:borland667,项目名称:pbis,代码行数:26,代码来源:batch_marshal.c


示例7: LocalCfgSetSkeletonDirs

static
DWORD
LocalCfgSetSkeletonDirs(
    PLOCAL_CONFIG pConfig,
    PCSTR          pszName,
    PCSTR          pszValue
    )
{
    DWORD dwError = 0;
    PSTR  pszSkelDirs = NULL;

    if (!LW_IS_NULL_OR_EMPTY_STR(pszValue))
    {
        dwError = LwAllocateString(
                      pszValue,
                      &pszSkelDirs);
        BAIL_ON_UP_ERROR(dwError);
    }

    LW_SAFE_FREE_STRING(pConfig->pszSkelDirs);

    pConfig->pszSkelDirs = pszSkelDirs;

cleanup:

    return dwError;

error:

    LW_SAFE_FREE_STRING(pszSkelDirs);

    goto cleanup;
}
开发者ID:twistround,项目名称:pbis,代码行数:33,代码来源:lsass_provider_local.c


示例8: LsaSrvIsPrivilegeNameValid

BOOLEAN
LsaSrvIsPrivilegeNameValid(
    PCSTR pszPrivilegeName
    )
{
    BOOLEAN Valid = FALSE;
    PSTR ppszPrefixes[] = LSA_PRIVILEGE_VALID_PREFIXES;
    DWORD i = 0;
    PSTR pszPref = NULL;

    if (!LW_IS_NULL_OR_EMPTY_STR(pszPrivilegeName))
    {
        for (i = 0;
             !Valid && i < sizeof(ppszPrefixes)/sizeof(ppszPrefixes[0]);
             i++)
        {
            LwStrStr(pszPrivilegeName,
                     ppszPrefixes[i],
                     &pszPref);
            if (pszPrivilegeName == pszPref)
            {
                Valid = TRUE;
            }
        }
    }

    return Valid;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:28,代码来源:privilege.c


示例9: WkssSrvConfigGetLsaLpcSocketPath

DWORD
WkssSrvConfigGetLsaLpcSocketPath(
    PSTR *ppszLsaLpcSocketPath
    )
{
    DWORD dwError = 0;
    BOOL bLocked = 0;
    PSTR pszLpcSocketPath = NULL;

    GLOBAL_DATA_LOCK(bLocked);

    if (LW_IS_NULL_OR_EMPTY_STR(gWkssSrvConfig.pszLsaLpcSocketPath)) {
        goto cleanup;
    }

    dwError = LwAllocateString(gWkssSrvConfig.pszLsaLpcSocketPath,
                               &pszLpcSocketPath);
    BAIL_ON_LSA_ERROR(dwError);

    *ppszLsaLpcSocketPath = pszLpcSocketPath;

cleanup:
    GLOBAL_DATA_UNLOCK(bLocked);
    return dwError;

error:
    goto cleanup;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:28,代码来源:wkss_cfg.c


示例10: LsaPamConfigNameValuePair

DWORD
LsaPamConfigNameValuePair(
    PCSTR    pszName,
    PCSTR    pszValue,
    PVOID    pData,
    PBOOLEAN pbContinue
)
{
    DWORD dwError = 0;

    if (!LW_IS_NULL_OR_EMPTY_STR(pszName))
    {
        DWORD iHandler = 0;
        DWORD nHandlers = sizeof(gConfigHandlers)/sizeof(gConfigHandlers[0]);

        for (; iHandler < nHandlers; iHandler++)
        {
            if (!strcasecmp(gConfigHandlers[iHandler].pszId, pszName))
            {
                PLSA_PAM_CONFIG pConfig = (PLSA_PAM_CONFIG)pData;

                gConfigHandlers[iHandler].pfnHandler(
                    pConfig,
                    pszName,
                    pszValue);
                break;
            }
        }
    }

    *pbContinue = TRUE;

    return dwError;
}
开发者ID:numberer6,项目名称:likewise-open-1,代码行数:34,代码来源:pam-config.c


示例11: PrintGroupInfo_1

static
VOID
PrintGroupInfo_1(
    PLSA_GROUP_INFO_1 pGroupInfo
    )
{
    PSTR* ppszMembers = NULL;

    fprintf(stdout, "Group info (Level-1):\n");
    fprintf(stdout, "====================\n");
    fprintf(stdout, "Name: %s\n", LW_PRINTF_STRING(pGroupInfo->pszName));
    fprintf(stdout, "Gid:  %u\n", (unsigned int)pGroupInfo->gid);
    fprintf(stdout, "SID:  %s\n", LW_PRINTF_STRING(pGroupInfo->pszSid));
    fprintf(stdout, "Members:\n");

    ppszMembers = pGroupInfo->ppszMembers;
    if (ppszMembers)
    {
        while (!LW_IS_NULL_OR_EMPTY_STR(*ppszMembers))
        {
            fprintf(stdout, "  %s\n", *ppszMembers);
            ppszMembers++;
        }
    }
    fprintf(stdout, "\n");
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:26,代码来源:enum_groups_main.c


示例12: LsaPam_SetConfig_UserNotAllowedError

static
DWORD
LsaPam_SetConfig_UserNotAllowedError(
    PLSA_PAM_CONFIG pConfig,
    PCSTR           pszName,
    PCSTR           pszValue
)
{
    DWORD dwError = 0;
    PSTR  pszMessage = NULL;

    if (!LW_IS_NULL_OR_EMPTY_STR(pszValue))
    {
        dwError = LwAllocateString(
                      pszValue,
                      &pszMessage);
        BAIL_ON_UP_ERROR(dwError);

        LW_SAFE_FREE_STRING(pConfig->pszAccessDeniedMessage);
        pConfig->pszAccessDeniedMessage = pszMessage;
    }

cleanup:

    return dwError;

error:

    LW_SAFE_FREE_STRING(pszMessage);

    goto cleanup;
}
开发者ID:numberer6,项目名称:likewise-open-1,代码行数:32,代码来源:pam-config.c


示例13: LsaSrvGetPrefixPath

DWORD
LsaSrvGetPrefixPath(
    PSTR* ppszPath
    )
{
    DWORD dwError = 0;
    PSTR pszPath = NULL;
    BOOLEAN bInLock = FALSE;

    LSA_LOCK_SERVERINFO(bInLock);

    if (LW_IS_NULL_OR_EMPTY_STR(gpServerInfo->szPrefixPath)) {
      dwError = LW_ERROR_INVALID_PREFIX_PATH;
      BAIL_ON_LSA_ERROR(dwError);
    }

    dwError = LwAllocateString(gpServerInfo->szPrefixPath, &pszPath);
    BAIL_ON_LSA_ERROR(dwError);

    *ppszPath = pszPath;

 cleanup:

    LSA_UNLOCK_SERVERINFO(bInLock);

    return dwError;

 error:

    LW_SAFE_FREE_STRING(pszPath);

    *ppszPath = NULL;

    goto cleanup;
}
开发者ID:virtual-void,项目名称:pbis,代码行数:35,代码来源:main-svcm.c


示例14: LsaCheckInvalidRpcServer

DWORD
LsaCheckInvalidRpcServer(
    PVOID pSymbol,
    PCSTR pszLibPath
    )
{
    DWORD dwError = 0;
    PCSTR pszError = NULL;

    if (pSymbol == NULL) {
        LSA_LOG_ERROR("Ignoring invalid rpc server at path [%s]",
                      (pszLibPath ? pszLibPath : "(unknown)"));

        pszError = dlerror();
        if (!LW_IS_NULL_OR_EMPTY_STR(pszError)) {
            LSA_LOG_ERROR("%s", pszError);
        }

        dwError = LW_ERROR_INVALID_RPC_SERVER;
        BAIL_ON_LSA_ERROR(dwError);
    }

    
cleanup:
    return dwError;

error:
    goto cleanup;
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:29,代码来源:rpc_server.c


示例15: LocalCfgSetHomedirPrefix

static
DWORD
LocalCfgSetHomedirPrefix(
    PLOCAL_CONFIG   pConfig,
    PCSTR           pszName,
    PCSTR           pszValue
    )
{
    DWORD dwError = 0;
    PSTR pszHomedirPrefix = NULL;

    if (LW_IS_NULL_OR_EMPTY_STR(pszValue))
    {
        goto error;
    }

    dwError = LwAllocateString(pszValue, &pszHomedirPrefix);
    BAIL_ON_LSA_ERROR(dwError);

    LwStripWhitespace(pszHomedirPrefix, TRUE, TRUE);

    if (LW_IS_NULL_OR_EMPTY_STR(pszHomedirPrefix))
    {
        goto error;
    }

    if (*pszHomedirPrefix != '/')
    {
        LSA_LOG_ERROR("Invalid home directory prefix [%s]", pszHomedirPrefix);
        goto error;
    }

    LW_SAFE_FREE_STRING(pConfig->pszHomedirPrefix);

    pConfig->pszHomedirPrefix = pszHomedirPrefix;
    pszHomedirPrefix = NULL;

cleanup:

    return dwError;

error:
    LW_SAFE_FREE_STRING(pszHomedirPrefix);

    goto cleanup;
}
开发者ID:bhanug,项目名称:likewise-open,代码行数:46,代码来源:lpcfg.c


示例16: LsaAdBatchMarshalUserInfoFixLocalWindowsHomeFolder

static
DWORD
LsaAdBatchMarshalUserInfoFixLocalWindowsHomeFolder(
    IN PLSA_AD_PROVIDER_STATE pState,
    IN OUT PSTR* ppszLocalWindowsHomeFolder,
    IN PCSTR pszNetbiosDomainName,
    IN PCSTR pszSamAccountName
    )
{
    DWORD dwError = 0;
    PSTR pszLocalWindowsHomeFolder = *ppszLocalWindowsHomeFolder;
    PSTR pszNewLocalWindowsHomeFolder = NULL;

    if (LW_IS_NULL_OR_EMPTY_STR(pszLocalWindowsHomeFolder))
    {
        dwError = AD_GetUnprovisionedModeRemoteHomeDirTemplate(
                      pState,
                      &pszLocalWindowsHomeFolder);
        BAIL_ON_LSA_ERROR(dwError);
    }

    if (pszLocalWindowsHomeFolder == NULL)
    {
        dwError = LwAllocateString("", &pszLocalWindowsHomeFolder);
        BAIL_ON_LSA_ERROR(dwError);
    }
    else if (strstr(pszLocalWindowsHomeFolder, "%"))
    {
        dwError = AD_BuildHomeDirFromTemplate(
                      pState,
                      pszLocalWindowsHomeFolder,
                      pszNetbiosDomainName,
                      pszSamAccountName,
                      &pszNewLocalWindowsHomeFolder);
        if (dwError)
        {
            // If we encounter a problem with fixing up the shell, leave the user object with the actual
            // value stored in AD and log the problem.
            LSA_LOG_INFO("While processing information for user (%s), an invalid remote homedir value was detected (homedir: '%s')",
                         LSA_SAFE_LOG_STRING(pszSamAccountName),
                         LSA_SAFE_LOG_STRING(pszLocalWindowsHomeFolder));
            dwError = 0;
            goto cleanup;
        }

        LW_SAFE_FREE_STRING(pszLocalWindowsHomeFolder);
        LSA_XFER_STRING(pszNewLocalWindowsHomeFolder, pszLocalWindowsHomeFolder);
    }

    LwStrCharReplace(pszLocalWindowsHomeFolder, ' ', '_');

cleanup:
    *ppszLocalWindowsHomeFolder = pszLocalWindowsHomeFolder;
    return dwError;

error:
    goto cleanup;
}
开发者ID:borland667,项目名称:pbis,代码行数:58,代码来源:batch_marshal.c


示例17: RegPrintError

VOID
RegPrintError(
    IN OPTIONAL PCSTR pszErrorPrefix,
    IN DWORD dwError
    )
{
    PCSTR pszUseErrorPrefix = NULL;
    size_t size = 0;
    PSTR pszErrorString = NULL;
    PCSTR pszWinError = NULL;

    if (dwError)
    {
        pszUseErrorPrefix = pszErrorPrefix;
        if (!pszUseErrorPrefix)
        {
            pszUseErrorPrefix = "LWREG ERROR: ";
        }

        size = LwRegGetErrorString(dwError, NULL, 0);
        if (size)
        {
            pszErrorString = malloc(size);
            if (pszErrorString)
            {
            	LwRegGetErrorString(dwError, pszErrorString, size);
            }
        }

        pszWinError = LW_PRINTF_STRING(RegWin32ExtErrorToName(dwError));

        if (!pszWinError)
        {
            pszWinError = "";
        }

        if (LW_IS_NULL_OR_EMPTY_STR(pszErrorString))
        {
            fprintf(stderr,
                    "%s (error = %u%s%s)\n",
                     pszUseErrorPrefix,
                     dwError,
                     *pszWinError ? " - " : "",
                     pszWinError);
        }
        else
        {
            fprintf(stderr,
                    "%s (error = %u%s%s)\n%s\n",
                    pszUseErrorPrefix,
                    dwError,
                    *pszWinError ? " - " : "",
                    pszWinError,
                    pszErrorString);
        }
    }
    LWREG_SAFE_FREE_STRING(pszErrorString);
}
开发者ID:twistround,项目名称:pbis,代码行数:58,代码来源:regerror.c


示例18: LsaSELinuxManageHomeDir

DWORD
LsaSELinuxManageHomeDir(
    PCSTR pszHomeDir
    )
{
    DWORD dwError = 0;
    PCSTR pszSemanageFormat = "semanage fcontext -a -e /home %s";
    PSTR pszRootHomeDir = NULL;
    PSTR pszSemanageExecute = NULL;
    int systemresult = 0;

    dwError = LsaGetDirectoryFromPath(pszHomeDir, &pszRootHomeDir);
    BAIL_ON_LSA_ERROR(dwError);

    if (LW_IS_NULL_OR_EMPTY_STR(pszRootHomeDir))
    {
        dwError = LW_ERROR_INVALID_PREFIX_PATH;
        BAIL_ON_LSA_ERROR(dwError);
    }

    if (pszRootHomeDir[0] != '/')
    {
        dwError = LW_ERROR_INVALID_PREFIX_PATH;
        BAIL_ON_LSA_ERROR(dwError);
    }

    if (pszRootHomeDir[1] == '\0')
    {
        dwError = LW_ERROR_INVALID_PREFIX_PATH;
        BAIL_ON_LSA_ERROR(dwError);
    }

    dwError = LwAllocateStringPrintf(
                    &pszSemanageExecute,
                    pszSemanageFormat,
                    pszRootHomeDir);
    BAIL_ON_LSA_ERROR(dwError);

    systemresult = system(pszSemanageExecute);
    if (systemresult < 0)
    {
        dwError = LwMapErrnoToLwError(errno);
        BAIL_ON_LSA_ERROR(dwError);
    }

cleanup:
    LW_SAFE_FREE_STRING(pszRootHomeDir);
    LW_SAFE_FREE_STRING(pszSemanageExecute);

    return dwError;

error:
    goto cleanup;
}
开发者ID:virtual-void,项目名称:pbis,代码行数:54,代码来源:selinux.c


示例19: LsaAdBatchGatherPseudoObjectDefaultSchema

DWORD
LsaAdBatchGatherPseudoObjectDefaultSchema(
    IN OUT PLSA_AD_BATCH_ITEM pItem,
    IN LSA_AD_BATCH_OBJECT_TYPE ObjectType,
    IN OUT OPTIONAL PSTR* ppszSid,
    IN HANDLE hDirectory,
    IN LDAPMessage* pMessage
    )
{
    DWORD dwError = 0;

    dwError = LsaAdBatchGatherObjectType(pItem, ObjectType);
    BAIL_ON_LSA_ERROR(dwError);

    if (!pItem->pszSid)
    {
        if (ppszSid)
        {
            LSA_XFER_STRING(*ppszSid, pItem->pszSid);
        }
        else
        {
            dwError = ADLdap_GetObjectSid(hDirectory, pMessage, &pItem->pszSid);
            BAIL_ON_LSA_ERROR(dwError);
        }
    }

    if (LW_IS_NULL_OR_EMPTY_STR(pItem->pszSid))
    {
        dwError = LW_ERROR_DATA_ERROR;
        BAIL_ON_LSA_ERROR(dwError);
    }

    if (!IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_PSEUDO))
    {
        SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_PSEUDO);
        dwError = LsaAdBatchGatherSchemaMode(
                        pItem,
                        hDirectory,
                        pMessage);
        BAIL_ON_LSA_ERROR(dwError);
    }

cleanup:
    return dwError;

error:
    SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_ERROR);
    goto cleanup;
}
开发者ID:borland667,项目名称:pbis,代码行数:50,代码来源:batch_gather.c


示例20: PrintGroupInfo_1

static
VOID
PrintGroupInfo_1(
    PLSA_GROUP_INFO_1 pGroupInfo,
    BOOLEAN bPrintKeys,
    BOOLEAN bIndexById
    )
{
    PSTR* ppszMembers = NULL;

    if (bPrintKeys)
    {
        if (bIndexById)
        {
            printf("%u ", (unsigned int)pGroupInfo->gid);
        }
        else
        {
            printf("%s ", pGroupInfo->pszName);
        }
    }

    printf("%s:%s:%u:",
           YPCAT_SAFE_LOG_STRING(pGroupInfo->pszName),
           YPCAT_SAFE_LOG_STRING(pGroupInfo->pszPasswd),
           (unsigned int)pGroupInfo->gid);

    ppszMembers = pGroupInfo->ppszMembers;

    if (ppszMembers)
    {
        DWORD iMember = 0;

        while (!LW_IS_NULL_OR_EMPTY_STR(*ppszMembers))
        {
          if (iMember)
          {
             printf(",%s", *ppszMembers);
          }
          else
          {
             printf("%s", *ppszMembers);
          }
          iMember++;
          ppszMembers++;
       }
    }

    printf("\n");
}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:50,代码来源:lw_ypcat_main.c



注:本文中的LW_IS_NULL_OR_EMPTY_STR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LW_SAFE_FREE_MEMORY函数代码示例发布时间:2022-05-30
下一篇:
C++ LWM2M_URI_IS_SET_RESOURCE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap