Issue 8016 - silence on wrong envflags for lmdb-backend
Summary: silence on wrong envflags for lmdb-backend
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-04 21:52 UTC by Leonid Yuriev
Modified: 2015-07-02 17:46 UTC (History)
0 users

See Also:


Attachments
its8016.patch (688 bytes, patch)
2015-01-04 21:57 UTC, Leonid Yuriev
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Leonid Yuriev 2015-01-04 21:52:04 UTC
Full_Name: Leonid Yuriev
Version: 2.4-HEAD
OS: RHEL7
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (31.130.36.33)


No any error reported by lmdb-backend when wrong options was specified in
envflags.

For example slapd.conf:
    envflags  This is a rebus codestyle and the technical debt

Patch will be available shortly.


Comment 1 Leonid Yuriev 2015-01-04 21:57:38 UTC
Please review and merge.

Leonid.

---

The attached files is derived from OpenLDAP Software. All of the 
modifications
to OpenLDAP Software represented in the following patch(es) were 
developed by
Peter-Service LLC, Moscow, Russia. Peter-Service LLC has not assigned 
rights
and/or interest in this work to any party. I, Leonid Yuriev am 
authorized by
Peter-Service LLC, my employer, to release this work under the following 
terms.

Peter-Service LLC hereby places the following modifications to OpenLDAP 
Software
(and only these modifications) into the public domain. Hence, these
modifications may be freely used and/or redistributed for any purpose
with or without attribution and/or other notice.


Comment 2 Howard Chu 2015-01-05 09:27:13 UTC
leo@yuriev.ru wrote:
> This is a multi-part message in MIME format.
> --------------080401010006020303000400
> Content-Type: text/plain; charset=windows-1251; format=flowed
> Content-Transfer-Encoding: 7bit
>
> Please review and merge.
>
> Leonid.
>
> ---
>
> The attached files is derived from OpenLDAP Software. All of the
> modifications
> to OpenLDAP Software represented in the following patch(es) were
> developed by
> Peter-Service LLC, Moscow, Russia. Peter-Service LLC has not assigned
> rights
> and/or interest in this work to any party. I, Leonid Yuriev am
> authorized by
> Peter-Service LLC, my employer, to release this work under the following
> terms.
>
> Peter-Service LLC hereby places the following modifications to OpenLDAP
> Software
> (and only these modifications) into the public domain. Hence, these
> modifications may be freely used and/or redistributed for any purpose
> with or without attribution and/or other notice.
>
>
>
> --------------080401010006020303000400
> Content-Type: text/x-patch;
>   name="its8016.patch"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment;
>   filename="its8016.patch"
>
> commit 36ecfd44559d3b89a7dd5bcbfb6a22d8aeb8142b
> Author: Leo Yuriev <leo@yuriev.ru>
> Date:   2015-01-04 09:05:36 +0300
>
>      fix: report about wrong envflags in lmdb-backend instead of silently ignore them.
>
> diff --git a/servers/slapd/back-mdb/config.c b/servers/slapd/back-mdb/config.c
> index bb9be73..68009b6 100644
> --- a/servers/slapd/back-mdb/config.c
> +++ b/servers/slapd/back-mdb/config.c
> @@ -620,8 +620,10 @@ mdb_cf_gen( ConfigArgs *c )
>   				}
>   				mdb->mi_dbenv_flags |= mdb_envflags[j].mask;
>   			} else {
> -				/* unknown keyword */
> -				rc = 1;
> +				fprintf( stderr, "%s: "
> +					"unknown keyword \"%s\" in \"envflags\".\n",
> +					c->log, c->argv[i] );
> +				return 1;
>   			}
>   		}
>   		}
>
> --------------080401010006020303000400--

Use of fprintf(stderr) for config errors is deprecated. New code should 
only be using c->cr_msg.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 3 Howard Chu 2015-01-05 09:38:30 UTC
leo@yuriev.ru wrote:
> Full_Name: Leonid Yuriev
> Version: 2.4-HEAD
> OS: RHEL7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (31.130.36.33)
>
>
> No any error reported by lmdb-backend when wrong options was specified in
> envflags.
>
> For example slapd.conf:
>      envflags  This is a rebus codestyle and the technical debt
>
> Patch will be available shortly.

fixed in master


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 4 Howard Chu 2015-01-05 09:39:44 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 5 Quanah Gibson-Mount 2015-01-05 20:01:01 UTC
changed notes
changed state Test to Release
Comment 6 OpenLDAP project 2015-07-02 17:46:22 UTC
fixed in master
fixed in RE25
fixed in RE24
Comment 7 Quanah Gibson-Mount 2015-07-02 17:46:22 UTC
changed notes
changed state Release to Closed