Removing the developers guide

Richard Sharpe realrichardsharpe at gmail.com
Thu Aug 22 18:59:30 MDT 2013


On Wed, Aug 21, 2013 at 9:39 PM, Volker Lendecke
<Volker.Lendecke at sernet.de> wrote:
> On Wed, Aug 21, 2013 at 01:12:55PM -0700, Jeremy Allison wrote:
>> On Wed, Aug 21, 2013 at 09:50:18PM +0200, Volker Lendecke wrote:
>> > On Wed, Aug 21, 2013 at 10:14:29AM -0700, Richard Sharpe wrote:
>> > > Stepping up to my soapbox, I would also prefer that all VFS requests
>> > > return NTSTATUS results :-)
>> >
>> > We could do that, sure. It changes the nature of the posix
>> > piece of the VFS. Given that we are far away from a clean
>> > posix VFS though, maybe it's time. The idea of a global
>> > errno is flawed anyway.
>>
>> Works for me. So long as we allow easy replacement
>> of POSIX-style open/read/write/close and don't
>> make them as complex as windows internal calls then
>> them returning an NTSTATUS isn't such a burdon.
>
> No, we still need simple open, mkdir, etc. We could ditch
> read and write, we have pread/pwrite. But what we could do
> is to immediately after the syscall request a
>
> if (ret == -1) {
>         return map_nt_error_from_unix(errno);
> }
> return NT_STATUS_OK;
>
> which also minimizes the time errno has to be saved. We had
> several bugs already where errno was overwritten by a hidden
> syscall, so I would consider this a good thing. However, I'm
> not sure we really have valid 1:1 mappings for all possible
> errno values. The risk that we lose semantics is my only
> worry here.

Yes, and I recently saw a case where an 'unknown' to Samba errno was
translated to ACCESS_DENIED and nothing was logged in
map_nt_error_from_unix. In cases like that we should log at level 0 so
someone finds it and we can figure out what it should map to.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list