Project

General

Profile

Actions

Bug #6796

closed

generic methods permissions (non recursive) is indeed recursive

Added by Nicolas CHARLES almost 9 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
1
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

Using "method_call" usebundle => permissions("/chroot/sftp", "711", "root", "root") will recursively change permissions on /chroot/sftp, which is not what is expected

Actions #1

Updated by Alexis Mousset almost 9 years ago

  • Status changed from New to In progress
Actions #2

Updated by Alexis Mousset almost 9 years ago

depth => "0" seems to do the same as depth => "1".

A solution could be to remove the depth_search when depth is 0.

Actions #3

Updated by Alexis Mousset almost 9 years ago

https://github.com/cfengine/core/blob/6a4d6f60f7061f6afd1a3ae8c4bdae5edb6071c6/cf-agent/verify_files_utils.c#L2208

When there is a depth_search attribute, cf-engine only tests recursion depth after browsing the base directory, so a depth of 0 and 1 have the same effect.

Actions #4

Updated by Alexis Mousset almost 9 years ago

In the case of file copy, the depth is handled correctly, only the base dir is created. The problem only happens in the DepthSearch function which manages file attributes updates.

Actions #6

Updated by Alexis Mousset almost 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis Mousset to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/ncf/pull/211
Actions #7

Updated by Alexis Mousset almost 9 years ago

  • Status changed from Pending technical review to In progress
  • Assignee changed from Nicolas CHARLES to Alexis Mousset
Actions #8

Updated by Alexis Mousset almost 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis Mousset to Nicolas CHARLES
Actions #9

Updated by Alexis Mousset almost 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset commit:919882dddc1bbd8ae70bc4e09547444e7c446686.

Actions #10

Updated by Nicolas CHARLES almost 9 years ago

Applied in changeset commit:3a053020b44807144ff3cb9181f674022d2397b4.

Actions #11

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released
Actions #12

Updated by Alexis Mousset almost 2 years ago

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0
Actions #13

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: Atom PDF