PreviousNext

sec_rgy_pgo_add(3sec)

Adds a PGO item to the registry database

Synopsis

#include <dce/pgo.h>

void sec_rgy_pgo_add(

sec_rgy_handle_t context,
sec_rgy_domain_t
name_domain,
sec_rgy_name_t
name,
sec_rgy_pgo_item_t *
pgo_item,
error_status_t *
status);

Parameters

Input

context
An opaque handle bound to a registry server. Use sec_rgy_site_open( ) to acquire a bound handle.

name_domain
This variable identifies the type of the principal, group, or organization (PGO) item identified by the given name. The valid values are as follows:

sec_rgy_domain_person
The name identifies a principal.

sec_rgy_domain_group
The name identifies a group.

sec_rgy_domain_org
The name identifies an organization.

name
A pointer to a sec_rgy_name_t character string containing the name of the new PGO item.

pgo_item
A pointer to a sec_rgy_pgo_item_t structure containing the data for the new PGO item. The data in this structure includes the PGO item's name, UUID, UNIX number (if any), and administrative data, such as whether the item may have (or belong to) a concurrent group set.

Output

status
A pointer to the completion status. On successful completion, the routine returns error_status_ok. Otherwise, it returns an error.

Description
The sec_rgy_pgo_add( ) routine adds a PGO item to the registry database.

The PGO data consists of the following:

· The universal unique identifier (UUID) of the PGO item. Specify NULL to have the registry server create a new UUID for an item.

· The UNIX number for the PGO item. Since the registry uses embedded UNIX IDs (where a subset of the UUID bits represent the UNIX ID), the specified ID must match the UUID, if both are specified.

· The quota for subaccounts allowed for this item entry.

· The full name of the PGO item.

· Flags (in the sec_rgy_pgo_flags_t format) indicating whether

- A principal item is an alias.

- The PGO item can be deleted from the registry.

- A principal item can have a concurrent group set.

- A group item can appear in a concurrent group set.

Permissions Required
The sec_rgy_pgo_add( ) routine requires the i (insert) permission on the parent directory in which the PGO item is to be created.

Notes
An account can be added to the registry database only when all its constituent PGO items are already in the database, and the appropriate membership relationships between them are established. For example, to establish an account with principal name tom, group name writers, and organization name hp, all three names must exist as independent PGO items in the database. Furthermore, tom must be a member of writers, which must be a member of hp. (See sec_rgy_acct_add( ) to add an account to the registry.)

Files

/usr/include/dce/pgo.idl
The idl file from which dce/pgo.h was derived.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

sec_rgy_not_authorized
The client program is not authorized to add the specified PGO item.

sec_rgy_object_exists
A PGO item already exists with the name given in name.

sec_rgy_server_unavailable
The DCE Registry Server is unavailable.

error_status_ok
The call was successful.

Related Information
Functions:

sec_intro(3sec)

sec_rgy_pgo_delete(3sec)

sec_rgy_pgo_rename(3sec)

sec_rgy_pgo_replace(3sec)

sec_rgy_acct_add(3sec)