Proposal for modifying Get_Pwnam() [Re: couple of getpwnam() questions]

Kevin Colby kevinc at grainsystems.com
Mon Nov 27 17:26:31 GMT 2000


I'll agree that 9x clients + standard all-lower Unix usernames means
that testing all lower first is nearly a must.  "As Transmitted" would
seem the logical next choice as well.  However, Kenichi's point
regarding case shift in other languages seems valid.

Kenichi Okuyama wrote:
>
> So, comes my suggestion. Just use pointer to function. When someone
> start porting Samba to new system, he( or she ) will select ( or
> simply create ) new_Get_Pwnam() that matchis one's request, and
> change (*Get_Pwnam)() accordingly.


Gerald Carter wrote:
> 
>     4. perform number case permutations defined by
>        'username level' (defaults to 0)

But how will you define these "case permutations"?

You could define your case_perm function to do "username level"
permutations by passing the request and current request level
to a function pointer that can be system specific and implement
a means for querying just how many potential permutations there
are on the current system.  (It isn't necessarily 8192, is it?)
Individual permutation functions could define their own priority
to different case combinations, depending of what is more likely
for the given language or character set.

	- Kevin Colby
	  kevinc at grainsystems.com




More information about the samba-technical mailing list