[SSSD] [PATCH] Add ldap_autofs_map_master_name option

Jakub Hrozek jhrozek at redhat.com
Thu May 30 16:44:31 UTC 2013


On Tue, May 28, 2013 at 04:32:00PM -0700, C. S. wrote:
> (Including once more as an attachment, it looks like something may have
> wrapped the lines when I had the patch in the body of the message.)
> 
> 
> On Tue, May 28, 2013 at 4:29 PM, C. S. <csleclish at gmail.com> wrote:
> 
> > Hi Jakub,
> >
> > Thanks for the feedback! Very helpful. Looks like I dropped the LDAP map
> > changes during a merge, that is now included. And I've removed the
> > strdup(), whoops! ;-)
> >
> > cs
> >

Hi Cove,

this patch is working for me with a couple of additonal changes that I
attach as a mini-patch. If you like, you can squash it into yours and
resend, then I think the patch would be good to go.

Basically I think it's enough to have the master map name defined in the
LDAP options, not the map and entry option lists. Also the option lists
need the objectclass to be the first entry in the map.

Sorry, I think I confused you with my previous e-mail.

With the attached patch on top of yours, I was able to run automounter
with a custom master map (MASTER_MAP_NAME="auto.slave" in
/etc/sysconfig/autofs) just fine.

Thanks again for the contribution.
-------------- next part --------------
>From 166f7b6cbd74705cfd99688a83eed0622d8d6302 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Thu, 30 May 2013 18:37:19 +0200
Subject: [PATCH] Remove automountMapMasterName from entry and object maps

---
 src/providers/ipa/ipa_opts.h   | 2 --
 src/providers/ldap/ldap_opts.h | 2 --
 src/providers/ldap/sdap.h      | 2 --
 3 files changed, 6 deletions(-)

diff --git a/src/providers/ipa/ipa_opts.h b/src/providers/ipa/ipa_opts.h
index 9a99dcdb782ea3cb070f877362a0ab2b7d80be5c..f8a3bdda0d8b2cc66d40b73dec2aab3b9e65b5d9 100644
--- a/src/providers/ipa/ipa_opts.h
+++ b/src/providers/ipa/ipa_opts.h
@@ -288,14 +288,12 @@ struct sdap_attr_map ipa_service_map[] = {
 };
 
 struct sdap_attr_map ipa_autofs_mobject_map[] = {
-    { "ldap_autofs_map_master_name", "automountMapMasterName", SYSDB_AUTOFS_MAP_MASTER_NAME, NULL },
     { "ldap_autofs_map_object_class", "automountMap", SYSDB_AUTOFS_MAP_OC, NULL },
     { "ldap_autofs_map_name", "automountMapName", SYSDB_AUTOFS_MAP_NAME, NULL },
     SDAP_ATTR_MAP_TERMINATOR
 };
 
 struct sdap_attr_map ipa_autofs_entry_map[] = {
-    { "ldap_autofs_map_master_name", "automountMapMasterName", SYSDB_AUTOFS_MAP_MASTER_NAME, NULL },
     { "ldap_autofs_entry_object_class", "automount", SYSDB_AUTOFS_ENTRY_OC, NULL },
     { "ldap_autofs_entry_key", "automountKey", SYSDB_AUTOFS_ENTRY_KEY, NULL },
     { "ldap_autofs_entry_value", "automountInformation", SYSDB_AUTOFS_ENTRY_VALUE, NULL },
diff --git a/src/providers/ldap/ldap_opts.h b/src/providers/ldap/ldap_opts.h
index f4b572e687ce0227f124217f9f2b43b1c801e227..37612c31178dba6ada33b0fc4c73028bf28da467 100644
--- a/src/providers/ldap/ldap_opts.h
+++ b/src/providers/ldap/ldap_opts.h
@@ -346,14 +346,12 @@ struct sdap_attr_map rfc2307_autofs_entry_map[] = {
 };
 
 struct sdap_attr_map rfc2307bis_autofs_mobject_map[] = {
-    { "ldap_autofs_map_master_name", "automountMapMasterName", SYSDB_AUTOFS_MAP_MASTER_NAME, NULL },
     { "ldap_autofs_map_object_class", "automountMap", SYSDB_AUTOFS_MAP_OC, NULL },
     { "ldap_autofs_map_name", "automountMapName", SYSDB_AUTOFS_MAP_NAME, NULL },
     SDAP_ATTR_MAP_TERMINATOR
 };
 
 struct sdap_attr_map rfc2307bis_autofs_entry_map[] = {
-    { "ldap_autofs_map_master_name", "automountMapMasterName", SYSDB_AUTOFS_MAP_MASTER_NAME, NULL },
     { "ldap_autofs_entry_object_class", "automount", SYSDB_AUTOFS_ENTRY_OC, NULL },
     { "ldap_autofs_entry_key", "automountKey", SYSDB_AUTOFS_ENTRY_KEY, NULL },
     { "ldap_autofs_entry_value", "automountInformation", SYSDB_AUTOFS_ENTRY_VALUE, NULL },
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index e56690a10907ede5205ddb463ff6d4fc226145b3..7d2d3f534c04f4a21a920286fa17f199277999e9 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -328,7 +328,6 @@ enum sdap_service_attrs {
 };
 
 enum sdap_autofs_map_attrs {
-    SDAP_AT_AUTOFS_MAP_MASTER_NAME,
     SDAP_OC_AUTOFS_MAP,
     SDAP_AT_AUTOFS_MAP_NAME,
 
@@ -336,7 +335,6 @@ enum sdap_autofs_map_attrs {
 };
 
 enum sdap_autofs_entry_attrs {
-    _SDAP_AT_AUTOFS_MAP_MASTER_NAME,
     SDAP_OC_AUTOFS_ENTRY,
     SDAP_AT_AUTOFS_ENTRY_KEY,
     SDAP_AT_AUTOFS_ENTRY_VALUE,
-- 
1.8.2.1



More information about the sssd-devel mailing list