mirror of https://github.com/jumpserver/jumpserver
1. 推送时 验证改为 /usr/sbin/visudo -c 2. 添加系统用户的key 认证更改 支持 RSA|DSA 3. web terminal 行数 -1pull/71/head
parent
7323b72c4b
commit
b1768565c1
|
@ -117,7 +117,7 @@
|
|||
$('.terminal').css('width', window.innerWidth-25);
|
||||
console.log(window.innerWidth);
|
||||
console.log(window.innerWidth-10);
|
||||
var rows = Math.floor(window.innerHeight/rowHeight) - 1;
|
||||
var rows = Math.floor(window.innerHeight/rowHeight) - 2;
|
||||
var cols = Math.floor(window.innerWidth/colWidth) - 1;
|
||||
|
||||
return {rows: rows, cols: cols};
|
||||
|
|
|
@ -93,7 +93,7 @@ $('#roleForm').validator({
|
|||
theme: "yellow_right_effect",
|
||||
rules: {
|
||||
check_name: [/(?!^root$)^[\w.]{2,20}$/i, '大小写字母数字和下划线小数点,2-20位,并且非root'],
|
||||
check_begin: [/^[\-]+BEGIN RSA PRIVATE KEY[\-]+/gm, 'RSA Key填写有误,请检查'],
|
||||
check_begin: [/^[\-]+BEGIN R|DSA PRIVATE KEY[\-]+/gm, 'RSA|DSA Key填写有误,请检查']
|
||||
|
||||
},
|
||||
|
||||
|
@ -108,7 +108,7 @@ $('#roleForm').validator({
|
|||
rule: "check_begin",
|
||||
ok: "",
|
||||
empty: true
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
valid: function(form) {
|
||||
|
|
|
@ -36,7 +36,7 @@ add_role_chosen() {
|
|||
|
||||
|
||||
check_syntax(){
|
||||
visudo -c -f $1
|
||||
/usr/sbin/visudo -c -f $1
|
||||
}
|
||||
|
||||
cp $real_file $tmp_file && add_cmd_alias $tmp_file && add_role_chosen $tmp_file || exit 1
|
||||
|
|
Loading…
Reference in New Issue