diff --git a/base/aaa/user.go b/base/aaa/user.go index f0a2af56..fb8c8bca 100644 --- a/base/aaa/user.go +++ b/base/aaa/user.go @@ -45,7 +45,7 @@ func _user_search(m *ice.Message, name, text string) { func UserRoot(m *ice.Message, arg ...string) { // password username userrole userrole := kit.Select(ROOT, arg, 2) - username := kit.Select(ice.Info.UserName, arg, 1) + username := kit.Select(kit.Select("shy", ice.Info.UserName), arg, 1) m.Option(ice.MSG_USERROLE, userrole) m.Option(ice.MSG_USERNAME, username) diff --git a/base/cli/system.go b/base/cli/system.go index 4cb58349..4075c952 100644 --- a/base/cli/system.go +++ b/base/cli/system.go @@ -35,7 +35,7 @@ func _system_cmd(m *ice.Message, arg ...string) *exec.Cmd { if file := _system_find(m, arg[0], strings.Split(env[i+1], ice.DF)...); file != "" { m.Debug("cmd: %v", file) cmd.Path = file - break + continue } } } @@ -45,7 +45,6 @@ func _system_cmd(m *ice.Message, arg ...string) *exec.Cmd { if file := _system_find(m, arg[0], strings.Split(string(buf), ice.NL)...); file != "" { // m.Debug("cmd: %v", file) // cmd.Path = file - // break } } m.Debug("cmd: %v", cmd.Path) diff --git a/base/web/serve.go b/base/web/serve.go index bb89e99e..6a58c14a 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -180,6 +180,7 @@ func _serve_login(msg *ice.Message, key string, cmds []string, w http.ResponseWr if msg.Option(ice.MSG_USERNAME) == "" && msg.Config(tcp.LOCALHOST) == ice.TRUE && tcp.IsLocalHost(msg, msg.Option(ice.MSG_USERIP)) { aaa.UserRoot(msg) // 主机认证 + msg.Debug("what %v", msg.FormatMeta()) } if msg.Option(ice.MSG_USERNAME) == "" && msg.Option(SHARE) != "" {