What's wrong with this piece of code from source3/modules/vfs_acl_xattr.c around like 126 or so?

Richard Sharpe realrichardsharpe at gmail.com
Mon May 14 18:50:54 MDT 2012


On Mon, May 14, 2012 at 5:47 PM, simo <idra at samba.org> wrote:
> On Mon, 2012-05-14 at 16:25 -0700, Jeremy Allison wrote:
>> On Mon, May 14, 2012 at 02:28:59PM -0700, Richard Sharpe wrote:
>> >         if (ret) {
>> >                 errno = saved_errno;
>> >                 DEBUG(5, ("store_acl_blob_fsp: setting attr failed for file %s"
>> >                         "with error %s\n",
>> >                         fsp_str_dbg(fsp),
>> >                         strerror(errno) ));
>> >                 return map_nt_error_from_unix(errno);
>> >         }
>> >
>> > Hint. It has to do with saved_errno.
>>
>> Oh, you mean the errno = saved_errno should
>> be *after* the DEBUG statement ?
>>
>> Just checking - not sure exactly what I missed here.
>
> Why are you assigning errno, and not just using saved_errno directly ?

Well, that's my question. It's not my code, BTW, although I might have
run into exactly the same mistake.

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


More information about the samba-technical mailing list