[Rpm-maint] [rpm-software-management/rpm] Add support for audit logging package operations via plugin (#648)

Igor Gnatenko notifications at github.com
Thu Mar 28 12:38:23 UTC 2019


ignatenkobrain commented on this pull request.



> +    if (auditFd < 0)
+	goto exit;
+
+    int nelem = rpmtsNElements(ts);
+    struct teop *ops = xcalloc(nelem, sizeof(*ops));
+    char *dir = audit_encode_nv_string("root_dir", rpmtsRootDir(ts), 0);
+    int enforce = (rpmtsVfyLevel(ts) & RPMSIG_SIGNATURE_TYPE) != 0;
+
+    getAuditOps(ts, ops, nelem);
+
+    for (int i = 0; i < nelem; i++) {
+	const char *op = ops[i].op;
+	if (op) {
+	    rpmte p = ops[i].te;
+	    char *nevra = audit_encode_nv_string("sw", rpmteNEVRA(p), 0);
+	    char eventTxt[256];

is there any reason to hardcode 256 bytes?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/648#pullrequestreview-219992041
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190328/939af50a/attachment.html>


More information about the Rpm-maint mailing list