From b1768565c1b683c94a4fb4138bafbde816fc0216 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 22 Feb 2016 16:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=20=20=20=20=201.=20?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=97=B6=20=E9=AA=8C=E8=AF=81=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20=20/usr/sbin/visudo=20-c=20=20=20=20=202.=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B3=BB=E7=BB=9F=E7=94=A8=E6=88=B7=E7=9A=84?= =?UTF-8?q?key=20=E8=AE=A4=E8=AF=81=E6=9B=B4=E6=94=B9=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=20RSA|DSA=20=20=20=20=203.=20web=20terminal=20=E8=A1=8C?= =?UTF-8?q?=E6=95=B0=20-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/jlog/web_terminal.html | 2 +- templates/jperm/perm_role_add.html | 4 ++-- templates/jperm/role_sudo.j2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/jlog/web_terminal.html b/templates/jlog/web_terminal.html index 5589b59c3..420249a10 100644 --- a/templates/jlog/web_terminal.html +++ b/templates/jlog/web_terminal.html @@ -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}; diff --git a/templates/jperm/perm_role_add.html b/templates/jperm/perm_role_add.html index 18df339e9..59ec3b3b6 100644 --- a/templates/jperm/perm_role_add.html +++ b/templates/jperm/perm_role_add.html @@ -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) { diff --git a/templates/jperm/role_sudo.j2 b/templates/jperm/role_sudo.j2 index 642a30a66..a37276771 100644 --- a/templates/jperm/role_sudo.j2 +++ b/templates/jperm/role_sudo.j2 @@ -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