From 151ff8b893e0830ceaec266360837b0e116545c9 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 19 Oct 2012 19:43:30 +0200 Subject: [PATCH] Handle more actions --- root/usr/bin/samba-db-logd | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/root/usr/bin/samba-db-logd b/root/usr/bin/samba-db-logd index cd5741f..b1dc650 100755 --- a/root/usr/bin/samba-db-logd +++ b/root/usr/bin/samba-db-logd @@ -113,12 +113,22 @@ while (defined(my $line=$tail->read)){ } my @other = split /\|/, $line; - if ($action eq 'opendir'){ - # Oct 12 17:20:24 sme8 smbd[11176]: admin|192.168.7.50|pc10-45|intranet|opendir|ok|./ + if (($action eq 'opendir') || + ($action eq 'chdir') || + ($action eq 'connect') || + ($action eq 'disconnect') || + ($action eq 'close'){ + # Oct 12 17:20:24 sme8 smbd[11176]: admin|192.168.7.50|pc11-45|intranet|opendir|ok|./ $status = $other[5]; $file_src = $other[6]; $access_mode = 'r'; } + elsif ($action eq 'chdir'){ + #Oct 19 19:14:52 sme8 smbd[2241]: admin|192.168.7.50|pc11-45|intranet|chdir|ok|chdir|/ + $status = $other[5]; + $file_src = $other[7]; + $access_mode = 'r'; + } elsif (($action eq 'rmdir') || ($action eq 'mkdir') || ($action eq 'unlink')){ $status = $other[5]; $file_src = $other[6];