[linux-cifs-client] serverino does not seem to work

Rene Tapia renuxman at yahoo.com
Sat May 7 08:06:51 GMT 2005


More info. It looks like some kind of refresh is needed, the following code works fine:

open ("file.LCK", O_RDWR | O_CREAT | O_EXCL , 0);
system("ls -la");
link ("file.LCK", "file.LNK");
system("ls -la");
stat ("file.LCK", &statbuf);
 
RESULT: statbuf.st_nlink == 2

Thanks!

--- Rene Tapia <renuxman at yahoo.com> wrote:

> I have Debian sarge, and Debian's:
> kernel-source-2.6.11.tar.bz2
> 
> with its fs/cifs directory replaced with:
> cifs-1.34.tar.gz
> 
> I am mounting home dirs using pam_mount with the following line in pam_mount.conf:
> volume * cifs debserv &     /home/&         uid=&,gid=&,serverino - -
> 
> KDE apps now do not hang (very cool!), but the following code still fails (see below for code to
> try this):
> open ("file.LCK", O_RDWR | O_CREAT | O_EXCL , 0);
> link ("file.LCK", "file.LNK");
> stat ("file.LCK", &statbuf);
> 
> RESULT: statbuf.st_nlink == 1 !!!
> 
> Attached is dmesg output.
> 
> Is this a bug? Or could this be caused because I am replacing cifs 1.34 in Debian's 2.6.11?
> 
> I would certainly appreciate very much any hints I could get on this.
> 
> Thanks!
> 
> 
> 
> #include <stdio.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> #include <errno.h>
> #include <string.h>
> #include <unistd.h>
> 
> int main(void)
> {
>     struct stat statbuf;
>     int rc;
>     int fd;
>     
>     fd = open ("file.LCK", O_RDWR | O_CREAT | O_EXCL , 0);
>     if (fd < 0)
>     {
>         printf ("Error: %d\n", errno);
>         return 1;
>     }
> 
>     rc = link ("file.LCK", "file.LNK");
>     if (rc)
>     {
>         printf ("Error: %d\n", errno);
>         return 1;
>     }
> 
>     rc = stat ("file.LCK", &statbuf);
>     if (rc)
>     {
>         printf ("Error: %d\n", errno);
>         return 1;
>     }
> 
>     if (statbuf.st_nlink != 2)
>     {
>         printf ("Opps...\n");
>     }
> 
>     printf("statbuf.st_nlink: %d\n", statbuf.st_nlink);
> 
>     close (fd);
> 
>     return 0;
> }
> 
> 
> 		
> Yahoo! Mail
> Stay connected, organized, and protected. Take the tour:
> http://tour.mail.yahoo.com/mailtour.html
> > _______________________________________________
> linux-cifs-client mailing list
> linux-cifs-client at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux-cifs-client
> 



		
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 


More information about the linux-cifs-client mailing list