Hello community,
here is the log from the commit of package nfsidmap
checked in at Tue Apr 25 17:28:06 CEST 2006.
--------
--- nfsidmap/nfsidmap.changes 2006-03-20 12:05:44.000000000 +0100
+++ STABLE/nfsidmap/nfsidmap.changes 2006-04-25 17:09:33.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Apr 25 17:07:46 CEST 2006 - okir@suse.de
+
+- Stop adding ou=People to LDAP search string; now it
+ works with eDirectory (#169152)
+
+-------------------------------------------------------------------
New:
----
libnfsidmap-0.12-ldapsrch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nfsidmap.spec ++++++
--- /var/tmp/diff_new_pack.AyssLf/_old 2006-04-25 17:27:30.000000000 +0200
+++ /var/tmp/diff_new_pack.AyssLf/_new 2006-04-25 17:27:30.000000000 +0200
@@ -15,7 +15,7 @@
URL: http://nfs.sourceforge.net
Summary: NFSv4 ID Mapping Library
Version: 0.12
-Release: 7
+Release: 12
Group: Productivity/Networking/NFS
License: BSD
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -24,6 +24,7 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/libnfsidmap-%{version}.tar.gz
Patch0: libnfsidmap-0.12-nouser.patch
+Patch1: libnfsidmap-0.12-ldapsrch
%description
In NFSv4, identities of users are conveyed by names rather than user ID
@@ -39,6 +40,7 @@
%prep
%setup -q -n libnfsidmap-%version
%patch0 -p1
+%patch1 -p1
%build
%{?suse_update_config:%{suse_update_config -f }}
@@ -64,6 +66,9 @@
%attr(444,root,root) %{_mandir}/man?/*
%changelog -n nfsidmap
+* Tue Apr 25 2006 - okir@suse.de
+- Stop adding ou=People to LDAP search string; now it
+ works with eDirectory (#169152)
* Mon Mar 20 2006 - okir@suse.de
- Do not crash if user is not in passwd database (#154912)
* Wed Jan 25 2006 - mls@suse.de
++++++ libnfsidmap-0.12-ldapsrch ++++++
Subject: Make rpc.idmapd work with eDirectory
References: 169152
Without this change, the LDAP code in libnfsidmap would always prepend
ou=People to the search base; which does not work with eDirectory.
Signed-off-by: okir@suse.de
Acked-by: Suresh Jayaraman
umich_ldap.c | 54 ++++++++++--------------------------------------------
1 files changed, 10 insertions(+), 44 deletions(-)
Index: libnfsidmap-0.12/umich_ldap.c
===================================================================
--- libnfsidmap-0.12.orig/umich_ldap.c
+++ libnfsidmap-0.12/umich_ldap.c
@@ -97,11 +97,11 @@ umich_name_to_ids(char *name, int idtype
};
LDAPMessage *result, *entry;
BerElement *ber = NULL;
- char **idstr, filter[LDAP_FILT_MAXSIZ], base[LDAP_FILT_MAXSIZ];
+ char **idstr, filter[LDAP_FILT_MAXSIZ];
struct attr uid_attr;
char *attrs[3];
char *attr_res;
- int count = 0, err, f_len, b_len;
+ int count = 0, err, f_len;
int sizelimit = 1;
err = -EINVAL;
@@ -121,11 +121,6 @@ umich_name_to_ids(char *name, int idtype
warnx("ERROR: umich_name_to_ids: filter too long!\n");
goto out;
}
- if (b_len = snprintf(base, LDAP_FILT_MAXSIZ, "%s,%s",
- "ou=People", lbase) == LDAP_FILT_MAXSIZ) {
- warnx("ERROR: umich_name_to_ids: base too long!\n");
- goto out;
- }
}
else if (idtype == IDTYPE_GROUP) {
if (f_len = snprintf(filter, LDAP_FILT_MAXSIZ,
@@ -136,11 +131,6 @@ umich_name_to_ids(char *name, int idtype
warnx("ERROR: umich_name_to_ids: filter too long!\n");
goto out;
}
- if (b_len = snprintf(base, LDAP_FILT_MAXSIZ, "%s,%s",
- "ou=Groups", lbase) == LDAP_FILT_MAXSIZ) {
- warnx("ERROR: umich_name_to_ids: base too long!\n");
- goto out;
- }
}
else {
warnx("ERROR: umich_name_to_ids: invalid idtype (%d)\n",
@@ -170,7 +160,7 @@ umich_name_to_ids(char *name, int idtype
attrs[1] = "gidNumber";
attrs[2] = NULL;
- err = ldap_search_st(ld, base, LDAP_SCOPE_SUBTREE,
+ err = ldap_search_st(ld, lbase, LDAP_SCOPE_SUBTREE,
filter, (char **)attrs,
0, &timeout, &result);
if (err < 0 ) {
@@ -266,12 +256,12 @@ umich_id_to_name(uid_t id, int idtype, c
};
LDAPMessage *result, *entry;
BerElement *ber;
- char **namestr, filter[LDAP_FILT_MAXSIZ], base[LDAP_FILT_MAXSIZ];
+ char **namestr, filter[LDAP_FILT_MAXSIZ];
char idstr[16];
struct attr name_attr;
char *attrs[2];
char *attr_res;
- int count = 0, err, f_len, b_len;
+ int count = 0, err, f_len;
int sizelimit = 1;
err = -EINVAL;
@@ -289,12 +279,6 @@ umich_id_to_name(uid_t id, int idtype, c
warnx("ERROR: umich_id_to_name: filter too long!\n");
goto out;
}
- if (b_len = snprintf(base, LDAP_FILT_MAXSIZ, "%s,%s",
- "ou=People", lbase) == LDAP_FILT_MAXSIZ) {
- warnx("ERROR: umich_id_to_name: base too long!\n");
- goto out;
- }
-
} else if (idtype == IDTYPE_GROUP) {
if (f_len = snprintf(filter, LDAP_FILT_MAXSIZ,
"(&(objectClass=%s)(gidNumber=%s))",
@@ -303,12 +287,6 @@ umich_id_to_name(uid_t id, int idtype, c
warnx("ERROR: umich_id_to_name: filter too long!\n");
goto out;
}
- if (b_len = snprintf(base, LDAP_FILT_MAXSIZ, "%s,%s",
- "ou=Groups", lbase) == LDAP_FILT_MAXSIZ) {
- warnx("ERROR: umich_id_to_name: base too long!\n");
- goto out;
- }
-
} else {
warnx("ERROR: umich_id_to_name: invalid idtype (%d)\n", idtype);
err = -EINVAL;
@@ -336,7 +314,7 @@ umich_id_to_name(uid_t id, int idtype, c
attrs[0] = attr_names.NFSv4_name_attr;
attrs[1] = NULL;
- err = ldap_search_st(ld, base, LDAP_SCOPE_SUBTREE,
+ err = ldap_search_st(ld, lbase, LDAP_SCOPE_SUBTREE,
filter, (char **)attrs,
0, &timeout, &result);
if (err < 0 ) {
@@ -389,11 +367,11 @@ umich_gss_princ_to_grouplist(char *princ
.tv_sec = 2,
};
LDAPMessage *result, *entry;
- char **namestr, filter[LDAP_FILT_MAXSIZ], base[LDAP_FILT_MAXSIZ];
+ char **namestr, filter[LDAP_FILT_MAXSIZ];
char uidstr[16];
struct attr name_attr;
char *attrs[2];
- int count = 0, err = -ENOMEM, f_len, b_len;
+ int count = 0, err = -ENOMEM, f_len;
gid_t *curr_group;
err = -EINVAL;
@@ -432,16 +410,10 @@ umich_gss_princ_to_grouplist(char *princ
goto out;
}
- if (b_len = snprintf(base, LDAP_FILT_MAXSIZ, "%s,%s",
- "ou=People", lbase) == LDAP_FILT_MAXSIZ) {
- warnx("ERROR: umich_gss_princ_to_grouplist: base too long!\n");
- goto out;
- }
-
attrs[0] = "uid";
attrs[1] = NULL;
- err = ldap_search_st(ld, base, LDAP_SCOPE_SUBTREE,
+ err = ldap_search_st(ld, lbase, LDAP_SCOPE_SUBTREE,
filter, attrs,
0, &timeout, &result);
if (err < 0 ) {
@@ -480,16 +452,10 @@ umich_gss_princ_to_grouplist(char *princ
goto out_unbind;
}
- if (b_len = snprintf(base, LDAP_FILT_MAXSIZ, "%s,%s",
- "ou=Groups", lbase) == LDAP_FILT_MAXSIZ) {
- warnx("ERROR: umich_gss_princ_to_grouplist: base too long!\n");
- goto out_unbind;
- }
-
attrs[0] = "gidNumber";
attrs[1] = NULL;
- err = ldap_search_st(ld, base, LDAP_SCOPE_SUBTREE,
+ err = ldap_search_st(ld, lbase, LDAP_SCOPE_SUBTREE,
filter, attrs,
0, &timeout, &result);
if (err < 0 ) {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...