excel can't write files
Jeremy Allison
jeremy at valinux.com
Wed Sep 5 18:46:46 GMT 2001
David Collier-Brown wrote:
>
> > > > 152: stat64("/usr/local/samba/var/locks", 0x080477F4) = 0
> > > > 152: open("/usr/local/samba/var/locks/connections.tdb", O_RDONLY) = 3
> > > > 152: read(3, " T D B f i l e\n\0\0\0".., 168) = 168
> > > > 152: fxstat(2, 3, 0x08047700) = 0
> > > > 152: mmap(0x00000000, 1875968, PROT_READ, MAP_SHARED, 3, 0) = 0xDF7F0000
>
> Ok, the mmap succeeded, of a read-only file to a read-only
> memory segment...
>
> > > > 152: lseek(3, 40, SEEK_SET) = 40
> > > > 152: write(3, "\0\0\0\0", 4) Err#9 EBADF
>
> And then we write to it! That's probably wrong (;-))
That's strange. The code to open connections.tdb is :
if (!tdb) {
tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|USE_TDB_MMAP_FLAG,
O_RDWR | O_CREAT, 0644);
}
And in tdb/tdb.c :
if ((open_flags & O_ACCMODE) == O_RDONLY) {
tdb.read_only = 1;
So I don't see where the connections.tdb file is being
opened readonly....
Hmmmmm. This doesn't look like the code in CVS.
Jeremy.
--
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------
More information about the samba-technical
mailing list