irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ruleAdmin.cpp File Reference
#include "rodsServer.hpp"
#include "reGlobalsExtern.hpp"
#include "reDefines.h"
#include <sys/time.h>
Include dependency graph for ruleAdmin.cpp:

Go to the source code of this file.

Classes

struct  entry
 
struct  paramIn
 

Macros

#define MY_SERVER_CONFIG_DIR   "/projects/misc/doct/dgtg/irods/RODS/server/config"
 
#define LF   10
 
#define CR   13
 
#define MAX_TOKEN   500
 
#define MAX_ENTRIES   5000
 
#define MYSRBBUFSIZE   2000000
 
#define QSIZE   MYSRBBUFSIZE
 
#define HUGE_STRING   5000
 

Typedefs

typedef paramIninStruct
 

Functions

int showRules (paramIn *Sentries)
 
int performAction (paramIn *Sentries)
 
int webErrorExit (char *msg, int status)
 
char x2c (char *what)
 
void unescape_url (char *url)
 
void plustospace (char *str)
 
int getBoundary (char **stquery, char *boundary)
 
char * findBoundary (char *inStr, char *bound, int length)
 
int getmultipartword (entry *iEntry, char **stquery, char *boundary, int length)
 
int mybgets (char inbuf[], char buffer[], int j)
 
char myfgets (FILE *infile, char buffer[])
 
void getword (char *word, char *line, char stop)
 
char * makeword (char *line, char stop)
 
char * fmakeword (FILE *f, char stop, int *cl)
 
int rind (char *s, char c)
 
int getline (char *s, int n, FILE *f)
 
void send_fd (FILE *f, FILE *fd)
 
int getEntries (inStruct Sentries)
 
int main (int argc, char **argv)
 
int showRules (inStruct Sentries)
 
int performAction (inStruct Sentries)
 

Variables

char * fixstr1
 
int heading = 0
 

Macro Definition Documentation

◆ CR

#define CR   13

Definition at line 16 of file ruleAdmin.cpp.

◆ HUGE_STRING

#define HUGE_STRING   5000

Definition at line 21 of file ruleAdmin.cpp.

◆ LF

#define LF   10

Definition at line 15 of file ruleAdmin.cpp.

◆ MAX_ENTRIES

#define MAX_ENTRIES   5000

Definition at line 18 of file ruleAdmin.cpp.

◆ MAX_TOKEN

#define MAX_TOKEN   500

Definition at line 17 of file ruleAdmin.cpp.

◆ MY_SERVER_CONFIG_DIR

#define MY_SERVER_CONFIG_DIR   "/projects/misc/doct/dgtg/irods/RODS/server/config"

Definition at line 10 of file ruleAdmin.cpp.

◆ MYSRBBUFSIZE

#define MYSRBBUFSIZE   2000000

Definition at line 19 of file ruleAdmin.cpp.

◆ QSIZE

#define QSIZE   MYSRBBUFSIZE

Definition at line 20 of file ruleAdmin.cpp.

Typedef Documentation

◆ inStruct

typedef paramIn* inStruct

Definition at line 39 of file ruleAdmin.cpp.

Function Documentation

◆ findBoundary()

char* findBoundary ( char *  inStr,
char *  bound,
int  length 
)

printf(" AA:%i:%c\n",length,bound[0]); fflush(stdout);

printf(" BB:%i:%c %i:%c\n", (char *) tmpPtr, (int) *((char *) tmpPtr), (char *) tmpPtr1,(int) *((char *) tmpPtr1));

Definition at line 103 of file ruleAdmin.cpp.

References int(), and NULL.

Referenced by getmultipartword().

Here is the call graph for this function:

◆ fmakeword()

char* fmakeword ( FILE *  f,
char  stop,
int cl 
)

Definition at line 270 of file ruleAdmin.cpp.

References LOG_ERROR, rodsLog(), and stop().

Here is the call graph for this function:

◆ getBoundary()

int getBoundary ( char **  stquery,
char *  boundary 
)

Definition at line 89 of file ruleAdmin.cpp.

Referenced by getEntries().

◆ getEntries()

int getEntries ( inStruct  Sentries)

the following is to take care of the home col. name bad length pb Linux on RedHat7

Definition at line 350 of file ruleAdmin.cpp.

References paramIn::cookieStr, paramIn::entries, fixstr1, getBoundary(), getmultipartword(), getword(), HUGE_STRING, paramIn::m, makeword(), MAX_ENTRIES, MAX_TOKEN, entry::name, NULL, paramIn::op, plustospace(), QSIZE, unescape_url(), entry::val, and webErrorExit().

Referenced by main().

Here is the call graph for this function:

◆ getline()

int getline ( char *  s,
int  n,
FILE *  f 
)

