OpenLDAP
Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest

Viewing Incoming/7631
Full headers

From: bart@icm.edu.pl
Subject: Overlay to rewrite value of attribute using regex
Compose comment
Download message
State:
0 replies:
3 followups: 1 2 3

Major security issue: yes  no

Notes:

Notification:


Date: Mon, 24 Jun 2013 23:07:32 +0000
From: bart@icm.edu.pl
To: openldap-its@OpenLDAP.org
Subject: Overlay to rewrite value of attribute using regex
Full_Name: Dominik Bartkiewicz
Version: 
OS: Linux
URL: 
Submission from: (NULL) (89.73.105.138)


A simple overlay allows override attribute values​​.
In our case, it we replicate users date from three different servers and we
wanted to override attributes such as homeDirectory, shell.

a sample config:

overlay rewatt
ra_attribute homeDirectory
ra_regex "home/(users|staff|guest)"
ra_sub "icm/hydra/home/local"

DB

Followup 1

Download message
Date: Tue, 25 Jun 2013 01:03:03 +0200
From: bart <bart@icm.edu.pl>
To: <openldap-its@OpenLDAP.org>
Subject: Re: (ITS#7631) Overlay to rewrite value of attribute using regex
--=_c864110a076fc513331e0370bcb9adbe
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=UTF-8;
 format=flowed


I put patch here because the ftp server is full.
DB

--=_c864110a076fc513331e0370bcb9adbe
Content-Transfer-Encoding: base64
Content-Type: text/plain;
 name=bart-130624.patch
Content-Disposition: attachment;
 filename=bart-130624.patch

RnJvbSBiOTM0MjdiZDVjYmNkMmJmOWMzYmM3M2IxYzE2NWYzNDY3MGRkOWY5IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBiYXJ0IDxiYXJ0QG5iLWJhcnQuKG5vbmUpPgpEYXRlOiBNb24s
IDI0IEp1biAyMDEzIDIzOjA2OjEwICswMjAwClN1YmplY3Q6IFtQQVRDSF0gT3ZlcmxheSB0byBy
ZXdyaXRlIHZhbHVlIG9mIGF0dHJpYnV0ZSB1c2luZyByZWdleAoKLS0tCiBjb250cmliL3NsYXBk
LW1vZHVs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VkZSAic2xhcC5oIgorI2luY2x1
ZGUgImNvbmZpZy5oIgorCisjZGVmaW5lIE1BWF9NQVRDSEVTIDEKKworZW51bSB7CisJUkVXQVRU
X0FUVFJJQlVURT0xLAorCVJFV0FUVF9SRUdFWCwKKwlSRVdBVFRfU1VCLAorCVJFV0FUVF9BVFRS
SUJVVEVfVCwKKwlSRVdBVFRfUkVHRVhfVAorfTsKKworCit0eXBlZGVmIHN0cnVjdCByZXdhdHRf
aW5mb190IHsKKwlBdHRyaWJ1dGVEZXNjcmlwdGlvbgkqcmFfYXR0cmlidXRlOworCXJlZ2V4X3QJ
CQkqcmFfcmVnZXg7CisJY2hhcgkJKnJhX3N1YjsKKwlBdHRyaWJ1dGVEZXNjcmlwdGlvbgkqcmFf
YXR0cmlidXRlX3Q7CisJcmVnZXhfdAkJCSpyYV9yZWdleF90OworCXN0cnVjdCByZXdhdHRfaW5m
b190CSpyYV9uZXh0OworfSByZXdhdHRfaW5mb190OworCitzdGF0aWMgaW50CityZXdhdHRfY2Zn
ZW4oIENvbmZpZ0FyZ3MgKmMgKQoreworCXNsYXBfb3Zlcmluc3QJKm9uID0gKHNsYXBfb3Zlcmlu
c3QgKiljLT5iaTsKKwlyZXdhdHRfaW5mb190CSpjaSA9IChyZXdhdHRfaW5mb190ICopb24tPm9u
X2JpLmJpX3ByaXZhdGUgOworCisgICAgICAgIGlmKCBjaSA9PSBOVUxMICkgeworICAgICAgICAg
ICAgICAgIGNpID0gKHJld2F0dF9pbmZvX3QqKWNoX2NhbGxvYyggMSwgc2l6ZW9mKHJld2F0dF9p
bmZvX3QpICk7CisJCWNpIC0+IHJhX3JlZ2V4ID0gTlVMTDsKKwkJY2kgLT4gcmFfcmVnZXggPSBO
VUxMOworCQljaSAtPiByYV9zdWIgPSBOVUxMOworCQljaSAtPiByYV9hdHRyaWJ1dGUgPSBOVUxM
OworCQljaSAtPiByY

Message of length 23281 truncated


Followup 2

Download message
Date: Mon, 29 Jul 2013 08:30:23 -0700
From: Howard Chu <hyc@symas.com>
To: bart@icm.edu.pl, openldap-its@openldap.org
Subject: Re: (ITS#7631) Overlay to rewrite value of attribute using regex
bart@icm.edu.pl wrote:
> --=_c864110a076fc513331e0370bcb9adbe
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset=UTF-8;
>   format=flowed
>
>
> I put patch here because the ftp server is full.
> DB

Kurt, the source file in the patch contains this header:

@@ -0,0 +1,467 @@
+/* rewatt.c - Overlay to rewrite some attribute  */
+/* Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* ACKNOWLEDGEMENTS:
+ * This work was originally developed by the Dominik Bartkiewicz 
bart@icm.edu.pl for
+ * inclusion in OpenLDAP Software.
+ */

I presume we still need a formal IPR notice in the ITS?

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



Followup 3

Download message
Date: Mon, 29 Jul 2013 21:29:13 +0200
From: bart <bart@icm.edu.pl>
To: Howard Chu <hyc@symas.com>
Cc: <openldap-its@openldap.org>
Subject: Re: (ITS#7631) Overlay to rewrite value of attribute using regex
On Mon, 29 Jul 2013 08:30:23 -0700, Howard Chu wrote:
>
> I presume we still need a formal IPR notice in the ITS?

Is it enough:

The attached patch file is derived from OpenLDAP Software. All of the 
modifications to OpenLDAP Software represented in the following patch 
were developed by Dominik Bartkiewicz bart@icm.edu.pl. I have not 
assigned rights and/or interest in this work to any party.

DB


Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest


The OpenLDAP Issue Tracking System uses a hacked version of JitterBug

______________
© Copyright 2013, OpenLDAP Foundation, info@OpenLDAP.org