Gencache fails to open gencache.tdb

Alexander Bokovoy a.bokovoy at sam-solutions.net
Thu Feb 6 08:50:27 GMT 2003


On Thu, Feb 06, 2003 at 12:06:04AM +0100, Rafal Szczesniak wrote:
> On Wed, Feb 05, 2003 at 08:01:51PM +0200, Alexander Bokovoy wrote:
> > Hi all!
> > 
> > Attached patch can be seen as proposal to discuss behavior of gencache in
> > case when it is used in applications running under non-priviledged
> > accounts so that O_RDWR|O_CREAT always fails against system-wide
> > lock_path("gencache.tdb") (which is usually created by smbd/nmbd).
> > 
> > The patch adds error resistence and tries to re-open gencache.tdb in
> > O_RDONLY mode if O_RDWR|O_CREAT failed. This allows the application to use
> > existing entries but forbids cache updates.
> 
> I understand your idea, but it's useful only when another root-privileged
> process is able to update the cache contents (like parent process ?).
The problem now is that when you run non-priviledged smbclient on a box where 
smbd/nmbd were started even once, it will be unable to write to the cache
and will try to open cache for write everytime libsmb wants to do
something with it (even reads)

> Otherwise, only per-user cache makes sense when it comes to being useful.
Probably, but we need to introduce a common infrastructure to address
per-user settings in client applications then.

> > Simo proposed to have per-account gencache.tdb in such case
> > (~/.smb/gencache.tdb?) but I'm not sure it is good to put such behavior
> > into the level where gencache exists (lib/). Any other thoughts?
> 
> Look above. The other question is what do we expect non-privileged account
> to be able to do with samba daemons ?
Interact, obviously. My point is that namecache (and gencache therefore) is being 
used in client applications, not only in samba daemons.

-- 
/ Alexander Bokovoy
---
Be careful!  Is it classified?


More information about the samba-technical mailing list