summaryrefslogtreecommitdiffstats
path: root/plugins/imgssapi/imgssapi.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-07 08:06:16 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-07 08:06:16 +0000
commitfa67273c1644551b50919fa7879acfdc92e269bc (patch)
tree38e41ee526a4bcc19540047c56c93b2a7865ef36 /plugins/imgssapi/imgssapi.c
parentae3e3e9cb1584b5cf7082c1b28c4cbbd48b1f664 (diff)
downloadrsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.tar.gz
rsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.tar.xz
rsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.zip
- added RSYSLOGD_MODDIR environment variable
- added -M rsyslogd option (allows to specify module directory location) - converted net.c into a loadable library plugin
Diffstat (limited to 'plugins/imgssapi/imgssapi.c')
-rw-r--r--plugins/imgssapi/imgssapi.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c
index 1c0dd79a..4a7479f4 100644
--- a/plugins/imgssapi/imgssapi.c
+++ b/plugins/imgssapi/imgssapi.c
@@ -77,6 +77,7 @@ DEFobjCurrIf(tcpsrv)
DEFobjCurrIf(tcps_sess)
DEFobjCurrIf(gssutil)
DEFobjCurrIf(errmsg)
+DEFobjCurrIf(net)
static tcpsrv_t *pOurTcpsrv = NULL; /* our TCP server(listener) TODO: change for multiple instances */
static gss_cred_id_t gss_server_creds = GSS_C_NO_CREDENTIAL;
@@ -171,10 +172,10 @@ isPermittedHost(struct sockaddr *addr, char *fromHostFQDN, void *pUsrSrv, void*p
pGSess = (gss_sess_t*) pUsrSess;
if((pGSrv->allowedMethods & ALLOWEDMETHOD_TCP) &&
- isAllowedSender(pAllowedSenders_TCP, addr, (char*)fromHostFQDN))
+ isAllowedSender(net.pAllowedSenders_TCP, addr, (char*)fromHostFQDN))
allowedMethods |= ALLOWEDMETHOD_TCP;
if((pGSrv->allowedMethods & ALLOWEDMETHOD_GSS) &&
- isAllowedSender(pAllowedSenders_GSS, addr, (char*)fromHostFQDN))
+ isAllowedSender(net.pAllowedSenders_GSS, addr, (char*)fromHostFQDN))
allowedMethods |= ALLOWEDMETHOD_GSS;
if(allowedMethods && pGSess != NULL)
pGSess->allowedMethods = allowedMethods;
@@ -636,8 +637,8 @@ CODESTARTwillRun
if(pOurTcpsrv == NULL)
ABORT_FINALIZE(RS_RET_NO_RUN);
- PrintAllowedSenders(2); /* TCP */
- PrintAllowedSenders(3); /* GSS */
+ net.PrintAllowedSenders(2); /* TCP */
+ net.PrintAllowedSenders(3); /* GSS */
finalize_it:
ENDwillRun
@@ -654,13 +655,13 @@ ENDmodExit
BEGINafterRun
CODESTARTafterRun
/* do cleanup here */
- if (pAllowedSenders_TCP != NULL) {
- clearAllowedSenders (pAllowedSenders_TCP);
- pAllowedSenders_TCP = NULL;
+ if (net.pAllowedSenders_TCP != NULL) {
+ net.clearAllowedSenders (net.pAllowedSenders_TCP);
+ net.pAllowedSenders_TCP = NULL;
}
- if (pAllowedSenders_GSS != NULL) {
- clearAllowedSenders (pAllowedSenders_GSS);
- pAllowedSenders_GSS = NULL;
+ if (net.pAllowedSenders_GSS != NULL) {
+ net.clearAllowedSenders (net.pAllowedSenders_GSS);
+ net.pAllowedSenders_GSS = NULL;
}
ENDafterRun
@@ -693,6 +694,7 @@ CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(tcpsrv, "tcpsrv"));
CHKiRet(objUse(gssutil, "gssutil"));
CHKiRet(objUse(errmsg, CORE_COMPONENT));
+ CHKiRet(objUse(net, "net"));
/* register config file handlers */
CHKiRet(omsdRegCFSLineHdlr((uchar *)"inputgssserverpermitplaintcp", 0, eCmdHdlrBinary,