From: Stef Bon <stef@bononline.nl>
To: autofs@linux.kernel.org
Subject: Re: Testing the UID var.
Date: Fri, 28 Mar 2008 12:50:28 +0100 [thread overview]
Message-ID: <47ECDB84.5010301@bononline.nl> (raw)
In-Reply-To: <47ECB844.8080405@bononline.nl>
Stef Bon wrote:
> ---------
>
> #!/bin/bash
>
> key="$1"
> opts='-fstype=smbtest,auid=$UID'
>
> SMBCLIENT=/usr/bin/smbclient
>
> [ -x $SMBCLIENT ] || exit 1
>
> # echo $key
>
> $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 }; sub(/ /, "\\ ",
> $2); print " \\\n\t /" $2, "://" key "/" $2 }
> END { if (!first) print "\n"; else exit 1 }
> '
> --------
>
> Note:
> a. I've made this script I little bit simpler by letting it not search
> the smbclient script.
> b. the fstype is not smb but smbtest. I've created a wrapper
> mount.smbtest which will filter the parameter
> auid out. This value can be used for permissions and authentification
> c. the extra opion auid (activating user) which will be assigned when
> the automounter does the mount, not when running this script. That's why
> there are single quotes around it.
>
I would like to add that the mount will use the userid of the activating
user, but that the smbclient does a guest
lookup. It is with this construction not possible to make use of this
"activating userid" in auto.smb. In general I find it very difficult to
figure out a construction which does support mounting for every ordinary
user which:
- give enough permissions so that user one cannot access other users
mountpoint (if more than one user is logged in)
- use the activating user in the mount program as the lookup program as well
Stef Bon
prev parent reply other threads:[~2008-03-28 11:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 9:20 Testing the UID var Stef Bon
2008-03-28 11:50 ` Stef Bon [this message]
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=47ECDB84.5010301@bononline.nl \
--to=stef@bononline.nl \
--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.