[Samba] [jra at samba.org: Re: How do i get file attributes using samba.]

Jeremy Allison jra at samba.org
Tue Jun 21 14:46:45 MDT 2011

Keeping the list informed also...

----- Forwarded message from Jeremy Allison <jra at samba.org> -----

Date: Tue, 21 Jun 2011 13:46:18 -0700
From: Jeremy Allison <jra at samba.org>
To: naga_kishore_kommuri at yahoo.com
Cc: Jeremy Allison <jra at samba.org>
Subject: Re: [Samba] How do i get file attributes using samba.
User-Agent: Mutt/1.5.20 (2009-06-14)

On Mon, Jun 20, 2011 at 09:23:25PM -0700, naga_kishore_kommuri at yahoo.com wrote:
> Hi Allison,
> Thanks for the reply.
> Yes I tried system.dos_attr.mode.
> But I think it will  give the following attributes only. Snippet from libsmbclient.h.....
> ....
> /*
>  * Mappings of the DOS mode bits, as returned by smbc_getxattr() when the
>  * attribute name "system.dos_attr.mode" (or "system.dos_attr.*" or
>  * "system.*") is specified.
>  */
> #define SMBC_DOS_MODE_READONLY       0x01
> #define SMBC_DOS_MODE_HIDDEN         0x02
> #define SMBC_DOS_MODE_SYSTEM         0x04
> #define SMBC_DOS_MODE_VOLUME_ID      0x08
> #define SMBC_DOS_MODE_DIRECTORY      0x10
> #define SMBC_DOS_MODE_ARCHIVE        0x20
> ....
> ....
> My requirement is to extract FILE_ATTRIBUTE_OFFLINE attribute.

As far as I can tell this code just returns the 16-bit
dos attributes field as defined in the protocol, so it
should just return the FILE_ATTRIBUTE_OFFLINE in the
returned bits (even if it's not listed in the SMB_DOS_MODE_XXX)


----- End forwarded message -----

More information about the samba mailing list