|
|
|
#include <sysadm/Association.h>
SaASSOC_REF_DEF should be used in c++ files defining classes which are accessed via AssocFactory. For example:
#include "ClustersAssocWithMachine.h" ... SaASSOC_REF_DEF(ClustersAssocWithMachine); ... ClustersAssocWithMachine::ClustersAssocWithMachine( Category& parentCategory, const String& parentSelector, Category& childCategory) { ... };
|
#include <sysadm/CategoryListener.h>
SaCATEGORY_REF_DEF should be used in c++ files defining classes which are accessed via CategoryFactory. For example:
#include "ExampleCategory.h" ... SaCATEGORY_REF_DEF(ExampleClass); ... ExampleCategory::ExampleCategory() { ... } ...
|
#include <sysadm/ClustersAssocWithMachine.h>
ClustersAssocWithMachine objects are accessed through their corresponding AssocRefs.
template <class Type> inline void |
#include <sysadm/CollectionOf.h>
This version uses the delete operator on each of the elements.
template <class Type> inline void |
#include <sysadm/CollectionOf.h>
This version is identical to the RemoveAndDestrtoyContentsOf, only the name is different.
template <class Type> inline void |
#include <sysadm/CollectionOf.h>
This version uses the delete[] operator on each of the elements.
template <class Type> inline void |
#include <sysadm/CollectionOf.h>
This version uses the free() function on each of the elements.
|
#include <sysadm/ExampleCategory.h>
ExampleCategory objects are accessed through their corresponding ObjRefs.
|
#include <sysadm/FileBasedCategory.h>
File description:
Line 1: A sequence of name-type pairs. The name and the type are separated by the '!' character, and the pairs are separated by the ':' character. The names will be the keys of the attributes in the items, and the type is the type of data. Legal names consist of characters that are not '!' or '!'. Legal types are 'S' for String, 'L' for Long, 'B' for boolean, and 'D' for Double. As an example, the line
name!S:type!S:cluster!S:machine!S:group!S:defined!S:state!L:error!L
might be the first line in the ResourceCategory.data file.
The rest of the lines: A selector string followed by a sequence of attribute values separated by the ':' character. The values will be turned into attribute values with the type specified on Line 1. For strings and selectors, non ':' character are valid. For Booleans, valid entries are 'T' and 'F'. Longs and Doubles are converted by using atol and atof respectively. For example, the line
res1:resource 1:type 1:cluster 1:machine 2:group 1:machine 1:6:0
might specify a particular item. Notice that there is one more field in the item line than in the description line (Line 1). This is because the first field ("res1" in this case) is the selector for the item.
Use a '#' character as the first character of a line for a comment line.
|
#include <sysadm/MachinesAssocWithCluster.h>
MachinesAssocWithCluster objects are accessed through their corresponding AssocRefs.
template <class Type> inline void |
#include <sysadm/OrderedCollectionOf.h>
Convenience function to remove and delete each object in a ordered collection. It's not a member function of OrderedCollectionOf because then OrderedCollection of const objects would not work right.
typedef struct _SaParam |
#include <sysadm/SaParam.h>
If SaParamParseArgs() sees this argument, it will read arguments from file descriptor 0 in addition to the command line.
extern SaParam * |
#include <sysadm/SaParam.h>
Creating and destroying parameters. SaParamCreate() returns NULL if malloc() fails.
extern int |
#include <sysadm/SaParam.h>
Getting and setting parameters. SaParamSet() returns 0 if successful, -1 if malloc() fails. SaParamGet() returns NULL if there is no value for "key".
extern int |
#include <sysadm/SaParam.h>
SaParamSetHidden is used to hide sensitive parameters from log files. If SaParamSetHidden(param, "key", "value") is called, then the SaExecArgs routines will pass the parameter for "key" via stdin rather than on the command line.
extern int |
#include <sysadm/SaParam.h>
Sending and receiving parameters. SaParamSend() returns 0 if successful, -1 if it cannot write to fd. Both methods return -1 if malloc() fails.
extern int |
#include <sysadm/SaParam.h>
Parse command line arguments of the form "key=value" into key/value pairs. In any key/value pair, if "value" is the empty string then subsequent calls to SaParamGet() for that key will return NULL. If the argument SaPARAM_INPUT_ARG is encountered, key value pairs are read from file descriptor 0 as well by calling SaParamReceive().
Returns 0 if successful, -1 if memory is exhausted, if read fails, or if an unrecognized argument is encountered.
extern SaParamExecArgs * |
#include <sysadm/SaParam.h>
Pass arguments to another command via exec().
SaParamExecArgsCreate() breaks "params" into two chunks. The first chunk is returned by SaParamExecArgsGet() and should be passed to the execv() system call as its second parameter. The second chunk should be sent to the command's standard input by calling SaParamExecArgsSend().
The dividing line between the two chunks is the point at which the size of the arguments + the size of the environment reaches the maximum size supported by the kernel. If all of the parameters fit on the command line, the second chunk will be empty.
Any parameters that were set with SaParamSetHidden() are passed in the second chunk, regardless of whether the args fit.
The "env" argument to SaParamExecArgsCreate() is the environment which will be used for the new command, and is used to calculate the maximum argument size. The arguments following "env" are the initial arguments for the command; SaParamExecArgsCreate() will append the arguments corresponding to "param". The last argument to SaParamExecArgsCreate() should be NULL.
extern SaParamExecArgs * |
#include <sysadm/SaParam.h>
SaPramExecArgsCreateV() takes arguments in argc, argv form instead of as varargs.
extern char *const * |
#include <sysadm/SaParam.h>
SaParamExecArgsGet() returns the first chunk in a form suitable for passing to execv(). The return value is owned by libsysadmParam and should not be modified or freed by the caller. The return value remains valid until SaParamExecArgsDestroy() is called.
SaParamExecArgsSend() sends the second chunk over "fd". "fd" is assumed to the write end of a pipe which is the command's standard input.
SaParamExecArgsSendNeeded() can be used to determine whether a call to SaParamExecArgsSend() is necessary. If SaParamExecArgsSendNeeded() returns 0, then there is no need to call SaParamExecArgsSend() (although it doesn't hurt).
extern size_t |
#include <sysadm/SaParam.h>
Utility function for measuring the size of an environment.
extern SaParamIter * |
#include <sysadm/SaParam.h>
Iterating over the keys.
bool |
#include <sysadm/String.h>
handles t/f, true/false, on/off, 1/0
String |
#include <sysadm/String.h>
Converts to "True" or "False"
String |
#include <sysadm/String.h>
Reads in the contents of a file and returns a String with the contents. If there is a problem opening the file or reading it, NUL will be returned, and errno is set to indicate the error.
SaAuth * |
#include <sysadm/auth.h>
Open the dso corresponding to authScheme, and create a corresponding SaAuth structure.
void |
#include <sysadm/auth.h>
Close the dso corresponding to auth.
const char * |
#include <sysadm/auth.h>
Get the name of an an authentication scheme. This returns the same string ("same" meaning strcmp will be equal) that was passed to SaAuthOpen.
void |
#include <sysadm/auth.h>
Initialize widgets for SaPrivDialog just prior to the dialog being displayed. Only valid if SaAuthOpen() was called with SaAuthSender.
void |
#include <sysadm/auth.h>
Send authentication parameters. To support challenge/response interactions, outfd should be used to send responses and infd should be used to receive challenges. Only valid if SaAuthOpen() was called with SaAuthSender.
bool |
#include <sysadm/auth.h>
Check authentication parameters sent by SaAuthSendParams. Use infd to get responses sent by SaAuthSendParams, and outfd to send challenges. Only valid if SaAuthOpen() was called with SaAuthReceiver.
typedef struct _auth |
#include <sysadm/authproto.h>
When writing an auth dso, define "struct _auth" to contain whatever data you need to keep track of during execution. This is here to avoid the need for global variables.
typedef enum |
#include <sysadm/authproto.h>
If Open is called with AUTH_SENDER, a call to Createidgets followed by a call to InitWidgets followed by a call to SendParams is to be expected. If Open is called with AUTH_RECEIVER, a call to CheckParams is to be expected.
void |
#include <sysadm/authproto.h>
This gets called right before the SaPrivDialog dialog box is displayed, either for the first time or a subsequent time. It gives the auth dso a chance to initialize its widgets.
void |
#include <sysadm/authproto.h>
Send authentication parameters as specified by the widgets that were created by CreateWidgets. If further interaction is necessary here, it's OK to bring up a subsequent dialog.
bool |
#include <sysadm/authproto.h>
Check that the parameters sent by SendParams are valid. Return B_TRUE if they're valid, B_FALSE if they're not. This function should test isatty(infd); it's possible CheckParams is interacting with the user through a tty as opposed to through motif widgets. In this case, prompts should be printed to the user (via /dev/tty) and then echo should be turned off when the user types sensitive stuff.
If !isatty(infd), then infd and outfd should be file descriptors for communicating with a GUI program, and SendParams will be at the other end of the socket.
void |
#include <sysadm/authproto.h>
Called when authentication dso is no longer needed. Any memory pointed to by auth should be freed, widgets should be destroyed, file descriptors should be closed, etc.
extern ssize_t |
#include <sysadm/io.h>
Like read(2), but retries when interrupted.
extern ssize_t |
#include <sysadm/io.h>
Like read(2), but keeps retrying until all bytes are read or an error occurs.
extern ssize_t |
#include <sysadm/io.h>
Like write(2), but retries when interrupted.
extern ssize_t |
#include <sysadm/io.h>
Like write(2), but keeps retrying until all bytes are written or an error occurs.
typedef enum |
#include <sysadm/privdefs.h>
checkpriv(1M) prints one of these values (converted to ASCII decimal) if its exit status is SaPRIVOK and it was passed the "-reason" argument.
bool |
#include <sysadm/privilege.h>
The difference between SaHasPrivInDB and SaCheckPriv: SaHasPrivInDB simply does the lookup in the privilege database to see if the requested privileges are OK.
SaCheckPriv also considers things like whether the current user happens to be root or maybe there's no root password (in which case everybody is privileged), as well as default privileges and privileged users.
bool |
#include <sysadm/privilege.h>
Callers of SaCheckPriv don't need to worry about default privileges and privileged users; SaCheckPriv takes of checking that. These are here for clients who care about the difference (such as rmpriv).
bool |
#include <sysadm/privilege.h>
SaPrivilegesAreEnabled returns B_FALSE if privileges are chkconfig'd off.
void |
#include <sysadm/privilege.h>
SaPrivCheckFile() makes sure that "fileName" and the directory it's in are owned by root and only writable by root. If the directory is owned or writable by a user other than root SaPrivCheckFile exits. The privilege admin commands use this to defend themselves against hackers.
bool |
#include <sysadm/privilege.h>
SaPrivAuthenticate() does authentication handshaking over stdin and stdout.
void |
#include <sysadm/privilege.h>
SaPrivFixUmask sets the umask to a reasonable value.
void |
#include <sysadm/privilege.h>
Verify a privilege name. This function exits if "privName" is bogus. If SaPrivVerifyPrivName thinks the user is trying to spoof us, it exits with no error message.
typedef struct _SaLog |
#include <sysadm/salog.h>
Opaque handle for logging API.
typedef enum |
#include <sysadm/salog.h>
Return status of functions
typedef enum |
#include <sysadm/salog.h>
Error codes
extern const char * |
#include <sysadm/salogI.h>
These are here for testing purposes. Test programs can set these variables to control which files are used for logging.
Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36. |