Jira (PUP-10967) Puppet always prints errors in debug when trying to resolve account to SID

14 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Mar 16, 2021, 9:17:04 PM3/16/21
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Bug PUP-10967
Puppet always prints errors in debug when trying to resolve account to SID
Issue Type: Bug Bug
Affects Versions: PUP 7.5.0
Assignee: Unassigned
Created: 2021/03/16 6:16 PM
Priority: Minor Minor
Reporter: Josh Cooper

Puppet on Windows shows the following errors when running with debugging:

C:\> puppet agent -t --debug
...
Debug: Processing report from xxx with processor Puppet::Reports::Store
Debug: Could not retrieve raw SID bytes from 'Administrator': Failed to convert string SID: Administrator:  The security ID structure is invalid.
Debug: Could not retrieve raw SID bytes from 'Administrator': Failed to convert string SID: Administrator:  The security ID structure is invalid.

This debugging was added in https://github.com/puppetlabs/puppet/commit/bea9ff75d5946dbb92c90ef068cf6c2d4cb0db85. However, the name_to_principal method is sometimes called with valid account names like Administrator, so the call to string_to_sid_ptr fails with (ERROR_INVALID_SID 0x539 and the debug message is printed.

I think it'd be better to check if name starts with something like S-\d+-\d+ or only log the error if e.code != 0x539. For example, if the SID string refers to an account that doesn't exist, you'll get 0x534 ERROR_NONE_MAPPED.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Jun 7, 2021, 2:46:02 AM6/7/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: NW-2021-06-30
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Jun 10, 2021, 7:08:01 AM6/10/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Jun 16, 2021, 5:43:02 AM6/16/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Jun 16, 2021, 8:44:01 AM6/16/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 23, 2021, 11:03:01 AM6/23/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 23, 2021, 11:03:03 AM6/23/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Fix Version/s: PUP 7.9.0
Fix Version/s: PUP 6.24.0

Josh Cooper (Jira)

unread,
Jun 28, 2021, 12:17:03 PM6/28/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 28, 2021, 12:20:02 PM6/28/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: Puppet no longer prints an unnecessary error message when resolving account names to SIDs on Windows

Claire Cadman (Jira)

unread,
Jul 13, 2021, 8:05:07 AM7/13/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages