On Wed, Apr 18, 2012 at 8:47 PM, Duncan Idaho <dune.id...@gmail.com> wrote:
> Hello all, > > I gave it some thought, and since IPMI specification is quite exact what > range of UIDs is allowed, it seems to be as a good idea to put in more > limitations what could and should be accepted as a "valid" UID. In other > words, what's missing from 'lib/ipmi_user.c' are couple of ``if (uid > > 63)''. > Only con I can think of is a] IPMI implementation that violates IPMI spec > b] a new spec which would allow UIDs > 63, although this seems unlikely. > And since it is noted even in source code itself, I see no problem to > "expand" the limits when such time comes. > > Come to think of it, how about implementation as: > ~~~ > #define UID_MIN 1 > #define UID_MAX 63 > > [...] > > some_function() > { > [...] > if (uid < UID_MIN || uid > UID_MAX) { > /* error */ > } > [...] > } > ~~~ > > Regards, > Duncan > Please, review attached diff. --Duncan
0002-ipmi_user.c-uid_checks.diff
Description: Binary data
------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel