Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set os.ModePerm permission for unix sockets #1320

Merged
merged 5 commits into from
Jul 12, 2022

Conversation

NikitaSkrynnik
Copy link
Contributor

Signed-off-by: Nikita Skrynnik nikita.skrynnik@xored.com

Description

Issue link

networkservicemesh/cmd-nsmgr#510

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionallity
  • Documentation
  • Refactoring
  • CI

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
@NikitaSkrynnik NikitaSkrynnik marked this pull request as draft July 7, 2022 10:49
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
@NikitaSkrynnik NikitaSkrynnik marked this pull request as ready for review July 7, 2022 11:12
@NikitaSkrynnik NikitaSkrynnik requested a review from zolug July 7, 2022 11:18
if _, err = os.Stat(target); os.IsExist(err) {
err = os.Chmod(target, os.ModePerm)
if err != nil {
errCh <- errors.Wrap(err, fmt.Sprintf("Cannot change the mode of %s", target))
Copy link
Member

@denis-tingaikin denis-tingaikin Jul 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
errCh <- errors.Wrap(err, fmt.Sprintf("Cannot change the mode of %s", target))
errCh <- errors.Wrap(err, fmt.Sprintf("%v: сannot change mod", target))

Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
@edwarnicke edwarnicke merged commit aa1bc9e into networkservicemesh:main Jul 12, 2022
nsmbot pushed a commit to networkservicemesh/cmd-nse-remote-vlan that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-map-ip-k8s that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-ipam-vl3 that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Jul 12, 2022
…k@main

PR link: networkservicemesh/sdk#1320

Commit: aa1bc9e
Author: Nikita Skrynnik
Date: 2022-07-13 01:37:27 +1100
Message:
  - Set os.ModePerm permission for unix sockets (#1320)
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
anastasia-malysheva pushed a commit to anastasia-malysheva/sdk that referenced this pull request Jul 27, 2022
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
@NikitaSkrynnik NikitaSkrynnik deleted the issue-510 branch August 7, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants