These are two small doc corrections and a patch for imgssapi that fixes a startup issue with the new config system. Still not a full port but rather an interim fix. More information is in the patches.

Congratulations on the relp milestone.

... which brings a question: how imminent is the next stable version? I have several more patches in the queue but don't want to inhibit the release.

Tomas
>From 3e16f25f3fa3fc8d30fad79f0811fc5029681fe6 Mon Sep 17 00:00:00 2001
From: Tomas Heinrich <[email protected]>
Date: Sun, 2 Jun 2013 14:05:35 +0200
Subject: [PATCH 1/3] bugfix: postpone the start of the imgssapi listener

If the listen socket is opened earlier (during configuration parsing),
it is closed again during early init.

The start has been postponed to the 'runInput' stage, which has an
unpleasant side effect that it will fail if the priviledges are
dropped.

The code should be eventually fixed to support the new config system.
---
 plugins/imgssapi/imgssapi.c |   21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c
index 4e3a70a..15d994c 100644
--- a/plugins/imgssapi/imgssapi.c
+++ b/plugins/imgssapi/imgssapi.c
@@ -72,6 +72,7 @@ MODULE_CNFNAME("imgssapi")
 
 /* some forward definitions - they may go away when we no longer include imtcp.c */
 static rsRetVal addGSSListener(void __attribute__((unused)) *pVal, uchar *pNewVal);
+static rsRetVal actGSSListener(uchar *port);
 static int TCPSessGSSInit(void);
 static void TCPSessGSSClose(tcps_sess_t* pSess);
 static rsRetVal TCPSessGSSRecv(tcps_sess_t *pSess, void *buf, size_t buf_len, ssize_t *);
@@ -90,6 +91,7 @@ DEFobjCurrIf(glbl)
 
 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;
+static uchar *srvPort;
 
 /* our usr structure for the tcpsrv object */
 typedef struct gsssrv_s {
@@ -317,6 +319,16 @@ static rsRetVal
 addGSSListener(void __attribute__((unused)) *pVal, uchar *pNewVal)
 {
 	DEFiRet;
+
+	srvPort = pNewVal;
+
+	RETiRet;
+}
+
+static rsRetVal
+actGSSListener(uchar *port)
+{
+	DEFiRet;
 	gsssrv_t *pGSrv;
 
 	if(pOurTcpsrv == NULL) {
@@ -340,7 +352,7 @@ addGSSListener(void __attribute__((unused)) *pVal, uchar *pNewVal)
 		CHKiRet(tcpsrv.SetCBOnRegularClose(pOurTcpsrv, onRegularClose));
 		CHKiRet(tcpsrv.SetCBOnErrClose(pOurTcpsrv, onErrClose));
 		CHKiRet(tcpsrv.SetInputName(pOurTcpsrv, UCHAR_CONSTANT("imgssapi")));
-		tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal, 1);
+		tcpsrv.configureTCPListen(pOurTcpsrv, port, 1);
 		CHKiRet(tcpsrv.ConstructFinalize(pOurTcpsrv));
 	}
 
@@ -676,6 +688,11 @@ ENDfreeCnf
  */
 BEGINrunInput
 CODESTARTrunInput
+	/* This will fail if the priviledges are dropped. Should be
+	 * moved to the '*activateCnfPrePrivDrop' section eventually.
+	 */
+	actGSSListener(srvPort);
+
 	iRet = tcpsrv.Run(pOurTcpsrv);
 ENDrunInput
 
@@ -683,7 +700,7 @@ ENDrunInput
 /* initialize and return if will run or not */
 BEGINwillRun
 CODESTARTwillRun
-	if(pOurTcpsrv == NULL)
+	if(srvPort == NULL)
 		ABORT_FINALIZE(RS_RET_NO_RUN);
 
 	net.PrintAllowedSenders(2); /* TCP */
-- 
1.7.10.4

>From 9b72eb5fd7f042eee81c8fd4bdd67bccccf257c1 Mon Sep 17 00:00:00 2001
From: Tomas Heinrich <[email protected]>
Date: Mon, 3 Jun 2013 11:58:34 +0200
Subject: [PATCH 3/3] doc: correct omfile documentation

Some of the options affect all files, not just dynafiles.
---
 doc/omfile.html |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/omfile.html b/doc/omfile.html
index 3966ab1..a5c3bb3 100644
--- a/doc/omfile.html
+++ b/doc/omfile.html
@@ -57,10 +57,10 @@
 	Set the group for directories newly created. Please note that this setting does not affect the group of directories already existing. The parameter is a group name, for which the groupid is obtained by rsyslogd on during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
 
 	<li><strong>FileOwner </strong><br>
-	Set the file owner for dynaFiles newly created. Please note that this setting does not affect the owner of files already existing. The parameter is a user name, for which the userid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
+	Set the file owner for files newly created. Please note that this setting does not affect the owner of files already existing. The parameter is a user name, for which the userid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
 
 	<li><strong>FileGroup </strong><br>
-	Set the group for dynaFiles newly created. Please note that this setting does not affect the group of files already existing. The parameter is a group name, for which the groupid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
+	Set the group for files newly created. Please note that this setting does not affect the group of files already existing. The parameter is a group name, for which the groupid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
 
 	<li><strong>DirCreateMode </strong>[defaul 0700]<br>
 	This is the same as $FileCreateMode, but for directories automatically generated.<br></li><br>
@@ -69,7 +69,7 @@
 	The FileCreateMode directive allows to specify the creation mode with which rsyslogd creates new files. If not specified, the value 0644 is used (which retains backward-compatibility with earlier releases). The value given must always be a 4-digit octal number, with the initial digit being zero. <br>Please note that the actual permission depend on rsyslogd's process umask. If in doubt, use "$umask 0000" right at the beginning of the configuration file to remove any restrictions. <br>FileCreateMode may be specified multiple times. If so, it specifies the creation mode for all selector lines that follow until the next $FileCreateMode directive. Order of lines is vitally important.<br></li><br>
 
 	<li><strong>FailOnCHOwnFailure </strong>on/off [default on]<br>
-	This option modifies behaviour of dynaFile creation. If different owners or groups are specified for new files or directories and rsyslogd fails to set these new owners or groups, it will log an error and NOT write to the file in question if that option is set to "on". If it is set to "off", the error will be ignored and processing continues. Keep in mind, that the files in this case may be (in)accessible by people who should not have permission. The default is "on".<br></li><br>
+	This option modifies behaviour of file creation. If different owners or groups are specified for new files or directories and rsyslogd fails to set these new owners or groups, it will log an error and NOT write to the file in question if that option is set to "on". If it is set to "off", the error will be ignored and processing continues. Keep in mind, that the files in this case may be (in)accessible by people who should not have permission. The default is "on".<br></li><br>
 
 	<li><strong>CreateDirs </strong>on/off [default on]<br>
 	create directories on an as-needed basis<br></li><br>
@@ -136,10 +136,10 @@ File="/var/log/messages")
 	Set the group for directories newly created. Please note that this setting does not affect the group of directories already existing. The parameter is a group name, for which the groupid is obtained by rsyslogd on during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
 
 	<li><strong>$FileOwner </strong><br>
