Need Help On Several System calls handled by smbfs.

Louis Lam lsauch at yahoo.com
Wed Dec 12 00:45:04 GMT 2001


Hello Everyone,

I have a question on the following sequence of sys
calls.

Suppose I have a simple program that does this:


/* 1.Open a file for read only*/
   fd1 = open(filename, O_RDONLY); 

/* 2.Open the SAME file but with 
 * O_WRONLY|O_CREAT|O_APPEND
 */
   fd2 = open(filename,O_WRONLY|O_CREAT|O_APPEND);

/* 3.write to the file */
   write(fd2, buf, some_len);


* Notice that there is no close() between the 1st and
the second open on the same file.

*If the file is on smbfs, the write will fail. access
denied

*If the file is on NFS or ext2fs, the write will pass.

Q1: Pardon me, I'm still quite a novice on fs devel.
Is this the correct behaviour that should be expected
of smbfs? 

Q2: If this is the correct behaviour, What are the
mechanisms that enforces this behaviour? Can it be
changed via smbd/smbfs so that the above sequence will
work as if it were over NFS?

The reason is because I'm using the Balsa email client
which seem to exhibit this behaviour when the mail
files are stored over smbfs.

Thank You In Advance.
Louis Lam






 




__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com




More information about the samba-technical mailing list