Ingres CL PE

From Ingres Community Wiki

Jump to: navigation, search

Ingres Compatability Library
Architecture - Overview - Suggestions - GL: BA - BT - ERGL - handy - HSH - LC - LL - MEGL - MM - MO - MU - PM - SP - TMGL - CL: CI - CK - CM - CP - CS - CSMT - CV - CX - DI - DL - DS - ER - ERold - EX - FP - GC - GV - handy - ID - JF - LG - LK - LO - ME - MH - NM - OL - PC - PE - QU - SA - SI - SR - ST - TC - TE - TH - TM - TR - UT

Contents

Compatibility Library Specification - PE

Abstract

This is the specification of the PE facility provided by the compatibility library.

Revision: 1.1, 14-Nov-1997

Document History

  • Revision 1.1, last modified 11-Nov-1997
    • Converted to HTML.
  • Revision 1.0, last modified 2-Jan-91.

Specification

Introduction

PE provides a way to adjust the permissions on LO/SI files.

Library

CL

Header File <pe.h>

The header file <pe.h> must be included before using any of the functions provided.

Executable Interface

The following functions are provided.

PEumask - set default file creation mode mask

Set file creation mode mask for the current process. The pattern must be exactly six (6) characters long and must be in a specific order. The first three (3) characters define the read (r), write (w), and execute (x) permissions for the owner, in that order. The last three (3) characters are the permissions for the world. Any of the permissions may be given as a '-' meaning that the permission in the corresponding location is not to be set. Group permissions, if they exist, are set the same as world. System permissions, if they exist, are all set on (i.e. s:rwed).

Inputs:

pattern The permissions pattern to use.

Outputs:

None

Returns:

OK if operation succeeded, otherwise system specific error status.
PE_BAD_PATTERN

Definition:

STATUS
PEumask(pattern)
char            *pattern;

PEworld - set world permissions on a location

Set world (access by every body) permissions on location loc to some combination of read (r), write (w), and execute (x), with a pattern such as +w, +r-w, -x-w, etc. The absence of a letter implies that the permission is not affected. A pattern such as -r+r is allowed and means a no-op.

Note: This algorithm allows the user to specify a permission in the pattern as many times as he wants. As long as the pattern obeys the correct syntax.

Note: On UNIX, the group permissions must be set in tandem with the world permissions for things to work properly.

Inputs:

pattern The permissions pattern to use.
loc The location to set permissions on.

Outputs:

None

Returns:

OK if operation succeeded, otherwise system specific error status.
PE_NULL_LOCATION
PE_BAD_PATTERN

Definition:

STATUS
PEworld(pattern,loc)
char            *pattern;
LOCATION        *loc;

PEsave - save current default permissions

Saves the current default permissions for this process. This is a NOOP on systems which do not support the concept of default permissions.

Inputs:

None

Outputs:

None

Returns:

None

Side Effects:

Static variable "prot" is needed for the VMS version of this code.

Definition:

STATIC u_i2     prot = 0;
VOID
PEsave()


PEreset - reset default permissions to those last kept by PEsave

Restores the default permissions saved by PEsave. This is a NOOP on systems which do not support the concept of default permissions.

Inputs:

None

Outputs:

None

Returns:

None

Side Effects:

Static variable "prot" is needed for the VMS version of this code.

Definition:

VOID
PEreset()


Ingres Compatability Library
Architecture - Overview - Suggestions - GL: BA - BT - ERGL - handy - HSH - LC - LL - MEGL - MM - MO - MU - PM - SP - TMGL - CL: CI - CK - CM - CP - CS - CSMT - CV - CX - DI - DL - DS - ER - ERold - EX - FP - GC - GV - handy - ID - JF - LG - LK - LO - ME - MH - NM - OL - PC - PE - QU - SA - SI - SR - ST - TC - TE - TH - TM - TR - UT

Personal tools
Developing With