-
Notifications
You must be signed in to change notification settings - Fork 242
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
Audit update #1199
base: master
Are you sure you want to change the base?
Audit update #1199
Conversation
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
3f46a30
to
79bb0f5
Compare
@stevegrubb before I take this out of draft status, are there any other distributions besides Fedora/CentOS/RHEL that might be affected by these changes? I'd like to ping the maintainers of those distributions to review these code changes. |
return; | ||
} | ||
len = strnlen(grp, sizeof(enc_group)/2); | ||
if (audit_value_needs_encoding(grp, len)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, we don't allow names that would need encoding. This reminds me that we have #1158.
I will add "
to the list of strictly disallowed characters, and then we don't need to encode anything here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. If it's fine for you we leave it like this for now, and if I see that #1158 mergse before this PR I will update the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's fine. Thanks!
#ifndef AUDIT_GRP_MGMT | ||
#define AUDIT_GRP_MGMT 1132 /* Group account was modified */ | ||
#endif | ||
#ifndef AUDIT_GRP_CHAUTHTOK | ||
#define AUDIT_GRP_CHAUTHTOK 1133 /* Group account password was changed */ | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for those specific values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They come from audit-records.h
and probably they weren't available in all distributions when this patch was originally created (that happened years ago). I'm fine with removing this part of the patch as probably they will be available in all distributions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please try removing them, and if builds everywhere, let's forget about them (and if not, reintroduce them).
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
79bb0f5
to
6d9391c
Compare
#ifndef AUDIT_GRP_MGMT | ||
#define AUDIT_GRP_MGMT 1132 /* Group account was modified */ | ||
#endif | ||
#ifndef AUDIT_GRP_CHAUTHTOK | ||
#define AUDIT_GRP_CHAUTHTOK 1133 /* Group account password was changed */ | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please try removing them, and if builds everywhere, let's forget about them (and if not, reintroduce them).
audit_logger (AUDIT_USER_ACCT, log_get_progname(), | ||
audit_logger (AUDIT_GRP_MGMT, log_get_progname(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding
You could move the filename in the subject to the prefix:
lib/cleanup_group.c: Update audit messages
Also, could you add some little explanation in the commit message of what this update is about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding
You could move the filename in the subject to the prefix:
lib/cleanup_group.c: Update audit messages
Or will you squash the commits? (I think it would make sense to squash them.)
@ikerexxe Most major distributions enable auditing. So, they are all affected. That said, they are all broken except Fedora. This fixes everyone and Fedora can drop it's patch. |
This is a set of changes that Fedora introduced in a downstream patch. The idea is to converge upstream and downstream versions to reduce the maintenance burden. The patch was created a long time ago and we have been adapting it, but it may not be up to date with current upstream code standards, if so, please inform me so I can update the patch.