All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gordon Lack" <gml4410@ggr.co.uk>
To: autofs@linux.kernel.org
Subject: autofsv5 enhancement - map names in /proc/mounts
Date: Fri, 10 Nov 2006 12:05:51 +0000	[thread overview]
Message-ID: <45546B1F.5030306@ggr.co.uk> (raw)
In-Reply-To: <4554696C.5030400@ggr.co.uk>

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

    The current entry which ends up in /proc/mounts for autofs entries 
looks like:

  automount /home autofs rw,fd=170,......

Other autofs implementations (Solaris, Irix, OSF1, ...) have the 
map-name which is being used as the first token.

The attached patch to daemon/indirect.c adds this (for indirect maps - I 
don't have any other kind...).

The result is lines like:

  auto.home /home autofs rw,fd=170,......


This does means that kernel mount entries (eg: those added under 
SElinux?) need to ignore the device name passed in, but they should be 
doing that for autofs file systems anyway.

NOTE: The ap->entry->first->argv[0] seems a contrived way to get a map 
name, but is all I could see looking through the code.

[-- Attachment #2: indirect.c.patch --]
[-- Type: text/plain, Size: 513 bytes --]

--- daemon/indirect.c.orig	2006-11-10 10:29:18.716266000 +0000
+++ daemon/indirect.c	2006-11-10 10:06:21.726654000 +0000
@@ -183,7 +183,11 @@
 		ap->dir_created = 1;
 	}
 
+/* GML - Enhancement
+ *   Put map name into /proc/mounts, as Solaris, Irix, OSF1, do
 	ret = mount("automount", ap->path, "autofs", MS_MGC_VAL, options);
+ */
+	ret = mount(ap->entry->first->argv[0], ap->path, "autofs", MS_MGC_VAL, options);
 	if (ret) {
 		crit(ap->logopt, "failed to mount autofs path %s", ap->path);
 		goto out_rmdir;

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

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

  reply	other threads:[~2006-11-10 12:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-07 15:02 -hosts and -null enabling for autofs v4.1.x Gordon Lack
2006-07-13 13:10 ` Ian Kent
2006-07-13 13:42 ` Jeff Moyer
2006-07-14 11:33   ` Gordon Lack
2006-07-14 13:31     ` Jeff Moyer
2006-07-14 15:58       ` Gordon Lack
2006-08-07  6:56         ` Ian Kent
2006-08-22 14:03 ` Bug (and patch) in autofs init.d script (v4.1.4) Gordon Lack
2006-08-22 14:18 ` Enhancement patch for autofs v4.1.4 init.d script Gordon Lack
2006-09-08 11:31   ` Bug in autofs v4.1.4 init.d script (and fix) Gordon Lack
2006-09-12 12:58     ` Bug in autofs v4.1.4 init.d script for reload " Gordon Lack
2006-09-13  9:42       ` Gordon Lack
2006-11-10 11:58 ` autofsv5 bug. Non-existent dirs get "mounted"! Gordon Lack
2006-11-10 12:05   ` Gordon Lack [this message]
2006-11-10 17:33     ` autofsv5 - mouting files (not dirs) Gordon Lack
2006-11-11  2:58       ` Ian Kent
2006-11-11  2:53     ` autofsv5 enhancement - map names in /proc/mounts Ian Kent
2006-11-13 10:09       ` Gordon Lack
2006-11-13 15:44         ` Ian Kent
2006-11-13 16:58           ` Gordon Lack
2006-11-14  2:00             ` Ian Kent
2006-11-14 10:00               ` Gordon Lack
2006-11-14 11:42                 ` Ian Kent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45546B1F.5030306@ggr.co.uk \
    --to=gml4410@ggr.co.uk \
    --cc=autofs@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.