file_exists() calls dos_to_unix()

Luke Kenneth Casson Leighton lkcl at switchboard.net
Mon Nov 23 22:02:44 GMT 1998


On Mon, 23 Nov 1998, Jeremy Allison wrote:

> Luke Kenneth Casson Leighton wrote:
> > 
> > should be called unix_file_exists(), dos_file_exists() calling
> > unix_file_exists().
> > 
> 
> Well the unix_ bit is sort of redundent :-).

not really: it makes a clear distinction between unix files and dos files.
one which has resulted in this bug.
 
> > > BTW: Have you worked out the problem with the uint32 <-> gid_t
> > > issue yet in your new code in HEAD ?
> > 
> > what's that, then?
> 
> 
> The following problem still exists in the HEAD branch :

i don't recall adding the lines of code you are referring to.  which is
probably the problem.

i'm removing these lines of code: the format is in rids, not gids.


> Jeremy.
> 
> -------------cut here-----------------------------
> 
> Luke,
> 
>         I think there are some things broken in this latest
> code.
> 
> For example - in compiling I get :
> 
> Compiling passdb/smbpassgroup.c
> "passdb/smbpassgroup.c", line 139: remark(1506): implicit conversion from
>           "unsigned int" to "long":  rounding, sign extension, or loss of
>           accuracy may result
>                                 (*als_rids)[i] =
> pwdb_gid_to_alias_rid((*als_rids)[i]);
>                                                                        ^
> 
> "passdb/smbpassgroup.c", line 157: remark(1506): implicit conversion from
>           "unsigned int" to "long":  rounding, sign extension, or loss of
>           accuracy may result
>                                 (*grp_rids)[i] =
> pwdb_gid_to_group_rid((*grp_rids)[i]);
>                                                                        ^
> 
> Looking carefully at this code, pwdb_gid_to_alias_rid()
> and pwdb_gid_to_group_rid() should take a UNIX gid_t
> and map them into a RID. You are passing a RID to these
> functions.
> 
> You are reading a list of RIDs from a group file (the note
> you just sent out says it should be names, not numbers BTW),
> and then passing them through a "convert from gid_t to RID"
> function !
> 
> This doesn't make sense.
> 
> What is this code trying to do ?
> ------------------------end cut-------------------
> -- 
> --------------------------------------------------------
> Buying an operating system without source is like buying
> a self-assembly Space Shuttle with no instructions.
> --------------------------------------------------------
> 

<a href="mailto:lkcl at samba.anu.edu.au" > Luke Kenneth Casson Leighton  </a>
<a href="http://mailhost.cb1.com/~lkcl"> Samba and Network Development </a>
<a href="http://www.samba.co.uk"       > Samba and Network Consultancy </a>



More information about the samba-technical mailing list