getsecorder Subroutine

Purpose

Retrieves the ordering of domains for certain security databases.

Library

Standard C Library (libc.a)

Syntax

char * getsecorder (name)
       char *name;

Description

The getsecorder subroutine returns the value of the domain order for the database specified by the name parameter. When a previous call to the setsecorder subroutine with a valid value is successful, the getsecorder subroutine returns that value. Otherwise, the value of the secorder attribute of the name database in the /etc/nscontrol.conf file is returned. The returned value is a comma separated list of module names. The caller must free it after use. This subroutine is thread safe.

Parameters

Item Description
name Specifies the database name. The parameter can have one of the following valid values:
  • authorizations
  • roles
  • privcmds
  • privdevs
  • privfiles

Security

Files Accessed:
File Mode
/etc/nscontrol.conf r

Return Values

On successful completion, a comma-separated list of module names is returned. If the subroutine fails, it returns a value of NULL and sets the errno value to indicate the error.

Error Codes

Item Description
EINVAL The database name is not valid.
ENOMEM Unable to allocate memory.