[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

MatchAllAuths, , MatchAnyAuths, or MatchAnyAuthsList Subroutine

Purpose

Compare authorizations.

Library

Security Library (libc.a)

Syntax

#include <usersec.h>
int MatchAllAuths(CommaListOfAuths)
char *CommaListOfAuths;
int MatchAllAuthsList(CommaListOfAuths, NSListOfAuths)
char *CommaListOfAuths;
char *NSListOfAuths;
int MatchAnyAuths(CommaListOfAuths)
char *CommaListOfAuths;
int MatchAnyAuthsList(CommaListOfAuths, NSListOfAuths)
char *CommaListOfAuths;
char *NSListOfAuths;

Description

The MatchAllAuthsList subroutine compares the CommaListOfAuths against the NSListOfAuths. It returns a non-zero value if all the authorizations in CommaListOfAuths are contained in NSListOfAuths. The MatchAllAuths subroutine calls the MatchAllAuthsList subroutine passing in the results of the GetUserAuths subroutine in place of NSListOfAuths. If NSListOfAuths contains the OFF keyword, MatchAllAuthsList will return a zero value. If NSListOfAuths contains the ALL keyword and not the OFF keyword, MatchAllAuthsList will return a non-zero value.

The MatchAnyAuthsList subroutine compares the CommaListOfAuths against the NSListOfAuths. It returns a non-zero value if one or more of the authorizations in CommaListOfAuths are contained in NSListOfAuths. The MatchAnyAuths subroutine calls the MatchAnyAuthsList subroutine passing in the results of the GetUserAuths subroutine in place of NSListOfAuths. If NSListOfAuths contains the OFF keyword, MatchAnyAuthsList will return a zero value. If NSListOfAuths contains the ALL keyword and not the OFF keyword, MatchAnyAuthsList will return a non-zero value.

Parameters

CommaListOfAuths Specifies one or more authorizations, each separated by a comma.
NSListOfAuths Specifies zero or more authorizations. Each authorization is null terminated. The last entry in the list must be a null string.

Return Values

The subroutines return a non-zero value if a proper match was found. Otherwise, they will return zero. If an error occurs, the subroutines will return zero and set errno to indicate the error. If the subroutine returns zero and no error occurred, errno is set to zero.


[ Previous | Next | Contents | Glossary | Home | Search ]