Mode in an open request and chmod in libsmbclient

Cole, Timothy D. timothy_d_cole at md.northgrum.com
Fri Mar 2 23:37:32 GMT 2001


> -----Original Message-----
> From:	Richard Sharpe [SMTP:sharpe at ns.aus.com]
> Sent:	Friday, March 02, 2001 14:35
> To:	samba-technical at us5.samba.org
> Subject:	Mode in an open request and chmod in libsmbclient
> 
> Hi,
> 
> So far I have ignored the issue of the mode of opened files. For example,
> when you do
> 
>    smbc_open(file, O_RDONLY, 666)
> 
> I ignore the mode (666) portion. 
> 
> However, in looking at the underlying library I am using, I note that
> there
> is a call that sends an SMBsetatr request, so, ...
> 
> I could map the mode bits in the reverse way that it is done at the
> moment,
> back to HIDDEN, SYSTEM, READ-ONLY, etc ... and then send the appropriate
> SMBsetatr request.
> 
> This does bring up the topic of ACLs, however.  Since Samba 2.2.0 will
> have
> an ACL implementation, perhaps there should be SMBC calls that manipulate
> ACLs on files as well.  Here, I feel that we should use the standard UNIX
> approach to ACLs (POSIX) and map into what SMB wants to do.
> 
	One of the distadvantages of using (nearly) straight POSIX ACLs as
an intermediate representation is that they are not a clean superset of many
of the potential underlying ACL implementations.  AFS ACLs are an obvious
example, but there are others which are more subtly incompatible.




More information about the samba-technical mailing list