[Samba] Samba mount point and dirent.h

Vincent.Badier at alcatel.fr Vincent.Badier at alcatel.fr
Wed Mar 17 13:28:01 GMT 2004

Hello all,

Currently trying to make a small code, i've some problems with the struct
dirent returned on a mount point.

The host runing the program is a linux debian runing a 2.6.1 kernel and a
localy compiled samba 3.0.2
Remote server are Windows NT/2000

Mounting them work quite well

The program simply try to get information of the content of a given

#include <stdio.h>
#include <dirent.h>
#include <sys/types.h>

int main (int argc, char **argv){
        DIR * directory;
        struct dirent *entree;
        directory = opendir(argv[1]);

        while ((entree = readdir(directory)) != NULL)
                fprintf(stdout, "%s : %d\n", entree->d_name,


The problem is i don't have the same result on locally mounted drive than
on smbfs. On a local drive, the d_type = 4, on a remote one via smbfs,
d_type = 0.

I guess this is normal, but would like to know why?

Best Regard's


More information about the samba mailing list