Definition at line 317 of file ruleAdmin.cpp.

References CR, and LF.

Referenced by main(), native_auth_establish_context(), osauth_auth_establish_context(), and pam_auth_client_start().

◆ getmultipartword()

int getmultipartword ( entry iEntry,
char **  stquery,
char *  boundary,
int  length 
)

looks like this is needed

looks like this is needed

looks like this is needed ** tmp1++; tmp1++; looks like this is needed

Definition at line 125 of file ruleAdmin.cpp.

References findBoundary(), entry::fstr, int(), entry::name, NULL, entry::size, entry::val, and webErrorExit().

Referenced by getEntries().

Here is the call graph for this function:

◆ getword()

void getword ( char *  word,
char *  line,
char  stop 
)

Definition at line 232 of file ruleAdmin.cpp.

References irods.pyparsing::line(), and stop().

Referenced by getEntries().

Here is the call graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

to print QUERY_STRING remove the blank between STAR and SLASH * / fprintf(stdout, "Content-type: text/html%c%c",10,10);fflush(stdout); fprintf(stdout, "<HTML>\n<HEAD>\n<TITLE>iRODS Rule Administration</TITLE>\n</HEAD>\n<BODY bgcolor=#FFFFFF>\n"); fprintf(stdout, "<CENTER> <B><FONT COLOR=#FF0000>iRODS Rule Base</FONT></B></CENTER>\n"); fprintf(stdout, "QUERY=%s\n",getenv("QUERY_STRING")); fflush(stdout); fprintf(stdout, "</BODY></HTML>\n"); exit(0); /*

uncomment below for commandline testing of SHOWRULES by REMOVING space between last star and slash in this line ** / strcpy(Sentries->entries[0].name,"func"); Sentries->entries[0].val = strdup("showRules"); strcpy(Sentries->entries[1].name,"ruleSet"); Sentries->entries[1].val = strdup("core"); Sentries->m = 2; /*

Definition at line 462 of file ruleAdmin.cpp.

References paramIn::entries, getEntries(), performAction(), showRules(), and entry::val.

Here is the call graph for this function:

◆ makeword()

char* makeword ( char *  line,
char  stop 
)

Definition at line 250 of file ruleAdmin.cpp.

References irods.pyparsing::line(), and stop().

Referenced by getEntries().

Here is the call graph for this function:

◆ mybgets()

int mybgets ( char  inbuf[],
char  buffer[],
int  j 
)

Definition at line 187 of file ruleAdmin.cpp.

References irods.pypyodbc::buffer.

◆ myfgets()

char myfgets ( FILE *  infile,
char  buffer[] 
)

Definition at line 210 of file ruleAdmin.cpp.

References irods.pypyodbc::buffer.

◆ performAction() [1/2]

◆ performAction() [2/2]

int performAction ( paramIn Sentries)

Referenced by main().

◆ plustospace()

void plustospace ( char *  str)

Definition at line 80 of file ruleAdmin.cpp.

Referenced by getEntries().

◆ rind()

int rind ( char *  s,
char  c 
)

Definition at line 308 of file ruleAdmin.cpp.

◆ send_fd()

void send_fd ( FILE *  f,
FILE *  fd 
)

Definition at line 335 of file ruleAdmin.cpp.

◆ showRules() [1/2]

int showRules ( inStruct  Sentries)

Definition at line 527 of file ruleAdmin.cpp.

References coreRuleStrct, paramIn::entries, getActionRecoveryList(), getRule(), initRuleStruct(), paramIn::m, MAX_ACTION_IN_RULE, MAX_ACTION_SIZE, MAX_RULE_LENGTH, ruleStruct_t::MaxNumOfRules, MY_SERVER_CONFIG_DIR, entry::name, NULL, rstrcat(), RULE_SET_DEF_LENGTH, and entry::val.

Here is the call graph for this function:

◆ showRules() [2/2]

int showRules ( paramIn Sentries)

Referenced by main().

◆ unescape_url()

void unescape_url ( char *  url)

Definition at line 67 of file ruleAdmin.cpp.

References x2c().

Referenced by getEntries().

Here is the call graph for this function:

◆ webErrorExit()

int webErrorExit ( char *  msg,
int  status 
)

Definition at line 46 of file ruleAdmin.cpp.

References heading, and irods.pypyodbc::status.

Referenced by getEntries(), and getmultipartword().

◆ x2c()

char x2c ( char *  what)

Definition at line 58 of file ruleAdmin.cpp.

Referenced by unescape_url().

Variable Documentation

◆ fixstr1

char* fixstr1

Definition at line 29 of file ruleAdmin.cpp.

Referenced by getEntries().

◆ heading

int heading = 0

Definition at line 30 of file ruleAdmin.cpp.

Referenced by webErrorExit().