Request for review of Samba VirusFilter preparation for merging with Samba

Trever L. Adams trever at middleearth.sapphiresunday.org
Mon Sep 12 06:43:46 UTC 2016


On 09/10/2016 10:44 PM, Simo wrote:
> On Sat, 2016-09-10 at 14:02 -0600, Trever L. Adams wrote:
>> On 09/10/2016 12:54 PM, Jeremy Allison wrote:
>>> On Sat, Sep 10, 2016 at 12:00:26PM -0600, Trever L. Adams wrote:
>>>>> Then -- no lines beyond 80 chars please.
>>>> Is this hard and fast? There are a few things that are right
>>>> around
>>>> 80-83 characters that would be difficult to split up.
>>> Yeah, it is really. Just break the lines up.
>>                 scan_errno = virusfilter_h-
>>> infected_file_errno_on_open;
>> Is of concern to me. It seems like years ago I found that some
>> compilers
>> would not compile a line like above if it was broken at -> and that
>> is
>> the only way I see to shorten the line.
>>
>> Any suggestions? Other than that I believe I have not made all of the
>> lines <= 80 characters, even in header files.
> 2 ways:
>
> 1. use a short name for the member
>
> 2. 		scan_errno =
> 		   virusfilter_h->infected_file_errno_on_open;
>
> I prefer shorter variable names personally, in cases like this.
>
> HTH,
> Simo.
>
Thank you all for the suggestions. I am sorry for having been so daft. I
apparently struggled to switch completely from a project that I have
spent a few months working on that required strict PEP8 (python)
formatting rules.

I had missed a few >80 character lines in one of the header files. I
have fixed those and renamed 4 variables (in part for consistency) to
make them fit and still be obvious in what they are for.

I therefore have 4 issues remaining:
1) Volker's request for better code reuse as mentioned elsewhere. The
poll needs to be done before each write.
2) in virusfilter_vfs_close with a parameter files_struct *fsp,
SMB_VFS_NEXT_CLOSE is called before local processing. If that returns -1
with errno EBADF will fsp->modified still be valid?
3) The author/maintainer has asked that I move some templates for
configuration to examples/virusfilter. These have some place holders
such @SAMBA_CONFIGDIR at . Is this the right place for these files? Should
I keep such place holders? How do I set things up to process them? If
not, what should I replace them with?
4) The test directory in the top of the the project contains a complete
directory layout. Any suggestions on how/where to place these?

Thank you.
Trever

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160912/bb0f73f3/signature.sig>


More information about the samba-technical mailing list