Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
b32f4298
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b32f4298
编写于
9月 21, 2007
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added a no_tty param to remote URIs to stop SSH prompting for password
上级
6f44e36e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
45 addition
and
2 deletion
+45
-2
ChangeLog
ChangeLog
+6
-0
docs/libvir.html
docs/libvir.html
+14
-0
docs/remote.html
docs/remote.html
+10
-0
src/remote_internal.c
src/remote_internal.c
+15
-2
未找到文件。
ChangeLog
浏览文件 @
b32f4298
Fri Sep 21 16:22:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/remote_internal.c: Add a no_tty flag to stop SSH prompting
for passwords on console
* docs/libvir.html, docs/remote.html: Document no_tty flag
Fri Sep 21 15:06:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
Fri Sep 21 15:06:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* acinclude.m4: Check all compiler flags link successfully
* acinclude.m4: Check all compiler flags link successfully
...
...
docs/libvir.html
浏览文件 @
b32f4298
...
@@ -1762,6 +1762,20 @@ Note that parameter values must be
...
@@ -1762,6 +1762,20 @@ Note that parameter values must be
<td>
Example:
<code>
no_verify=1
</code>
</td>
<td>
Example:
<code>
no_verify=1
</code>
</td>
</tr>
</tr>
<tr>
<td>
<code>
no_tty
</code>
</td>
<td>
ssh
</td>
<td>
If set to a non-zero value, this stops ssh from asking for
a password if it cannot log in to the remote machine automatically
(eg. using ssh-agent etc.). Use this when you don't have access
to a terminal - for example in graphical programs which use libvirt.
</td>
</tr>
<tr>
<td
colspan=
"2"
></td>
<td>
Example:
<code>
no_tty=1
</code>
</td>
</tr>
</table>
</table>
<h3><a
name=
"Remote_certificates"
>
Generating TLS certificates
</a></h3>
<h3><a
name=
"Remote_certificates"
>
Generating TLS certificates
</a></h3>
...
...
docs/remote.html
浏览文件 @
b32f4298
...
@@ -195,6 +195,16 @@ Note that parameter values must be
...
@@ -195,6 +195,16 @@ Note that parameter values must be
</td>
</td>
</tr><tr><td
colspan=
"2"
></td>
</tr><tr><td
colspan=
"2"
></td>
<td>
Example:
<code>
no_verify=1
</code>
</td>
<td>
Example:
<code>
no_verify=1
</code>
</td>
</tr><tr><td>
<code>
no_tty
</code>
</td>
<td>
ssh
</td>
<td>
If set to a non-zero value, this stops ssh from asking for
a password if it cannot log in to the remote machine automatically
(eg. using ssh-agent etc.). Use this when you don't have access
to a terminal - for example in graphical programs which use libvirt.
</td>
</tr><tr><td
colspan=
"2"
></td>
<td>
Example:
<code>
no_tty=1
</code>
</td>
</tr></table><h3><a
name=
"Remote_certificates"
id=
"Remote_certificates"
>
Generating TLS certificates
</a></h3><h4><a
name=
"Remote_PKI"
id=
"Remote_PKI"
>
Public Key Infrastructure set up
</a></h4><p>
</tr></table><h3><a
name=
"Remote_certificates"
id=
"Remote_certificates"
>
Generating TLS certificates
</a></h3><h4><a
name=
"Remote_PKI"
id=
"Remote_PKI"
>
Public Key Infrastructure set up
</a></h4><p>
If you are unsure how to create TLS certificates, skip to the
If you are unsure how to create TLS certificates, skip to the
next section.
next section.
...
...
src/remote_internal.c
浏览文件 @
b32f4298
...
@@ -291,7 +291,7 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
...
@@ -291,7 +291,7 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
*/
*/
char
*
name
=
0
,
*
command
=
0
,
*
sockname
=
0
,
*
netcat
=
0
,
*
username
=
0
;
char
*
name
=
0
,
*
command
=
0
,
*
sockname
=
0
,
*
netcat
=
0
,
*
username
=
0
;
char
*
server
=
0
,
*
port
=
0
;
char
*
server
=
0
,
*
port
=
0
;
int
no_verify
=
0
;
int
no_verify
=
0
,
no_tty
=
0
;
char
**
cmd_argv
=
0
;
char
**
cmd_argv
=
0
;
/* Return code from this function, and the private data. */
/* Return code from this function, and the private data. */
...
@@ -356,6 +356,9 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
...
@@ -356,6 +356,9 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
}
else
if
(
strcasecmp
(
var
->
name
,
"no_verify"
)
==
0
)
{
}
else
if
(
strcasecmp
(
var
->
name
,
"no_verify"
)
==
0
)
{
no_verify
=
atoi
(
var
->
value
);
no_verify
=
atoi
(
var
->
value
);
var
->
ignore
=
1
;
var
->
ignore
=
1
;
}
else
if
(
strcasecmp
(
var
->
name
,
"no_tty"
)
==
0
)
{
no_tty
=
atoi
(
var
->
value
);
var
->
ignore
=
1
;
}
}
#if DEBUG
#if DEBUG
else
else
...
@@ -554,7 +557,10 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
...
@@ -554,7 +557,10 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
}
}
case
trans_ssh
:
{
case
trans_ssh
:
{
int
j
,
nr_args
=
username
?
10
:
8
;
int
j
,
nr_args
=
8
;
if
(
username
)
nr_args
+=
2
;
/* For -l username */
if
(
no_tty
)
nr_args
+=
5
;
/* For -T -o BatchMode=yes -e none */
command
=
command
?
:
strdup
(
"ssh"
);
command
=
command
?
:
strdup
(
"ssh"
);
...
@@ -569,6 +575,13 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
...
@@ -569,6 +575,13 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
cmd_argv
[
j
++
]
=
strdup
(
"-l"
);
cmd_argv
[
j
++
]
=
strdup
(
"-l"
);
cmd_argv
[
j
++
]
=
strdup
(
username
);
cmd_argv
[
j
++
]
=
strdup
(
username
);
}
}
if
(
no_tty
)
{
cmd_argv
[
j
++
]
=
strdup
(
"-T"
);
cmd_argv
[
j
++
]
=
strdup
(
"-o"
);
cmd_argv
[
j
++
]
=
strdup
(
"BatchMode=yes"
);
cmd_argv
[
j
++
]
=
strdup
(
"-e"
);
cmd_argv
[
j
++
]
=
strdup
(
"none"
);
}
cmd_argv
[
j
++
]
=
strdup
(
server
);
cmd_argv
[
j
++
]
=
strdup
(
server
);
cmd_argv
[
j
++
]
=
strdup
(
netcat
?
netcat
:
"nc"
);
cmd_argv
[
j
++
]
=
strdup
(
netcat
?
netcat
:
"nc"
);
cmd_argv
[
j
++
]
=
strdup
(
"-U"
);
cmd_argv
[
j
++
]
=
strdup
(
"-U"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录