Skip to content

Commit

Permalink
Merge branch 'master' into branded-kopano
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Hirt authored Oct 19, 2020
2 parents 175b90b + eb31510 commit b8f64ce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Bugfix - Add missing env vars to docker compose: [#392](https://github.com/owncloud/ocis/pull/392)
* Bugfix - Don't enforce empty external apps slice: [#473](https://github.com/owncloud/ocis/pull/473)
* Bugfix - Fix button layout after phoenix update: [#625](https://github.com/owncloud/ocis/pull/625)
* Bugfix - Use micro default client: [#718](https://github.com/owncloud/ocis/pull/718)
* Bugfix - Fix director selection in proxy: [#521](https://github.com/owncloud/ocis/pull/521)
* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#416](https://github.com/owncloud/ocis/pull/416)
* Change - Accounts UI shows message when no permissions: [#656](https://github.com/owncloud/ocis/pull/656)
Expand Down Expand Up @@ -72,6 +73,15 @@

https://github.com/owncloud/ocis/pull/625

* Bugfix - Use micro default client: [#718](https://github.com/owncloud/ocis/pull/718)

Tags: glauth

We found a file descriptor leak in the glauth connections to the accounts service. Fixed it by
using the micro default client.

https://github.com/owncloud/ocis/pull/718

* Bugfix - Fix director selection in proxy: [#521](https://github.com/owncloud/ocis/pull/521)

Tags: proxy
Expand Down
7 changes: 7 additions & 0 deletions changelog/unreleased/glauth-micro-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Use micro default client

Tags: glauth

We found a file descriptor leak in the glauth connections to the accounts service. Fixed it by using the micro default client.

https://github.com/owncloud/ocis/pull/718
25 changes: 4 additions & 21 deletions glauth/pkg/command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
glauthcfg "github.com/glauth/glauth/pkg/config"

"github.com/micro/cli/v2"
"github.com/micro/go-micro/v2"
"github.com/micro/go-micro/v2/client"
"github.com/oklog/run"
openzipkin "github.com/openzipkin/zipkin-go"
Expand Down Expand Up @@ -192,11 +191,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}

as, gs, err := getAccountsServices()
if err != nil {
return err
}

as, gs := getAccountsServices()
server, err := glauth.Server(
glauth.AccountsService(as),
glauth.GroupsService(gs),
Expand Down Expand Up @@ -312,19 +307,7 @@ func Server(cfg *config.Config) *cli.Command {
}

// getAccountsServices returns an ocis-accounts service
func getAccountsServices() (accounts.AccountsService, accounts.GroupsService, error) {
service := micro.NewService()

// parse command line flags
service.Init()

err := service.Client().Init(
client.ContentType("application/json"),
)
if err != nil {
return nil, nil, err
}
return accounts.NewAccountsService("com.owncloud.api.accounts", service.Client()),
accounts.NewGroupsService("com.owncloud.api.accounts", service.Client()),
nil
func getAccountsServices() (accounts.AccountsService, accounts.GroupsService) {
return accounts.NewAccountsService("com.owncloud.api.accounts", client.DefaultClient),
accounts.NewGroupsService("com.owncloud.api.accounts", client.DefaultClient)
}

0 comments on commit b8f64ce

Please sign in to comment.