Re: Patch: Prompt for required password when mounting a drive



On Tue, 2005-08-09 at 01:37 +0000, Nate Nielsen wrote:
> When mounting a drive (listed in /etc/fstab) such as a an SMB, or
> encrypted loop mount the 'mount' command will prompt for a password.
> However when mounting that drive through gnome-vfs, there's nowhere for
> the user to enter the required password.
> 
> This patch adds functionality to gnome-vfs so that when the 'mount'
> command requests a password it prompts using a gnome-vfs-auth dialog.
> 
> Patch: http://bugzilla.gnome.org/attachment.cgi?id=50425
> Bug: http://bugzilla.gnome.org/show_bug.cgi?id=157650
> 
> The 'mount' command prompts for passwords on /dev/tty. The patch opens a
> tty and forks the 'mount' command with that as its stdin and stdout. It
> then waits for a 'password:' string, etc...
> 
> This is a rough and incomplete patch, but I want to make sure this makes
> sense and I haven't missed anything obvious.

I think there is one problem, locale. These days we run the mount
command in the same locale as the invoking app, since pmount-like
systems can bring up real UI to help mount the filesystem, and we want
that UI to be in the same language as the everything else. However, this
means mount stdout output will be translated too, and "password:" string
detection can fail.

Maybe this can be done in a better way within the pmount system? I don't
really know well enough how that works, so I can't say definately. Maybe
the hal/pmount people can tell. davidz?

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a gun-slinging arachnophobic cop on his last day in the job. She's a 
man-hating gold-digging advertising executive with someone else's memories. 
They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]