setsecorder Subroutine

Purpose

Sets the order of domains for certain security databases.

Library

Standard C Library (libc.a)

Syntax

int setsecorder (name, value)
    char *name;
    char *value;

Description

The setsecorder subroutine sets the value of the domain order to the value parameter for the name database. The new domain order overrides the setting from any previous setsecorder call, and the setting specified in the /etc/sncontrol.conf file. A null value pointer or a null value resets the setting made by a previous setsecorder call, forcing the concerned library subroutines to follow the value defined in /etc/sncontrol.conf file.

Parameters

Item Description
name Specifies the database name whose domain order is to be set. Valid values and the affected library subroutines are as follows:
authorizations
The getauthattr, getauthattrs, putauthattr, and putauthattrs subroutines.
roles
The getroleattr, getroleattrs, putroleattr, and putroleattrs subroutines.
privcmds
The getcmdattr, getcmdattrs, putcmdattr, and putcmdattrs subroutines.
privdevs
The getdevattr, getdevattrs, putdevattr, and putdevatttrs subroutines.
privfiles
The gettrviattr, gettrviattrs, putdevattr, and putdevattrs subroutines.
value Specifies a comma-separated list of modules. The following values are valid:
files
Specifies the local module.
LDAP
Specifies the LDAP module. The system must be configured as an LDAP client to use this setting.

Return Values

Item Description
0 The domain order has been set successfully.
-1 The domain order cannot be set. The errno variable is set to indicate the failure.

Error Codes

The setsecorder subroutine fails if one of the following codes is true.

Item Description
EINVAL The name parameter refers to an unsupported database.
EINVAL The value parameter contains module names that do not refer to a valid stanza in the /usr/lib/security/methods.cfg file or one of the predefined values.
ENOMEM Unable to allocate memory.