[Samba] Re: locking.tdb: expand_file ftruncate to 8192 failed
(Permission denied)
Jeremy Allison
jra at samba.org
Wed Sep 21 23:37:32 GMT 2005
On Thu, Sep 22, 2005 at 01:09:30AM +0200, Axel Thimm wrote:
> On Wed, Sep 21, 2005 at 03:52:42PM -0700, Jeremy Allison wrote:
> > On Thu, Sep 22, 2005 at 12:47:08AM +0200, Axel Thimm wrote:
> > > I tested it and it runs successfully.
>
> I'll have to take that back. I tested it on a file on the system disk,
> I should had tested this on the filesystem the "lock directory" is on
> (see below).
>
> > > Is there a chance that the fd isn't opened by root in
> > > set_delete_on_close?
> >
> > I can't see a way this can happen. The locking tdb is only
> > opened by locking_init() which is called at line 879 in
> > smbd/server.c - we are very much root at this time.
>
> The outcome of the test code you sent segfaults now.
>
> # mount | grep gfs
> /dev/mapper/physik-data on /srv/physik.fu-berlin.de/data type gfs
> (rw,acl)
> # pwd
> /srv/physik.fu-berlin.de/data/samba-test
> # ls -l
> total 32
> -rwxr-xr-x 1 root root 10080 Sep 22 00:38 a.out
> -rw------- 1 root root 1231 Sep 22 00:35 test.c
> -rw-r--r-- 1 root root 0 Sep 22 01:07 testfile
> # ./a.out testfile thimm
> Segmentation fault
What's the gdb backtrace. There's probably a bug in one of
the error condition printing in the test code.
As I said, I bet GFS isn't POSIX complient. Don't put locking
tdb's on anything but local filesystems.
Jeremy.
More information about the samba
mailing list