[linux-cifs-client] mount.cifs getting password from stdin

Steven French sfrench at us.ibm.com
Thu May 13 19:40:12 GMT 2004


Instead of adding the -S mount option to mount.cifs parsing (to accept 
password from stdin, e.g. in the case of pam_mount), I noticed that it is 
possible already in the mount.cifs code to take a password from a file 
descriptor (which can be set to zero for stdin) by exporting environment 
variable "PASSWD_FD" as e.g. equal to "0"

I noticed the ncpfs man page says it accepts a mount option "pass-fd=0" 
which I could also do to make sending the password via a filedescriptor 
instead of on the command line, making it even easier, I an unsure whether 
that longer form mount option (only) is better than adding a short one 
char new mount option that only handles stdin (not other file descriptors) 
especially since some might confuse the suggested one, -S, with a meaning 
of "target server" (syntax that some of the Samba tools use) which could 
cause usability problems.   I don't want to use something that begins with 
"pass" though (so it does not cause conflicts with the parsing for 
password itself) - so would like to use "pw-fd" or someting similar as the 
new option


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list