Re: [PATCH] mount.cifs: Use systemd's mechanism for getting password, if present

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 17 Jul 2012 19:28:09 +0530
Ankit Jain <jankit@xxxxxxxx> wrote:

> Hi Jeff,
> 
> On 06/26/2012 04:58 PM, Jeff Layton wrote:
> [snip]
> > It does, but we do have to concern ourselves with older versions of
> > systemd that might not, and with distros that might use systemd but not
> > add the tool (consider embedded distros). I think we'll need a
> > mechanism to fall back to the legacy password mechanism.
> 
> I'm guessing that by "legacy" you mean get_pass(..)? But on a regular
> systemd install, it takes over stdin/stdout, and the prompt won't come
> up on a terminal. But I don't know how it is set up on the other
> scenarios you mentioned. So, I'll do that but you will have to test it
> ;) I tried using /dev/tty, but in/out are redirected AFAIU, so, this
> didn't help.
> 

Well...that's the case at boot time, when you're mounting from (for
instance) fstab. What about when when someone issues mount "manually"
from a terminal? If systemd-ask-password isn't present at that point or
wouldn't run for some reason then you were sort of screwed with the
earlier patch.

> > Also, a way to disable this at compile-time would nice. Maybe a
> > --enable-systemd autoconf option would be good that defaults to "on"
> > with a simple test to see if the build machine is running systemd?
> 
> Sure, autoconf option sounds good. But do we want to check for systemd
> running on the *build* machine (and choose default value for
> --enable-systemd accordingly)? Systemd running or not sounds like a
> runtime behavior, and we fall back to getpass anyway. I haven't added
> this in the attached patch, but if you feel that this makes sense, then
> I can add it.
> 

Fair enough. If you're falling back to getpass anyway, then a simple
autoconf switch to disable systemd support should be fine.

Patch looks good to me. I'll plan to merge it in the next day or two
unless there are objections.

Thanks!
- -- 
Jeff Layton <jlayton@xxxxxxxxx>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIcBAEBAgAGBQJQBpPMAAoJEAAOaEEZVoIVqz8P/1+gaAvykTUhnh0qPl+SDp5X
T7OqcUzY+kUSu+vQ4hqjRpLfoWRVkuP0ErKiAUsqthHGPMCsdsBluBrPO8SrEB2b
AJWwHLx28fZxFSQEbDRO4U3dnwDp7mJDmjywUn/mTwRbq2/GXpgI9j+FEOhe5rwc
FTYoggEGaymrtyDy0SsGva77N3kfaSqynNX376zTxgCnBCgvYiWbALvQnKwM0fam
74U1BKVNh7JjhSoqru6fTpNq+XphNLlXVICVt7OJOqUoGEB1hIGV0bxvy/sg2RDH
i3y/xi9JQCVkz1aonqVgTAkJSD5cxTW8/DtQ8b/kPCWOrxEQlrmHQpzYiR8EsyNv
zJMZDfUFMr1j7b6aU2Umbujvl+FQmfBS3Ey+UklZzNHhVXULzRy8EQhNEy4BqSS1
g5WRHYB6kdKo1NKnT2fKBVagLQLMFxjAqjUUHCFhDvegeMoHUCOGrcjdW/0c6p31
XnmBap5DKingv+L7Bdmanp9g00jOy5QPF8kApOmIrm09HYl1k/24aRhK0YsbN6fr
v/jrYkZeruHdWpe/jMP3szcYcIzBkazDQMSgqq89JhXhUBkO1GR5N1qcWexw/eem
MRjGoSE4FWqAwnaIMohBaia89B2sw+QrAjaYivIrCaIBxc71Ui2OfCU6w99zhD78
YqaNhRuCwNdIy6bHkDjX
=tJ4F
-----END PGP SIGNATURE-----
ÿôèº{.nÇ+?·?®?­?+%?Ëÿ±éݶ¥?wÿº{.nÇ+?·¥?{±ýÈ?³ø§¶?¡Ü¨}©?²Æ zÚ&j:+v?¨þø¯ù®w¥þ?à2?Þ?¨è­Ú&¢)ß¡«a¶Úÿÿûàz¿äz¹Þ?ú+?ù???Ý¢jÿ?wèþf



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux