forked from x/ContextOS
fix right bug
Change-Id: Ib5120b557c8426cd82b7dcada6dc1a177017b615
This commit is contained in:
parent
75e93fc315
commit
d64b938d61
1
Makefile
1
Makefile
@ -27,6 +27,7 @@ shy:
|
|||||||
cp -r src/examples ~/context/src/
|
cp -r src/examples ~/context/src/
|
||||||
cp -r usr/template ~/context/usr/
|
cp -r usr/template ~/context/usr/
|
||||||
cp -r usr/librarys/ ~/context/usr/
|
cp -r usr/librarys/ ~/context/usr/
|
||||||
|
cp -r bin ~/context
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
[ -e tar ] || mkdir tar
|
[ -e tar ] || mkdir tar
|
||||||
|
@ -279,7 +279,7 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心",
|
|||||||
m.Append("user.name", m.Conf("runtime", "user.name"))
|
m.Append("user.name", m.Conf("runtime", "user.name"))
|
||||||
m.Append("user.route", kit.Select(m.Conf("runtime", "node.route"), m.Conf("runtime", "user.route")))
|
m.Append("user.route", kit.Select(m.Conf("runtime", "node.route"), m.Conf("runtime", "user.route")))
|
||||||
} else { // 代理验证
|
} else { // 代理验证
|
||||||
if arg[2] == m.Conf("runtime", "node.route") || m.Cmds("aaa.auth", "proxy", arg[2]) {
|
if arg[2] == m.Conf("runtime", "node.route") || m.Cmds("aaa.auth", "proxy", arg[2], "session") {
|
||||||
m.Echo(m.Cmdx("aaa.rsa", "sign", m.Conf("runtime", "user.key"), arg[3]))
|
m.Echo(m.Cmdx("aaa.rsa", "sign", m.Conf("runtime", "user.key"), arg[3]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -395,6 +395,7 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心",
|
|||||||
// 代理验签
|
// 代理验签
|
||||||
if !m.Options("user.cert") || !m.Options("user.sign") || !m.Cmds("aaa.rsa", "verify", m.Option("user.cert"), m.Option("user.sign"), hash) {
|
if !m.Options("user.cert") || !m.Options("user.sign") || !m.Cmds("aaa.rsa", "verify", m.Option("user.cert"), m.Option("user.sign"), hash) {
|
||||||
m.Log("warn", "user error")
|
m.Log("warn", "user error")
|
||||||
|
m.Echo("no right of %s", m.Option("text.route"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 创建会话
|
// 创建会话
|
||||||
|
@ -259,6 +259,9 @@ var Index = &ctx.Context{Name: "tcp", Help: "网络中心",
|
|||||||
if strings.Contains(ip[0], ":") || len(ip) == 0 {
|
if strings.Contains(ip[0], ":") || len(ip) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if len(v.HardwareAddr.String()) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
m.Add("append", "index", v.Index)
|
m.Add("append", "index", v.Index)
|
||||||
m.Add("append", "name", v.Name)
|
m.Add("append", "name", v.Name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user