Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getlogin(3)

getorgent(3)

getpwent(3)

org(5)

rgyd(8)

GETORGENT(3)                    Domain/OS BSD                     GETORGENT(3)



NAME
     getorgent, getorgid, getorgnam, setorgent, endorgent, setorgfile - get
     organization file entry

SYNOPSIS
     #include <apollo/org.h>

     struct org *getorgent()

     struct org *getorgid(oid)
     int oid;

     struct org *getorgnam(name)
     char *name;

     setorgent()

     endorgent()

     setorgfile(name)
     char *name;

DESCRIPTION
     getorgent, getorgid and getorgnam return pointers to an object with the
     following structure, which contains the broken-out fields of a line in
     the org file.

          /*   org.h     4.1  83/05/03  */

          struct    org { /* see getorgent(3) */
               char *org_name;
               char *org_passwd;
               int  org_oid;
               char **org_mem;
          };

          struct org *getorgent(), *getorgid(), *getorgnam();

     The members of this structure are:

     org_name    The name of the organization.
     org_passwd  The encrypted password of the organization.
     org_gid     The numerical organization-ID.
     org_mem     Null terminated vector of pointers to the individual member
                 names.

     getorgent simply reads the next line while getorgid and getorgnam search
     until a matching oid or name is found (or until EOF is encountered).
     Each routine picks up where the others leave off so successive calls may
     be used to search the entire file.

     A call to setorgent has the effect of rewinding the organization file to
     allow repeated searches.  endorgent may be called to close the
     organization file when processing is complete.

NOTES
     All information is contained in a static area, so it must be copied if it
     is to be saved.

     Under Domain/OS BSD, /etc/org is a read-only object of the type "org,"
     maintained by the registry server.  See rgyd(8).  The presence of the
     registry server affects the implementation of these interfaces in the
     following way.

     If there was no call to setorgfile, these interfaces call the registry
     server.  If this call fails, they search the local registry.

     If there was a call to setorgfile, these interfaces search name.  They
     access name by way of its type manager.  If name is of type "org" (as in
     the case of /etc/org), its manager will cause the interface to call the
     registry server.  If, in this case, the call to the registry server
     fails, the local registry will not be searched.  name remains in effect
     until the next call to setorgfile or the process fails.

FILES
     /etc/org

SEE ALSO
     getlogin(3), getorgent(3), getpwent(3), org(5), rgyd(8).
     Managing BSD System Software.

DIAGNOSTICS
     A null pointer (0) is returned on EOF or error.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026