Detect Vista symlinks with libsmbclient

Henrik Zagerholm henke at
Thu Apr 26 09:55:40 GMT 2007

25 apr 2007 kl. 18:43 skrev derrell at

> Henrik Zagerholm <henke at> writes:
>> I've just started to experiment with Vista and I wonder if I can  
>> somehow
>> tell if a file object is an ordinary file or a symlink/junction?
>> As I understand it I will not be able to follow symlinks until the
>> implementation of SMB2 so in the meantime I would like to ignore   
>> those files
>> (instead of throwing a bunch of EBADF).
>> Any ideas?
> Henrik, have you tried calling smbc_stat() on a symlink to see what  
> it gives
> you?  There may be some useful bit set in the mode field.
> If that doesn't provide any useful information, please post a  
> bugzilla ticket
> for this.  I expect to have a Vista environment available to me  
> fairly soon,
> at which time I'll be able to look into this.

I've now tried both smbc_stat and smbc_getxattr and can't see any  
difference in the mode bits.
I've opened up a bug at

As I understand it we will be able to handle these things better with  
SMB 2.0 or? :)

Cheers, Henrik

> Cheers,
> Derrell

More information about the samba-technical mailing list