[PATCH] Merging the privilege code

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Aug 30 01:55:49 MDT 2010


On Mon, Aug 30, 2010 at 05:26:55PM +1000, Andrew Bartlett wrote:
> > Another argument in favor of a struct: Type safety. We even
> > have NTSTATUS (which really is just a uint32 even) as a
> > struct, Tridge went through great pains to make it one, and
> > this revealed quite a few bugs.
> 
> I've extended the patch series to address the expandability constraints
> here - all the callers outside libcli/security/privileges.c and
> source3/lib/privileges.c now only use an enum sec_privilage to query or
> set the privileges of a user.  While C does not provide strict type
> checking on enums, it is stronger protection than a typedef, fits with
> your requirement for clarity of purpose and allows the values to be
> resolved inside a debugger. 

Probably it's just that I'm too stupid to understand why a
structure is technically not possible anymore. Well, yet
another thing that we can then work on over the next years.

Volker


More information about the samba-technical mailing list