-	Set the file owner for dynaFiles newly created. Please note that this setting does not affect the owner of files already existing. The parameter is a user name, for which the userid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
+	Set the file owner for files newly created. Please note that this setting does not affect the owner of files already existing. The parameter is a user name, for which the userid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
 
 	<li><strong>$FileGroup </strong><br>
-	Set the group for dynaFiles newly created. Please note that this setting does not affect the group of files already existing. The parameter is a group name, for which the groupid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
+	Set the group for files newly created. Please note that this setting does not affect the group of files already existing. The parameter is a group name, for which the groupid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
 
 	<li><strong>$DirCreateMode </strong>[defaul 0700]<br>
 	This is the same as $FileCreateMode, but for directories automatically generated.<br></li><br>
@@ -148,7 +148,7 @@ File="/var/log/messages")
 	The FileCreateMode directive allows to specify the creation mode with which rsyslogd creates new files. If not specified, the value 0644 is used (which retains backward-compatibility with earlier releases). The value given must always be a 4-digit octal number, with the initial digit being zero. <br>Please note that the actual permission depend on rsyslogd's process umask. If in doubt, use "$umask 0000" right at the beginning of the configuration file to remove any restrictions. <br>FileCreateMode may be specified multiple times. If so, it specifies the creation mode for all selector lines that follow until the next $FileCreateMode directive. Order of lines is vitally important.<br></li><br>
 
 	<li><strong>$FailOnCHOwnFailure </strong>on/off [default on]<br>
-	This option modifies behaviour of dynaFile creation. If different owners or groups are specified for new files or directories and rsyslogd fails to set these new owners or groups, it will log an error and NOT write to the file in question if that option is set to "on". If it is set to "off", the error will be ignored and processing continues. Keep in mind, that the files in this case may be (in)accessible by people who should not have permission. The default is "on".<br></li><br>
+	This option modifies behaviour of file creation. If different owners or groups are specified for new files or directories and rsyslogd fails to set these new owners or groups, it will log an error and NOT write to the file in question if that option is set to "on". If it is set to "off", the error will be ignored and processing continues. Keep in mind, that the files in this case may be (in)accessible by people who should not have permission. The default is "on".<br></li><br>
 
 	<li><strong>$F$OMFileForceCHOwn </strong><br>
 	force ownership change for all files<br></li><br>
-- 
1.7.10.4

>From a82a000cebcfb23aec29fa9f87d7f8ac4ace3458 Mon Sep 17 00:00:00 2001
From: Tomas Heinrich <[email protected]>
Date: Mon, 20 May 2013 14:26:19 +0200
Subject: [PATCH 2/3] doc: clarify RSYSLOG_DEBUG format

---
 doc/debug.html |    1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/debug.html b/doc/debug.html
index 996bf5c..557ca6d 100644
--- a/doc/debug.html
+++ b/doc/debug.html
@@ -56,6 +56,7 @@ only available under Linux. This usually does NOT work when privileges have
 been dropped (that's not a bug, but the way it is).
 <li><b>help</b> - display a very short list of commands - hopefully a life saver if you can't access the documentation...</li>
 </ul>
+<p>Individual options are separated by spaces.</p>
 </ul>
 <h3>Why Environment Variables?</h3>
 <p>You may ask why we use environment variables for debug-system parameters and not
-- 
1.7.10.4

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to