Skip to content

Fixed bug in getacls() where no ACLs caused error#5902

Merged
larsewi merged 1 commit into
cfengine:masterfrom
larsewi:empty
Oct 17, 2025
Merged

Fixed bug in getacls() where no ACLs caused error#5902
larsewi merged 1 commit into
cfengine:masterfrom
larsewi:empty

Conversation

@larsewi

@larsewi larsewi commented Oct 13, 2025

Copy link
Copy Markdown
Contributor
$ cat test.cf 
bundle agent __main__ {
  vars:
    "default_acls"
      slist => getacls("/etc", "default");
    "access_acls"
      slist => getacls("/tmp/bar", "access");
  reports:
    "Default acl: $(default_acls)";
    "Access acl: $(access_acls)";
}
$ sudo /var/cfengine/bin/cf-agent -KIf ~/test.cf 
R: Access acl: user::rwx
R: Access acl: group::rwx
R: Access acl: other::r-x

@larsewi

larsewi commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

@larsewi

larsewi commented Oct 14, 2025

Copy link
Copy Markdown
Contributor Author

Yack...

11:19:53 evalfunction.c: In function ‘FnCallGetACLs’:
11:19:53 evalfunction.c:691:37: error: ‘ENODATA’ undeclared (first use in this function)
11:19:53      if ((acls == NULL) && (errno != ENODATA))
11:19:53                                      ^

@larsewi larsewi marked this pull request as draft October 14, 2025 11:39
@larsewi larsewi force-pushed the empty branch 2 times, most recently from 74bf61e to 0753c51 Compare October 15, 2025 11:04
@larsewi

larsewi commented Oct 15, 2025

Copy link
Copy Markdown
Contributor Author

@cf-bottom Jenkins please :)

Changelog: Title
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@cf-bottom

Copy link
Copy Markdown

@larsewi larsewi marked this pull request as ready for review October 15, 2025 15:55
@larsewi larsewi requested a review from craigcomstock October 16, 2025 08:01
@craigcomstock

Copy link
Copy Markdown
Contributor

cf-support.test failure should be fixed now.
build init test failure is related to rhel9hub package install trouble, I am looking into it.
bootstrap-tests flake is a current known issue I will look into today.

So from my point of view, your PR looks good.

@larsewi larsewi merged commit 87e41d2 into cfengine:master Oct 17, 2025
39 of 41 checks passed
@larsewi larsewi deleted the empty branch April 27, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants