5 — Entegrity API Extensions


[Previous] [Next] [Contents] [Index]


This chapter provides reference information on the following Entegrity OSF DCE version 1.2.2 API:

5.1 sec_login_set_default_context()

Purpose

Sets session-wide credentials for a login context.

Definition

#include <dce/sec_login.h>

boolean32 sec_login_set_default_context (
	     sec_login_handle_t     		login_context, 
	     error_status_t         		*status 
)

Input Parameters

login_context — An opaque handle to login context data.

Output Parameters

status — A pointer to the completion status.

Description

Sets the credentials as the default credentials for this Windows login session. This is equivalent to how dce_login.exe or the integrated login sets session-wide credentials. This is useful when developing a login program or application that has to set session-wide credentials.

This context must have been previously validated.

Use care when using this routine. Applications setting session-wide credentials can impact other running applications.

If this function fails it returns false. For more specific error information refer to the contents of the status parameter.

Related Functions

sec_login_setup_win32_context()

5.2 sec_login_setup_win32_context()

Purpose

Sets session-wide credentials within a network provider or GINA DLL.

Definition

#include <dce/sec_login.h>

boolean32 sec_login_setup_win32_context (
     	sec_login_handle_t		     login_context,
     	idl_char				               *username,
     	error_status_t         		*status
)

Input Parameters

login_context — An opaque handle to login context data.

username — Character string containing the WIN32 username of the user. If the user is a member of a Windows domain this must be in the format domain\\username.

Output Parameters

status — A pointer to the completion status.

Description

Sets the credentials as the default credentials for the login session being established. This routine must be used by network providers or GINA implementations.

This routine should not be used by a traditional DCE login program. This routine will properly set up the credentials pointer in the Windows registry so that the security runtime can access the credentials.

If this function fails it returns false. For more specific error information refer to the contents of the status parameter.

Related Functions

sec_login_set_default_context()

5.3 sec_login_set_thread_context()

Purpose

Makes the specified login context the per-thread login context for the calling thread.

Definition

#include <dce/sec_login.h>

void __stdcall sec_login_set_thread_context (

    sec_login_handle_t      login_context,
    unsigned32              flags,
    error_status_t          *st
)

Input Parameters

login_context — An opaque handle to login context data.

flags — Flags for this call. Defined flags currently include:

(1) sec_login_thread_purgeonexit — When the thread exits, the login context is released.

Output Parameters

st — A pointer to the completion status.

Description

PC-DCE enhances standard DCE to allow default login contexts on a per-thread basis. Your application calls sec_login_set_thread_context() to set up the per-thread context. To break the association between a thread and a login context you call sec_login_unset_thread_context().

If this function fails it returns false. For more specific error information refer to the contents of the status parameter.

For a discussion of per-thread login contexts, refer to Section 4.16 on page 28.

Related Functions

sec_login_unset_thread_context()
sec_login_get_default_context()

5.4 sec_login_unset_thread_context()

Purpose

Unsets the current per-thread login context.

Definition

#include <dce/sec_login.h>

void __stdcall sec_login_set_thread_context ()

Description

PC-DCE enhances standard DCE to allow default login contexts on a per-thread basis. Your application calls sec_login_set_thread_context() to set up the per-thread context. To break the association between a thread and a login context you call sec_login_unset_thread_context(). This call removes the per-thread context information and releases a reference to the current thread login context. This has no effect on externally-visible credentials.

If this function fails it returns false.

For a more detailed discussion of per-thread login contexts, refer to Section 4.16 on page 28.

Related Functions

sec_login_set_thread_context()
sec_login_get_default_context()

5.5 sec_login_get_default_context()

Purpose

Gets the default login context. This function allows the caller to specify whether to get the per-thread or per-process login context.

Definition

#include <dce/sec_login.h>

void __stdcall sec_login_get_default_context (
     unsigned32             type,
     sec_login_handle_t     *login_context,
     error_status_t         *st
)

Input Parameters

type — Identifies the type of login context to get. Defined types currently include:

(0) sec_login_default_context_proc — Gets the per-process login context.

(1) sec_login_default_context_thr — Gets the per-thread login context.

Output Parameters

login_context — A pointer to the requested login context data.

status — A pointer to the completion status.

Description

PC-DCE enhances standard DCE to allow default login contexts on a per-thread basis. Your application calls sec_login_set_thread_context() to set up the per-thread context. Once the per-thread context is set up, you can call sec_login_get_default_context() to obtain either the process login context or thread login context.

You can also use sec_login get_current_context(), which is modified from standard DCE to get the thread login context (if available). Otherwise get the process-wide login context.

If this function fails it returns false. For more specific error information refer to the status parameter.

For a discussion of per-thread login contexts, refer to Section 4.16 on page 28.

Related Functions

sec_login_set_thread_context()
sec_login_unset_thread_context()


[Previous] [Next] [Contents] [Index]


To make comments or ask for help, contact support@entegrity.com.

Copyright © 1997-2003 Entegrity Solutions Corporation & its subsidiaries