-
Notifications
You must be signed in to change notification settings - Fork 268
/
Copy path00-passwd.patch
36 lines (34 loc) · 1008 Bytes
/
00-passwd.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff --git a/sshfs.c b/sshfs.c
index ff40c81..5c8d4b8 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -365,7 +365,7 @@ struct sshfs {
unsigned outstanding_len;
unsigned max_outstanding_len;
pthread_cond_t outstanding_cond;
- int password_stdin;
+ int password_stdin, password_stdout;
char *password;
int ext_posix_rename;
int ext_statvfs;
@@ -496,6 +496,7 @@ static struct fuse_opt sshfs_opts[] = {
SSHFS_OPT("follow_symlinks", follow_symlinks, 1),
SSHFS_OPT("no_check_root", no_check_root, 1),
SSHFS_OPT("password_stdin", password_stdin, 1),
+ SSHFS_OPT("password_stdout", password_stdout, 1),
SSHFS_OPT("delay_connect", delay_connect, 1),
SSHFS_OPT("slave", passive, 1),
SSHFS_OPT("passive", passive, 1),
@@ -1691,6 +1692,14 @@ static int sftp_init(struct conn *conn)
out:
buf_free(&buf);
+
+ if (sshfs.password_stdout)
+ {
+ puts(0 == res ? "OK" : "KO");
+ fclose(stdout);
+ //stdout = freopen("/dev/null", "w", stdout);
+ }
+
return res;
}