All of lore.kernel.org
 help / color / mirror / Atom feed
* Autofs dump map option
@ 2011-08-05  9:11 Ondrej Valousek
  2011-08-06  8:54 ` Ian Kent
  0 siblings, 1 reply; 4+ messages in thread
From: Ondrej Valousek @ 2011-08-05  9:11 UTC (permalink / raw)
  To: autofs, Ian Kent


[-- Attachment #1.1: Type: text/plain, Size: 1020 bytes --]

Hi Ian,

Thanks for looking after the bugs #538408 and #704416 for me, but I have one slight problem with it:
Automouter won't show any keys in my indirect NIS maps unless I specify "BROWSE_MODE=yes".
Maybe it is expected behaviour so I was thinking - can we always force browse_mode when dumping maps?

Sorry for spotting this too late.

Thanks,
Ondrej


The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited (S3 Group). Registered in Ireland no. 378073.
Registered Office: South County Business Park, Leopardstown, Dublin 18

[-- Attachment #1.2: Type: text/html, Size: 1355 bytes --]

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Autofs dump map option
  2011-08-05  9:11 Autofs dump map option Ondrej Valousek
@ 2011-08-06  8:54 ` Ian Kent
  2011-08-07  3:09   ` Ian Kent
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Kent @ 2011-08-06  8:54 UTC (permalink / raw)
  To: Ondrej Valousek; +Cc: autofs

On Fri, 2011-08-05 at 11:11 +0200, Ondrej Valousek wrote:
> Hi Ian,
> 
> Thanks for looking after the bugs #538408 and #704416 for me, but I
> have one slight problem with it:
> Automouter won't show any keys in my indirect NIS maps unless I
> specify "BROWSE_MODE=yes".
> Maybe it is expected behaviour so I was thinking - can we always force
> browse_mode when dumping maps?
> 
> Sorry for spotting this too late.

Ha, I'll have a look and see what we need to do.

I'm on leave between the 8th and 13th and will have limited internet
connectivity so I likely won't be able to do much until I get back.

> 
> Thanks,
> Ondrej
> 
> 
> ______________________________________________________________________
> The information contained in this e-mail and in any attachments is
> confidential and is designated solely for the attention of the
> intended recipient(s). If you are not an intended recipient, you must
> not use, disclose, copy, distribute or retain this e-mail or any part
> thereof. If you have received this e-mail in error, please notify the
> sender by return e-mail and delete all copies of this e-mail from your
> computer system(s). Please direct any additional queries to:
> communications@s3group.com. Thank You. Silicon and Software Systems
> Limited (S3 Group). Registered in Ireland no. 378073. Registered
> Office: South County Business Park, Leopardstown, Dublin 18 
> 
> ______________________________________________________________________
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Autofs dump map option
  2011-08-06  8:54 ` Ian Kent
@ 2011-08-07  3:09   ` Ian Kent
  2011-08-08  7:32     ` Ondrej Valousek
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Kent @ 2011-08-07  3:09 UTC (permalink / raw)
  To: Ondrej Valousek; +Cc: autofs

On Sat, 2011-08-06 at 16:54 +0800, Ian Kent wrote:
> On Fri, 2011-08-05 at 11:11 +0200, Ondrej Valousek wrote:
> > Hi Ian,
> > 
> > Thanks for looking after the bugs #538408 and #704416 for me, but I
> > have one slight problem with it:
> > Automouter won't show any keys in my indirect NIS maps unless I
> > specify "BROWSE_MODE=yes".
> > Maybe it is expected behaviour so I was thinking - can we always force
> > browse_mode when dumping maps?
> > 
> > Sorry for spotting this too late.
> 
> Ha, I'll have a look and see what we need to do.
> 
> I'm on leave between the 8th and 13th and will have limited internet
> connectivity so I likely won't be able to do much until I get back.

I think this patch should help.

autofs-5.0.6 - fix dumpmaps not reading maps

From: Ian Kent <raven@themaw.net>

The lookup modules won't read any indirect map entries (other than those
in a file map) unless unless the browse option is set. In order to list
the entries when tyhe dumpmap option is given the browse option needs to
be set.
---

 CHANGELOG    |    1 +
 lib/master.c |    9 +++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)


