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

User IDs standard #150

Open
EmptyByte opened this issue Jul 25, 2024 · 3 comments
Open

User IDs standard #150

EmptyByte opened this issue Jul 25, 2024 · 3 comments

Comments

@EmptyByte
Copy link

Why mixing

auid!=4294967295
auid!=-1

instead of using:

auid!=unset

since it is exactly the same ?

@Pierre-Gronau-ndaal
Copy link
Contributor

In auditd, the auid (Audit User ID) represents the user ID of the user who initiated a process. The value 4294967295 (or -1 in signed 32-bit integer representation) is used to indicate an unset or invalid auid.
Why Use auid!=unset
Using auid!=unset is more readable and semantically clear. It directly conveys the intent that the rule should apply to all users except those with an unset auid. This improves the maintainability and readability of your audit rules.

In older versions of auditd, the unset keyword was not supported. Instead, the auid field would be set to -1 (or 4294967295 in unsigned 32-bit integer representation) to indicate that the audit user ID was not set.

Using auid!=4294967295 and auid!=-1 explicitly checks for these values, ensuring that the rule applies to all cases where the audit user ID is not set.

@Pierre-Gronau-ndaal
Copy link
Contributor

can we close the issue?

@EmptyByte
Copy link
Author

@Pierre-Gronau-ndaal Yes this can be closed. However there is still a mix of unset and ID 4294967295.

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

No branches or pull requests

2 participants