From owner-trustedbsd-discuss@freebsd.org Mon May 30 11:07:05 2016 Return-Path: Delivered-To: trustedbsd-discuss@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D03FDB54D00 for ; Mon, 30 May 2016 11:07:05 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64EA614B1 for ; Mon, 30 May 2016 11:07:04 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-lb0-f179.google.com with SMTP id k7so44230618lbm.0 for ; Mon, 30 May 2016 04:07:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:message-id:date:to:mime-version; bh=apJw+Vyksz/mPly1SwrhJlIlHmXYq9/XvFLjDrSo+cI=; b=IMTYjjSN0ZbEKXMSeEsRzCnHZcQKNl8Uuw0+NLjgjoPLFMKheSTl6Us4QxZ/sinA5M sm6NxPCQg222gFWhSai5VkRHAKG0jhdNK4w/M8XDFbE/ptZ/2hS72SlVbMVRdMLAaHTe yc+r00PulR6SvijCFWtE478s5r5+Gj67f1uOyirQpWkLOQj9bdYjhid2vCNfD/EBqvEm ObzSzoRlehUvmpTUfFgrK9+wZ4JKbCWYWZD/NXwF6jm5u3CojzGyk2RC+YwLTcg0G0zx 92V0azxpzTcX7ZjRX/V39JgKY5IlbuYdBuwzAyKRVByTrgCtRJCl7d6ICkMuGT9WfrxP 66zA== X-Gm-Message-State: ALyK8tKot7o129KczRNVQ22AgHgi6dnHPTgdVTN+siL9tYIZPLW6RQLxFN1iH4OSEIMpdw== X-Received: by 10.112.204.167 with SMTP id kz7mr8005897lbc.71.1464604849057; Mon, 30 May 2016 03:40:49 -0700 (PDT) Received: from [192.168.0.15] (87-207-152-10.dynamic.chello.pl. [87.207.152.10]) by smtp.gmail.com with ESMTPSA id 1sm2336657ljf.5.2016.05.30.03.40.48 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 May 2016 03:40:48 -0700 (PDT) From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: How to record audit logs for only one specified file in FreeBSD? Message-Id: <90547374-D575-48A2-8E72-CE9CFCF5B242@FreeBSD.org> Date: Mon, 30 May 2016 12:40:47 +0200 To: trustedbsd-discuss@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: trustedbsd-discuss@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: TrustedBSD General Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2016 11:07:05 -0000 Hi, I participate in Google Summer of Code this year and I work on the audit = logs conversion from non-BSM formats to the BSM format. I=E2=80=99ve stumbled upon a problem like this: On Red Hat Linux I can specify the file I want to record audit logs for = with this command: auditctl -a exit,always -F path=3D/tmp/foo.txt -F perm=3Dwar I cannot figure out how to do a similar thing on FreeBSD. The only way = I've found to record audit logs for files is to add the fr flag to my = /etc/security/audit_control file = (https://www.freebsd.org/doc/en/books/handbook/audit-config.html#event-sel= ection = ). Unfortunately, this way doesn't allow me to specify the file. I suspect that you cannot specify a file to track. You just have to = record everything and then extract the logs you are interested in. I=E2=80=99ve posted this question on serverfault.com but I=E2=80=99ve = not received any help. = (http://serverfault.com/questions/778510/how-to-record-audit-logs-for-only= -one-specified-file-in-freebsd = ) Cheers, Mateusz Piotrowski=