From: "Arthur Korn" <arthur@korn.ch>
To: submit@bugs.debian.org
Subject: Bug#279561: smbfs multimount broken
Date: Wed, 3 Nov 2004 20:16:03 +0100 [thread overview]
Message-ID: <20041103191603.GA6640@turing> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 3285 bytes --]
Package: autofs
Version: 4.1.3-4
Severity: minor
Tags: patch
You should file all bugs to the BTS, since else I have to ... or
I'll most probably forget about it.
Maybe it could be changed to detect double slashes "//"? This
would be compatible with the old behaviour (which is as SUN does
I suppose), but admittedly limited to SMBfs.
ciao, 2ri
----- Forwarded message from Elmar Pruesse <elmar@pruesse.net> -----
Date: Wed, 03 Nov 2004 16:51:08 +0100
To: arthur@debian.org
From: Elmar Pruesse <elmar@pruesse.net>
Subject: debian, autofs 4.1.3-4, smbfs multimount broken, patch
hi Arthur,
I hope you don't mind me mailing you directly instead of fileing a bug
report, etc.
The the code in parse_sun.c that "tokenizes" multimount lines got broken
when the possibilty to use server names containing whitespace was added.
It assumes that whitespace followed by a "/" indicates a new mountpoint.
Since smbfs mounts also start with a "/", this makes it impossible to
use smbfs in multimounts. (Escaping doesn't work either, tried that).
I propose (patch attached) changing the syntax of multimount smbfs
mountpoints to match those of ordinary smbfs mounts.
Ordninary smbfsmount:
/mysmbmount -fstype=smbfs ://smbserver/dir
Multimount in version three:
/multimount -fstype=smbfs /one //smbserver/one /two //smbserver/two
Proposed syntax:
/multimount -fstype=smbfs /one ://smbserver/one /two ://smbserver/two
It's the shortest patch I could come up with. The syntax change is
minimal, resolves an inconsistency and the way it used to work is broken
anyway.
In case anyone is interested I also attached a modified version of the
auto.net example which uses smblclient instead of showmount and can be
used to dynamically access public smb shares.
By the way: Is there any reason, apart from noone having written it, why
there is no support for ghosting from program maps?
regards,
Elmar
diff -rNu autofs-4.1.3.orig/modules/parse_sun.c autofs-4.1.3/modules/parse_sun.c
--- autofs-4.1.3.orig/modules/parse_sun.c 2004-10-03 17:43:57.000000000 +0200
+++ autofs-4.1.3/modules/parse_sun.c 2004-10-03 17:38:50.000000000 +0200
@@ -618,7 +618,7 @@
{
struct parse_context *ctxt = (struct parse_context *) context;
char *pmapent, *options;
- const char *p, *q;
+ const char *p, *q, *r;
int mapent_len, rv;
int optlen;
@@ -716,9 +716,12 @@
while (*q && *q != '/') {
l = chunklen(q, 1);
q += l;
+ r = q;
q = skipspace(q);
}
- l = q - p;
+ if (*p == ':')
+ p++; /* Sun escape for entries starting with / */
+ l = r - p;
loc = dequote(p, l);
loclen = strlen(loc);
#!/bin/sh
key="$1"
opts="-fstype=smbfs"
for SMBCLIENT in /{,usr/}{,s}bin/smbclient; do [ -x $SMBCLIENT ] && break; done
[ -x $SMBCLIENT ] || exit 1
$SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- '
BEGIN { ORS=""; first=1 }
/Disk/ { if (first) { print opts; first=0 }; print " \\\n\t /" $2, "://" key "/" $2 }
END { if (!first) print "\n"; else exit 1 }
'
----- End forwarded message -----
--
Secure email, spread GPG, clearsign all mail. http://www.gnupg.org
.
I didn't know it was impossible when I did it.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
reply other threads:[~2004-11-03 19:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20041103191603.GA6640@turing \
--to=arthur@korn.ch \
--cc=279561@bugs.debian.org \
--cc=submit@bugs.debian.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.