[PATCH] Fix failures on re-provision incorrectly blamed on posix acl support.

Jelmer Vernooij jelmer at samba.org
Tue Feb 4 20:04:03 MST 2014


On Wed, Feb 05, 2014 at 03:52:56PM +1300, Garming Sam wrote:
> On 05/02/14 12:19, Jelmer Vernooij wrote:
> >On Wed, Feb 05, 2014 at 11:45:24AM +1300, Andrew Bartlett wrote:
> >>On Tue, 2014-02-04 at 15:42 -0700, BlackPenguin ADMIN wrote:
> >>>That works. I just tried it. Thank you!
> >>Great.
> >>
> >>Reviewed-by: Andrew Bartlett <abartlet at samba.org>
> >>
> >>Jelmer,
> >>
> >>Can I get your review on this?
> >I realize you're just moving code, but this code could use some more
> >improvements. It's catching all Exceptions, making assumptions about the kind
> >of error that is occurring. Most of the lines are also too long.
> >
> >Reviewed-By: Jelmer Vernooij <jelmer at samba.org>
> >
> >Cheers,
> >
> >Jelmer
> >
> Hi Jelmer,
> 
> So we've put in an OSError in pysmbd so that we can catch this less
> broadly.
> 
> With the new order of things, a call to samdb.connect is now the
> first thing to fail when attempting a provision with incorrect
> permissions. But the failure messages weren't particularly helpful,
> so we've tried to change them in these patches. We now pass up a
> permission denied error.
> 
> Any other suggestions while we're looking at this stuff?
Wow, that's great - thanks so much for these improvements!

Reviewed-By: Jelmer Vernooij <jelmer at samba.org>

If you'd like to avoid the explicit setting of errno,
you could use:

v = Py_BuildValue("(is)", err, strerror(err)));
PyErr_SetObject(PyExc_OSError, v);
Py_DECREF(v);

(or pass a three-tuple, with the relevant filename as third element)

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140205/7f1a6ba6/attachment.pgp>


More information about the samba-technical mailing list