diff --git a/CHANGELOG b/CHANGELOG
index 884a9ae..946a196 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,7 @@
 - fix ipv6 name for lookup fix.
 - improve mount location error reporting.
 - fix paged query more results check.
+- fix dumpmaps not reading maps.
 
 28/06/2011 autofs-5.0.6
 -----------------------
diff --git a/lib/master.c b/lib/master.c
index 153a38b..6c89e1d 100644
--- a/lib/master.c
+++ b/lib/master.c
@@ -1283,6 +1283,15 @@ int master_show_mounts(struct master *master)
 		printf("\nMount point: %s\n", ap->path);
 		printf("\nsource(s):\n");
 
+		/*
+		 * Ensure we actually read indirect map entries so we can
+		 * list them. The map reads won't read any indirect map
+		 * entries (other than those in a file map) unless the
+		 * browse option is set.
+		 */
+		if (ap->type == LKP_INDIRECT)
+			ap->flags |= MOUNT_FLAG_GHOST;
+
 		/* Read the map content into the cache */
 		if (lookup_nss_read_map(ap, NULL, now))
 			lookup_prune_cache(ap, now);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Autofs dump map option
  2011-08-07  3:09   ` Ian Kent
@ 2011-08-08  7:32     ` Ondrej Valousek
  0 siblings, 0 replies; 4+ messages in thread
From: Ondrej Valousek @ 2011-08-08  7:32 UTC (permalink / raw)
  To: Ian Kent; +Cc: autofs


[-- Attachment #1.1: Type: text/plain, Size: 2679 bytes --]

Hi Ian,

Thanks for the quick help - it works, indeed.
Funny thing:

- The original patch I have submitted some time ago which was implementing the dump map option for the first time did not dump (without your 
patch) indirect maps either.
- Your "official" patch implementing the dump map option *did* list the ldap indirect maps even without this fix, it just did not print the 
indirect nis maps. Why did it work for ldap maps?

Anyway - it works fine now. Thanks,
Ondrej


> I think this patch should help.
>
> autofs-5.0.6 - fix dumpmaps not reading maps
>
> From: Ian Kent<raven@themaw.net>
>
> The lookup modules won't read any indirect map entries (other than those
> in a file map) unless unless the browse option is set. In order to list
> the entries when tyhe dumpmap option is given the browse option needs to
> be set.
> ---
>
>   CHANGELOG    |    1 +
>   lib/master.c |    9 +++++++++
>   2 files changed, 10 insertions(+), 0 deletions(-)
>
>
> diff --git a/CHANGELOG b/CHANGELOG
> index 884a9ae..946a196 100644
> --- a/CHANGELOG
> +++ b/CHANGELOG
> @@ -3,6 +3,7 @@
>   - fix ipv6 name for lookup fix.
>   - improve mount location error reporting.
>   - fix paged query more results check.
> +- fix dumpmaps not reading maps.
>
>   28/06/2011 autofs-5.0.6
>   -----------------------
> diff --git a/lib/master.c b/lib/master.c
> index 153a38b..6c89e1d 100644
> --- a/lib/master.c
> +++ b/lib/master.c
> @@ -1283,6 +1283,15 @@ int master_show_mounts(struct master *master)
>   		printf("\nMount point: %s\n", ap->path);
>   		printf("\nsource(s):\n");
>
> +		/*
> +		 * Ensure we actually read indirect map entries so we can
> +		 * list them. The map reads won't read any indirect map
> +		 * entries (other than those in a file map) unless the
> +		 * browse option is set.
> +		 */
> +		if (ap->type == LKP_INDIRECT)
> +			ap->flags |= MOUNT_FLAG_GHOST;
> +
>   		/* Read the map content into the cache */
>   		if (lookup_nss_read_map(ap, NULL, now))
>   			lookup_prune_cache(ap, now);
>
>
>



The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications@s3group.com.
Thank You.
Silicon and Software Systems Limited (S3 Group). Registered in Ireland no. 378073.
Registered Office: South County Business Park, Leopardstown, Dublin 18

[-- Attachment #1.2: Type: text/html, Size: 3152 bytes --]

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-08  7:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-05  9:11 Autofs dump map option Ondrej Valousek
2011-08-06  8:54 ` Ian Kent
2011-08-07  3:09   ` Ian Kent
2011-08-08  7:32     ` Ondrej Valousek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.