Bug 10054 - mount.cifs relies on hardcoded systemd-ask-password location
mount.cifs relies on hardcoded systemd-ask-password location
Product: CifsVFS
Classification: Unclassified
Component: user space tools
All All
: P5 normal
: ---
Assigned To: Jeff Layton
Depends on:
  Show dependency treegraph
Reported: 2013-07-29 21:00 UTC by Michał Górny
Modified: 2013-07-31 14:42 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny 2013-07-29 21:00:53 UTC
The current mount.cifs code does the following [1]:

  if (asprintf(&cmd, "/bin/systemd-ask-password \"%s\"", prompt) >= 0) {
    ask_pass_fp = popen (cmd, "re");

However, this doesn't work when systemd-ask-password isn't installed in /bin (and e.g. sits in /usr/bin).

I suggest simply using 'systemd-ask-password' since all relevant paths should be in $PATH, and popen() executes the command using the shell, therefore being able to make a $PATH lookup.

Comment 1 Jeff Layton 2013-07-30 01:11:27 UTC
Well spotted. I agree wrt to the path.

Care to propose a patch on linux-cifs mailing list?
Comment 2 Michał Górny 2013-07-30 07:59:15 UTC
Here you are: http://thread.gmane.org/gmane.linux.kernel.cifs/8697
Comment 3 Jeff Layton 2013-07-31 14:42:28 UTC
Merged in mainline cifs-utils repo. It should make 6.2, but there's no ETA for that just yet...